diff options
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 22 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 22 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 3 |
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 2f254c4abdd5..1b3e82ff90cb 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 | } |
| 2901 | static 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 d67b53cf7d5b..050549131c47 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); | |||
| 204 | int iwl_rx_queue_restock(struct iwl_priv *priv); | 204 | int iwl_rx_queue_restock(struct iwl_priv *priv); |
| 205 | int iwl_rx_queue_space(const struct iwl_rx_queue *q); | 205 | int iwl_rx_queue_space(const struct iwl_rx_queue *q); |
| 206 | void iwl_rx_allocate(struct iwl_priv *priv); | 206 | void iwl_rx_allocate(struct iwl_priv *priv); |
| 207 | /* Handlers */ | ||
| 208 | void 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 ed63e5c76f3c..cc61c937320f 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 | } |
| 447 | EXPORT_SYMBOL(iwl_rxq_stop); | 448 | EXPORT_SYMBOL(iwl_rxq_stop); |
| 448 | 449 | ||
| 450 | void 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 | } | ||
| 470 | EXPORT_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 f3815b79b6af..b3c180723489 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 | } |
