aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-01-19 14:11:22 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-01-31 16:19:39 -0500
commit241887a2d3b725fd0f87113bb7c4a51b5c6a2d06 (patch)
tree4cc99d881cbf6eb3242fcf81ab141231fca45bcb /drivers/net/wireless/iwlwifi/iwl-4965.c
parent7b09068721b1a1bbba9372d0293c21d2425b14de (diff)
iwlwifi: fix beacon notification parsing
The beacon notification changed between 4965 and agn because the embedded TX response changed, but iwlwifi was never updated to know about this. Update it now so the IBSS manager status will be tracked correctly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index ace0b98d91ae..8998ed134d1a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2266,6 +2266,29 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2266 spin_unlock_irqrestore(&priv->sta_lock, flags); 2266 spin_unlock_irqrestore(&priv->sta_lock, flags);
2267} 2267}
2268 2268
2269static void iwl4965_rx_beacon_notif(struct iwl_priv *priv,
2270 struct iwl_rx_mem_buffer *rxb)
2271{
2272 struct iwl_rx_packet *pkt = rxb_addr(rxb);
2273 struct iwl4965_beacon_notif *beacon = (void *)pkt->u.raw;
2274#ifdef CONFIG_IWLWIFI_DEBUG
2275 u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags);
2276
2277 IWL_DEBUG_RX(priv, "beacon status %#x, retries:%d ibssmgr:%d "
2278 "tsf:0x%.8x%.8x rate:%d\n",
2279 le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK,
2280 beacon->beacon_notify_hdr.failure_frame,
2281 le32_to_cpu(beacon->ibss_mgr_status),
2282 le32_to_cpu(beacon->high_tsf),
2283 le32_to_cpu(beacon->low_tsf), rate);
2284#endif
2285
2286 priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status);
2287
2288 if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
2289 queue_work(priv->workqueue, &priv->beacon_update);
2290}
2291
2269static int iwl4965_calc_rssi(struct iwl_priv *priv, 2292static int iwl4965_calc_rssi(struct iwl_priv *priv,
2270 struct iwl_rx_phy_res *rx_resp) 2293 struct iwl_rx_phy_res *rx_resp)
2271{ 2294{
@@ -2308,6 +2331,7 @@ static void iwl4965_rx_handler_setup(struct iwl_priv *priv)
2308 priv->rx_handlers[REPLY_RX] = iwlagn_rx_reply_rx; 2331 priv->rx_handlers[REPLY_RX] = iwlagn_rx_reply_rx;
2309 /* Tx response */ 2332 /* Tx response */
2310 priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx; 2333 priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx;
2334 priv->rx_handlers[BEACON_NOTIFICATION] = iwl4965_rx_beacon_notif;
2311 2335
2312 /* set up notification wait support */ 2336 /* set up notification wait support */
2313 spin_lock_init(&priv->_agn.notif_wait_lock); 2337 spin_lock_init(&priv->_agn.notif_wait_lock);