aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2009-02-18 18:54:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:45 -0500
commit030f05eda6ee4d0ed63a93f4f9ebae42c46fb8b6 (patch)
treef71475a3ab13ddbefe24ed01fc84b10897c1ecab /drivers/net/wireless
parente9dde6f6edf9954e2c75d2d738cae0f00e9b0fbc (diff)
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c23
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c26
4 files changed, 33 insertions, 45 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e6168672a534..0928b890ee7c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -768,27 +768,6 @@ static void iwl_rx_reply_error(struct iwl_priv *priv,
768 le32_to_cpu(pkt->u.err_resp.error_info)); 768 le32_to_cpu(pkt->u.err_resp.error_info));
769} 769}
770 770
771static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
772 struct iwl_rx_mem_buffer *rxb)
773{
774#ifdef CONFIG_IWLWIFI_DEBUG
775 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
776 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
777 IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n",
778 sleep->pm_sleep_mode, sleep->pm_wakeup_src);
779#endif
780}
781
782static void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
783 struct iwl_rx_mem_buffer *rxb)
784{
785 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
786 IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
787 "notification for %s:\n",
788 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
789 iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
790}
791
792static void iwl_bg_beacon_update(struct work_struct *work) 771static void iwl_bg_beacon_update(struct work_struct *work)
793{ 772{
794 struct iwl_priv *priv = 773 struct iwl_priv *priv =
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 4a510441dcf9..7a2c695057e3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1979,3 +1979,26 @@ void iwl_bg_rf_kill(struct work_struct *work)
1979 iwl_rfkill_set_hw_state(priv); 1979 iwl_rfkill_set_hw_state(priv);
1980} 1980}
1981EXPORT_SYMBOL(iwl_bg_rf_kill); 1981EXPORT_SYMBOL(iwl_bg_rf_kill);
1982
1983void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
1984 struct iwl_rx_mem_buffer *rxb)
1985{
1986#ifdef CONFIG_IWLWIFI_DEBUG
1987 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
1988 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
1989 IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n",
1990 sleep->pm_sleep_mode, sleep->pm_wakeup_src);
1991#endif
1992}
1993EXPORT_SYMBOL(iwl_rx_pm_sleep_notif);
1994
1995void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
1996 struct iwl_rx_mem_buffer *rxb)
1997{
1998 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
1999 IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
2000 "notification for %s:\n",
2001 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
2002 iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
2003}
2004EXPORT_SYMBOL(iwl_rx_pm_debug_statistics_notif);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index f3aa07c99c6e..8ecbe4bc8fa0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -250,6 +250,14 @@ int iwl_init_drv(struct iwl_priv *priv);
250void iwl_uninit_drv(struct iwl_priv *priv); 250void iwl_uninit_drv(struct iwl_priv *priv);
251 251
252/***************************************************** 252/*****************************************************
253 * RX handlers.
254 * **************************************************/
255void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
256 struct iwl_rx_mem_buffer *rxb);
257void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
258 struct iwl_rx_mem_buffer *rxb);
259
260/*****************************************************
253* RX 261* RX
254******************************************************/ 262******************************************************/
255void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq); 263void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 6d816ebd7cea..abb9cd39bcda 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1417,28 +1417,6 @@ static void iwl3945_rx_spectrum_measure_notif(struct iwl_priv *priv,
1417#endif 1417#endif
1418} 1418}
1419 1419
1420static void iwl3945_rx_pm_sleep_notif(struct iwl_priv *priv,
1421 struct iwl_rx_mem_buffer *rxb)
1422{
1423#ifdef CONFIG_IWLWIFI_DEBUG
1424 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
1425 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
1426 IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n",
1427 sleep->pm_sleep_mode, sleep->pm_wakeup_src);
1428#endif
1429}
1430
1431static void iwl3945_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
1432 struct iwl_rx_mem_buffer *rxb)
1433{
1434 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
1435 IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
1436 "notification for %s:\n",
1437 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
1438 iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw,
1439 le32_to_cpu(pkt->len));
1440}
1441
1442static void iwl3945_bg_beacon_update(struct work_struct *work) 1420static void iwl3945_bg_beacon_update(struct work_struct *work)
1443{ 1421{
1444 struct iwl_priv *priv = 1422 struct iwl_priv *priv =
@@ -1541,9 +1519,9 @@ static void iwl3945_setup_rx_handlers(struct iwl_priv *priv)
1541 priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa; 1519 priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
1542 priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] = 1520 priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
1543 iwl3945_rx_spectrum_measure_notif; 1521 iwl3945_rx_spectrum_measure_notif;
1544 priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl3945_rx_pm_sleep_notif; 1522 priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif;
1545 priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = 1523 priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
1546 iwl3945_rx_pm_debug_statistics_notif; 1524 iwl_rx_pm_debug_statistics_notif;
1547 priv->rx_handlers[BEACON_NOTIFICATION] = iwl3945_rx_beacon_notif; 1525 priv->rx_handlers[BEACON_NOTIFICATION] = iwl3945_rx_beacon_notif;
1548 1526
1549 /* 1527 /*