aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 04:35:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:23 -0400
commitc135475439f75e6eb29e7586d33f3e22a61c1bb4 (patch)
treef61744e32c13b6a0f5a28f4b4dae96f4cfa2bc9e /drivers/net/wireless/iwlwifi
parent42132bce8011bf9507cfbb920ced2235d8dd5fce (diff)
iwlwifi: move iwl_rx_missed_beacon_notif to iwl-rx.c
This patch moves iwl_rx_missed_beacon_notif rx handler to iwl-rx.c. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c22
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c22
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c3
4 files changed, 28 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 2f254c4abdd..1b3e82ff90c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2898,26 +2898,7 @@ static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv,
2898 memcpy(&priv->last_phy_res[1], &(pkt->u.raw[0]), 2898 memcpy(&priv->last_phy_res[1], &(pkt->u.raw[0]),
2899 sizeof(struct iwl4965_rx_phy_res)); 2899 sizeof(struct iwl4965_rx_phy_res));
2900} 2900}
2901static void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv,
2902 struct iwl_rx_mem_buffer *rxb)
2903 2901
2904{
2905#ifdef CONFIG_IWL4965_RUN_TIME_CALIB
2906 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
2907 struct iwl4965_missed_beacon_notif *missed_beacon;
2908
2909 missed_beacon = &pkt->u.missed_beacon;
2910 if (le32_to_cpu(missed_beacon->consequtive_missed_beacons) > 5) {
2911 IWL_DEBUG_CALIB("missed bcn cnsq %d totl %d rcd %d expctd %d\n",
2912 le32_to_cpu(missed_beacon->consequtive_missed_beacons),
2913 le32_to_cpu(missed_beacon->total_missed_becons),
2914 le32_to_cpu(missed_beacon->num_recvd_beacons),
2915 le32_to_cpu(missed_beacon->num_expected_beacons));
2916 if (!test_bit(STATUS_SCANNING, &priv->status))
2917 iwl_init_sensitivity(priv);
2918 }
2919#endif /*CONFIG_IWL4965_RUN_TIME_CALIB*/
2920}
2921#ifdef CONFIG_IWL4965_HT 2902#ifdef CONFIG_IWL4965_HT
2922 2903
2923/** 2904/**
@@ -3508,9 +3489,6 @@ static void iwl4965_rx_handler_setup(struct iwl_priv *priv)
3508 priv->rx_handlers[REPLY_RX_PHY_CMD] = iwl4965_rx_reply_rx_phy; 3489 priv->rx_handlers[REPLY_RX_PHY_CMD] = iwl4965_rx_reply_rx_phy;
3509 priv->rx_handlers[REPLY_RX_MPDU_CMD] = iwl4965_rx_reply_rx; 3490 priv->rx_handlers[REPLY_RX_MPDU_CMD] = iwl4965_rx_reply_rx;
3510 3491
3511 priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] =
3512 iwl4965_rx_missed_beacon_notif;
3513
3514#ifdef CONFIG_IWL4965_HT 3492#ifdef CONFIG_IWL4965_HT
3515 priv->rx_handlers[REPLY_COMPRESSED_BA] = iwl4965_rx_reply_compressed_ba; 3493 priv->rx_handlers[REPLY_COMPRESSED_BA] = iwl4965_rx_reply_compressed_ba;
3516#endif /* CONFIG_IWL4965_HT */ 3494#endif /* CONFIG_IWL4965_HT */
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index d67b53cf7d5..050549131c4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -204,6 +204,9 @@ int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
204int iwl_rx_queue_restock(struct iwl_priv *priv); 204int iwl_rx_queue_restock(struct iwl_priv *priv);
205int iwl_rx_queue_space(const struct iwl_rx_queue *q); 205int iwl_rx_queue_space(const struct iwl_rx_queue *q);
206void iwl_rx_allocate(struct iwl_priv *priv); 206void iwl_rx_allocate(struct iwl_priv *priv);
207/* Handlers */
208void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
209 struct iwl_rx_mem_buffer *rxb);
207 210
208/***************************************************** 211/*****************************************************
209* TX 212* TX
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index ed63e5c76f3..cc61c937320 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -33,6 +33,7 @@
33#include "iwl-core.h" 33#include "iwl-core.h"
34#include "iwl-sta.h" 34#include "iwl-sta.h"
35#include "iwl-io.h" 35#include "iwl-io.h"
36#include "iwl-calib.h"
36#include "iwl-helpers.h" 37#include "iwl-helpers.h"
37/************************** RX-FUNCTIONS ****************************/ 38/************************** RX-FUNCTIONS ****************************/
38/* 39/*
@@ -446,3 +447,24 @@ int iwl_rxq_stop(struct iwl_priv *priv)
446} 447}
447EXPORT_SYMBOL(iwl_rxq_stop); 448EXPORT_SYMBOL(iwl_rxq_stop);
448 449
450void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
451 struct iwl_rx_mem_buffer *rxb)
452
453{
454#ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB
455 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
456 struct iwl4965_missed_beacon_notif *missed_beacon;
457
458 missed_beacon = &pkt->u.missed_beacon;
459 if (le32_to_cpu(missed_beacon->consequtive_missed_beacons) > 5) {
460 IWL_DEBUG_CALIB("missed bcn cnsq %d totl %d rcd %d expctd %d\n",
461 le32_to_cpu(missed_beacon->consequtive_missed_beacons),
462 le32_to_cpu(missed_beacon->total_missed_becons),
463 le32_to_cpu(missed_beacon->num_recvd_beacons),
464 le32_to_cpu(missed_beacon->num_expected_beacons));
465 if (!test_bit(STATUS_SCANNING, &priv->status))
466 iwl_init_sensitivity(priv);
467 }
468#endif /* CONFIG_IWLWIFI_RUN_TIME_CALIB */
469}
470EXPORT_SYMBOL(iwl_rx_missed_beacon_notif);
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index f3815b79b6a..b3c18072348 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2255,6 +2255,9 @@ static void iwl4965_setup_rx_handlers(struct iwl_priv *priv)
2255 priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl4965_rx_card_state_notif; 2255 priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl4965_rx_card_state_notif;
2256 priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx; 2256 priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx;
2257 2257
2258 priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] =
2259 iwl_rx_missed_beacon_notif;
2260
2258 /* Set up hardware specific Rx handlers */ 2261 /* Set up hardware specific Rx handlers */
2259 priv->cfg->ops->lib->rx_handler_setup(priv); 2262 priv->cfg->ops->lib->rx_handler_setup(priv);
2260} 2263}