diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-04-23 14:43:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-23 14:43:45 -0400 |
commit | 3b51cc996e81d8a113416d8094fa4a88f8360a51 (patch) | |
tree | e75b98b228bb4e456c30673fcc4b56ffa1d09cf5 /net/mac80211 | |
parent | c68ed255265968c3948fa2678bf59d15c471b055 (diff) | |
parent | 672724403b42da1d276c6cf811e8e34d15efd964 (diff) |
Merge branch 'master' into for-davem
Conflicts:
drivers/net/wireless/ath/ath9k/phy.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-debugfs.c
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/agg-rx.c | 18 | ||||
-rw-r--r-- | net/mac80211/agg-tx.c | 2 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 12 | ||||
-rw-r--r-- | net/mac80211/driver-ops.h | 9 | ||||
-rw-r--r-- | net/mac80211/key.c | 1 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 5 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 13 | ||||
-rw-r--r-- | net/mac80211/tx.c | 7 |
8 files changed, 58 insertions, 9 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 9598fdb4ad01..6bb9a9a94960 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -19,8 +19,9 @@ | |||
19 | #include "ieee80211_i.h" | 19 | #include "ieee80211_i.h" |
20 | #include "driver-ops.h" | 20 | #include "driver-ops.h" |
21 | 21 | ||
22 | void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | 22 | static void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, |
23 | u16 initiator, u16 reason) | 23 | u16 initiator, u16 reason, |
24 | bool from_timer) | ||
24 | { | 25 | { |
25 | struct ieee80211_local *local = sta->local; | 26 | struct ieee80211_local *local = sta->local; |
26 | struct tid_ampdu_rx *tid_rx; | 27 | struct tid_ampdu_rx *tid_rx; |
@@ -70,10 +71,17 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
70 | 71 | ||
71 | spin_unlock_bh(&sta->lock); | 72 | spin_unlock_bh(&sta->lock); |
72 | 73 | ||
73 | del_timer_sync(&tid_rx->session_timer); | 74 | if (!from_timer) |
75 | del_timer_sync(&tid_rx->session_timer); | ||
74 | kfree(tid_rx); | 76 | kfree(tid_rx); |
75 | } | 77 | } |
76 | 78 | ||
79 | void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | ||
80 | u16 initiator, u16 reason) | ||
81 | { | ||
82 | ___ieee80211_stop_rx_ba_session(sta, tid, initiator, reason, false); | ||
83 | } | ||
84 | |||
77 | /* | 85 | /* |
78 | * After accepting the AddBA Request we activated a timer, | 86 | * After accepting the AddBA Request we activated a timer, |
79 | * resetting it after each frame that arrives from the originator. | 87 | * resetting it after each frame that arrives from the originator. |
@@ -92,8 +100,8 @@ static void sta_rx_agg_session_timer_expired(unsigned long data) | |||
92 | #ifdef CONFIG_MAC80211_HT_DEBUG | 100 | #ifdef CONFIG_MAC80211_HT_DEBUG |
93 | printk(KERN_DEBUG "rx session timer expired on tid %d\n", (u16)*ptid); | 101 | printk(KERN_DEBUG "rx session timer expired on tid %d\n", (u16)*ptid); |
94 | #endif | 102 | #endif |
95 | __ieee80211_stop_rx_ba_session(sta, *ptid, WLAN_BACK_RECIPIENT, | 103 | ___ieee80211_stop_rx_ba_session(sta, *ptid, WLAN_BACK_RECIPIENT, |
96 | WLAN_REASON_QSTA_TIMEOUT); | 104 | WLAN_REASON_QSTA_TIMEOUT, true); |
97 | } | 105 | } |
98 | 106 | ||
99 | static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *da, u16 tid, | 107 | static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *da, u16 tid, |
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 555c6a14a6fa..c163d0a149f4 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -186,7 +186,7 @@ static void sta_addba_resp_timer_expired(unsigned long data) | |||
186 | spin_unlock_bh(&sta->lock); | 186 | spin_unlock_bh(&sta->lock); |
187 | #ifdef CONFIG_MAC80211_HT_DEBUG | 187 | #ifdef CONFIG_MAC80211_HT_DEBUG |
188 | printk(KERN_DEBUG "timer expired on tid %d but we are not " | 188 | printk(KERN_DEBUG "timer expired on tid %d but we are not " |
189 | "(or no longer) expecting addBA response there", | 189 | "(or no longer) expecting addBA response there\n", |
190 | tid); | 190 | tid); |
191 | #endif | 191 | #endif |
192 | return; | 192 | return; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7dd7cda75cfa..845a6e6b9d89 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -411,6 +411,17 @@ static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev, | |||
411 | return ret; | 411 | return ret; |
412 | } | 412 | } |
413 | 413 | ||
414 | static int ieee80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, | ||
415 | int idx, struct survey_info *survey) | ||
416 | { | ||
417 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
418 | |||
419 | if (!local->ops->get_survey) | ||
420 | return -EOPNOTSUPP; | ||
421 | |||
422 | return drv_get_survey(local, idx, survey); | ||
423 | } | ||
424 | |||
414 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, | 425 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, |
415 | u8 *mac, struct station_info *sinfo) | 426 | u8 *mac, struct station_info *sinfo) |
416 | { | 427 | { |
@@ -1508,6 +1519,7 @@ struct cfg80211_ops mac80211_config_ops = { | |||
1508 | .change_station = ieee80211_change_station, | 1519 | .change_station = ieee80211_change_station, |
1509 | .get_station = ieee80211_get_station, | 1520 | .get_station = ieee80211_get_station, |
1510 | .dump_station = ieee80211_dump_station, | 1521 | .dump_station = ieee80211_dump_station, |
1522 | .dump_survey = ieee80211_dump_survey, | ||
1511 | #ifdef CONFIG_MAC80211_MESH | 1523 | #ifdef CONFIG_MAC80211_MESH |
1512 | .add_mpath = ieee80211_add_mpath, | 1524 | .add_mpath = ieee80211_add_mpath, |
1513 | .del_mpath = ieee80211_del_mpath, | 1525 | .del_mpath = ieee80211_del_mpath, |
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 9179196da264..35e1e581e806 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -344,6 +344,15 @@ static inline int drv_ampdu_action(struct ieee80211_local *local, | |||
344 | return ret; | 344 | return ret; |
345 | } | 345 | } |
346 | 346 | ||
347 | static inline int drv_get_survey(struct ieee80211_local *local, int idx, | ||
348 | struct survey_info *survey) | ||
349 | { | ||
350 | int ret = -EOPNOTSUPP; | ||
351 | if (local->ops->conf_tx) | ||
352 | ret = local->ops->get_survey(&local->hw, idx, survey); | ||
353 | /* trace_drv_get_survey(local, idx, survey, ret); */ | ||
354 | return ret; | ||
355 | } | ||
347 | 356 | ||
348 | static inline void drv_rfkill_poll(struct ieee80211_local *local) | 357 | static inline void drv_rfkill_poll(struct ieee80211_local *local) |
349 | { | 358 | { |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index e8f6e3b252d8..8d4b41787dcf 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -140,6 +140,7 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key) | |||
140 | struct ieee80211_sub_if_data, | 140 | struct ieee80211_sub_if_data, |
141 | u.ap); | 141 | u.ap); |
142 | 142 | ||
143 | key->conf.ap_addr = sdata->dev->dev_addr; | ||
143 | ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf); | 144 | ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf); |
144 | 145 | ||
145 | if (!ret) { | 146 | if (!ret) { |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 3133681bdaa0..425f66c70013 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1333,12 +1333,17 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
1333 | mutex_lock(&sdata->local->iflist_mtx); | 1333 | mutex_lock(&sdata->local->iflist_mtx); |
1334 | ieee80211_recalc_ps(sdata->local, -1); | 1334 | ieee80211_recalc_ps(sdata->local, -1); |
1335 | mutex_unlock(&sdata->local->iflist_mtx); | 1335 | mutex_unlock(&sdata->local->iflist_mtx); |
1336 | |||
1337 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | ||
1338 | return; | ||
1339 | |||
1336 | /* | 1340 | /* |
1337 | * We've received a probe response, but are not sure whether | 1341 | * We've received a probe response, but are not sure whether |
1338 | * we have or will be receiving any beacons or data, so let's | 1342 | * we have or will be receiving any beacons or data, so let's |
1339 | * schedule the timers again, just in case. | 1343 | * schedule the timers again, just in case. |
1340 | */ | 1344 | */ |
1341 | mod_beacon_timer(sdata); | 1345 | mod_beacon_timer(sdata); |
1346 | |||
1342 | mod_timer(&ifmgd->conn_mon_timer, | 1347 | mod_timer(&ifmgd->conn_mon_timer, |
1343 | round_jiffies_up(jiffies + | 1348 | round_jiffies_up(jiffies + |
1344 | IEEE80211_CONNECTION_IDLE_TIME)); | 1349 | IEEE80211_CONNECTION_IDLE_TIME)); |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index ff0eb948917b..3de7a2260d65 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -575,7 +575,7 @@ static int sta_info_buffer_expired(struct sta_info *sta, | |||
575 | } | 575 | } |
576 | 576 | ||
577 | 577 | ||
578 | static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | 578 | static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, |
579 | struct sta_info *sta) | 579 | struct sta_info *sta) |
580 | { | 580 | { |
581 | unsigned long flags; | 581 | unsigned long flags; |
@@ -583,7 +583,7 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
583 | struct ieee80211_sub_if_data *sdata; | 583 | struct ieee80211_sub_if_data *sdata; |
584 | 584 | ||
585 | if (skb_queue_empty(&sta->ps_tx_buf)) | 585 | if (skb_queue_empty(&sta->ps_tx_buf)) |
586 | return; | 586 | return false; |
587 | 587 | ||
588 | for (;;) { | 588 | for (;;) { |
589 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); | 589 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); |
@@ -608,6 +608,8 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
608 | if (skb_queue_empty(&sta->ps_tx_buf)) | 608 | if (skb_queue_empty(&sta->ps_tx_buf)) |
609 | sta_info_clear_tim_bit(sta); | 609 | sta_info_clear_tim_bit(sta); |
610 | } | 610 | } |
611 | |||
612 | return true; | ||
611 | } | 613 | } |
612 | 614 | ||
613 | static int __must_check __sta_info_destroy(struct sta_info *sta) | 615 | static int __must_check __sta_info_destroy(struct sta_info *sta) |
@@ -755,15 +757,20 @@ static void sta_info_cleanup(unsigned long data) | |||
755 | { | 757 | { |
756 | struct ieee80211_local *local = (struct ieee80211_local *) data; | 758 | struct ieee80211_local *local = (struct ieee80211_local *) data; |
757 | struct sta_info *sta; | 759 | struct sta_info *sta; |
760 | bool timer_needed = false; | ||
758 | 761 | ||
759 | rcu_read_lock(); | 762 | rcu_read_lock(); |
760 | list_for_each_entry_rcu(sta, &local->sta_list, list) | 763 | list_for_each_entry_rcu(sta, &local->sta_list, list) |
761 | sta_info_cleanup_expire_buffered(local, sta); | 764 | if (sta_info_cleanup_expire_buffered(local, sta)) |
765 | timer_needed = true; | ||
762 | rcu_read_unlock(); | 766 | rcu_read_unlock(); |
763 | 767 | ||
764 | if (local->quiescing) | 768 | if (local->quiescing) |
765 | return; | 769 | return; |
766 | 770 | ||
771 | if (!timer_needed) | ||
772 | return; | ||
773 | |||
767 | local->sta_cleanup.expires = | 774 | local->sta_cleanup.expires = |
768 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL); | 775 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL); |
769 | add_timer(&local->sta_cleanup); | 776 | add_timer(&local->sta_cleanup); |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 2cb77267f733..e2aa972d584f 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -429,6 +429,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
429 | struct sta_info *sta = tx->sta; | 429 | struct sta_info *sta = tx->sta; |
430 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); | 430 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); |
431 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; | 431 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; |
432 | struct ieee80211_local *local = tx->local; | ||
432 | u32 staflags; | 433 | u32 staflags; |
433 | 434 | ||
434 | if (unlikely(!sta || | 435 | if (unlikely(!sta || |
@@ -476,6 +477,12 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
476 | info->control.vif = &tx->sdata->vif; | 477 | info->control.vif = &tx->sdata->vif; |
477 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 478 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
478 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); | 479 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); |
480 | |||
481 | if (!timer_pending(&local->sta_cleanup)) | ||
482 | mod_timer(&local->sta_cleanup, | ||
483 | round_jiffies(jiffies + | ||
484 | STA_INFO_CLEANUP_INTERVAL)); | ||
485 | |||
479 | return TX_QUEUED; | 486 | return TX_QUEUED; |
480 | } | 487 | } |
481 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 488 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |