iwl3945: use iwl rx handlers
Patch removes duplicate rx handlers(pm_sleep and pm_debug) from 3945 and uses handlers from iwlwifi. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
e9dde6f6ed
commit
030f05eda6
@ -768,27 +768,6 @@ static void iwl_rx_reply_error(struct iwl_priv *priv,
|
|||||||
le32_to_cpu(pkt->u.err_resp.error_info));
|
le32_to_cpu(pkt->u.err_resp.error_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
|
|
||||||
struct iwl_rx_mem_buffer *rxb)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
|
||||||
struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
|
|
||||||
struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
|
|
||||||
IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n",
|
|
||||||
sleep->pm_sleep_mode, sleep->pm_wakeup_src);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
|
|
||||||
struct iwl_rx_mem_buffer *rxb)
|
|
||||||
{
|
|
||||||
struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
|
|
||||||
IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
|
|
||||||
"notification for %s:\n",
|
|
||||||
le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
|
|
||||||
iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void iwl_bg_beacon_update(struct work_struct *work)
|
static void iwl_bg_beacon_update(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct iwl_priv *priv =
|
struct iwl_priv *priv =
|
||||||
|
@ -1979,3 +1979,26 @@ void iwl_bg_rf_kill(struct work_struct *work)
|
|||||||
iwl_rfkill_set_hw_state(priv);
|
iwl_rfkill_set_hw_state(priv);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(iwl_bg_rf_kill);
|
EXPORT_SYMBOL(iwl_bg_rf_kill);
|
||||||
|
|
||||||
|
void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
|
||||||
|
struct iwl_rx_mem_buffer *rxb)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||||
|
struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
|
||||||
|
struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
|
||||||
|
IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n",
|
||||||
|
sleep->pm_sleep_mode, sleep->pm_wakeup_src);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(iwl_rx_pm_sleep_notif);
|
||||||
|
|
||||||
|
void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
|
||||||
|
struct iwl_rx_mem_buffer *rxb)
|
||||||
|
{
|
||||||
|
struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
|
||||||
|
IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
|
||||||
|
"notification for %s:\n",
|
||||||
|
le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
|
||||||
|
iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(iwl_rx_pm_debug_statistics_notif);
|
||||||
|
@ -249,6 +249,14 @@ int iwl_set_hw_params(struct iwl_priv *priv);
|
|||||||
int iwl_init_drv(struct iwl_priv *priv);
|
int iwl_init_drv(struct iwl_priv *priv);
|
||||||
void iwl_uninit_drv(struct iwl_priv *priv);
|
void iwl_uninit_drv(struct iwl_priv *priv);
|
||||||
|
|
||||||
|
/*****************************************************
|
||||||
|
* RX handlers.
|
||||||
|
* **************************************************/
|
||||||
|
void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
|
||||||
|
struct iwl_rx_mem_buffer *rxb);
|
||||||
|
void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
|
||||||
|
struct iwl_rx_mem_buffer *rxb);
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
* RX
|
* RX
|
||||||
******************************************************/
|
******************************************************/
|
||||||
|
@ -1417,28 +1417,6 @@ static void iwl3945_rx_spectrum_measure_notif(struct iwl_priv *priv,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iwl3945_rx_pm_sleep_notif(struct iwl_priv *priv,
|
|
||||||
struct iwl_rx_mem_buffer *rxb)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
|
||||||
struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
|
|
||||||
struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
|
|
||||||
IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n",
|
|
||||||
sleep->pm_sleep_mode, sleep->pm_wakeup_src);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void iwl3945_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
|
|
||||||
struct iwl_rx_mem_buffer *rxb)
|
|
||||||
{
|
|
||||||
struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
|
|
||||||
IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
|
|
||||||
"notification for %s:\n",
|
|
||||||
le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
|
|
||||||
iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw,
|
|
||||||
le32_to_cpu(pkt->len));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void iwl3945_bg_beacon_update(struct work_struct *work)
|
static void iwl3945_bg_beacon_update(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct iwl_priv *priv =
|
struct iwl_priv *priv =
|
||||||
@ -1541,9 +1519,9 @@ static void iwl3945_setup_rx_handlers(struct iwl_priv *priv)
|
|||||||
priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
|
priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
|
||||||
priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
|
priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
|
||||||
iwl3945_rx_spectrum_measure_notif;
|
iwl3945_rx_spectrum_measure_notif;
|
||||||
priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl3945_rx_pm_sleep_notif;
|
priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif;
|
||||||
priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
|
priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
|
||||||
iwl3945_rx_pm_debug_statistics_notif;
|
iwl_rx_pm_debug_statistics_notif;
|
||||||
priv->rx_handlers[BEACON_NOTIFICATION] = iwl3945_rx_beacon_notif;
|
priv->rx_handlers[BEACON_NOTIFICATION] = iwl3945_rx_beacon_notif;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user