aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 38996a44aa8e..0cb822cc12e9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -54,6 +54,12 @@
54 */ 54 */
55#define IEEE80211_SIGNAL_AVE_WEIGHT 3 55#define IEEE80211_SIGNAL_AVE_WEIGHT 3
56 56
57/*
58 * How many Beacon frames need to have been used in average signal strength
59 * before starting to indicate signal change events.
60 */
61#define IEEE80211_SIGNAL_AVE_MIN_COUNT 4
62
57#define TMR_RUNNING_TIMER 0 63#define TMR_RUNNING_TIMER 0
58#define TMR_RUNNING_CHANSW 1 64#define TMR_RUNNING_CHANSW 1
59 65
@@ -778,16 +784,17 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
778 params.uapsd = uapsd; 784 params.uapsd = uapsd;
779 785
780#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 786#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
781 printk(KERN_DEBUG "%s: WMM queue=%d aci=%d acm=%d aifs=%d " 787 wiphy_debug(local->hw.wiphy,
782 "cWmin=%d cWmax=%d txop=%d uapsd=%d\n", 788 "WMM queue=%d aci=%d acm=%d aifs=%d "
783 wiphy_name(local->hw.wiphy), queue, aci, acm, 789 "cWmin=%d cWmax=%d txop=%d uapsd=%d\n",
784 params.aifs, params.cw_min, params.cw_max, params.txop, 790 queue, aci, acm,
785 params.uapsd); 791 params.aifs, params.cw_min, params.cw_max,
792 params.txop, params.uapsd);
786#endif 793#endif
787 if (drv_conf_tx(local, queue, &params)) 794 if (drv_conf_tx(local, queue, &params))
788 printk(KERN_DEBUG "%s: failed to set TX queue " 795 wiphy_debug(local->hw.wiphy,
789 "parameters for queue %d\n", 796 "failed to set TX queue parameters for queue %d\n",
790 wiphy_name(local->hw.wiphy), queue); 797 queue);
791 } 798 }
792 799
793 /* enable WMM or activate new settings */ 800 /* enable WMM or activate new settings */
@@ -990,6 +997,11 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
990 997
991 if (remove_sta) 998 if (remove_sta)
992 sta_info_destroy_addr(sdata, bssid); 999 sta_info_destroy_addr(sdata, bssid);
1000
1001 del_timer_sync(&sdata->u.mgd.conn_mon_timer);
1002 del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
1003 del_timer_sync(&sdata->u.mgd.timer);
1004 del_timer_sync(&sdata->u.mgd.chswitch_timer);
993} 1005}
994 1006
995void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, 1007void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
@@ -1547,15 +1559,18 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1547 ifmgd->last_beacon_signal = rx_status->signal; 1559 ifmgd->last_beacon_signal = rx_status->signal;
1548 if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) { 1560 if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) {
1549 ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE; 1561 ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
1550 ifmgd->ave_beacon_signal = rx_status->signal; 1562 ifmgd->ave_beacon_signal = rx_status->signal * 16;
1551 ifmgd->last_cqm_event_signal = 0; 1563 ifmgd->last_cqm_event_signal = 0;
1564 ifmgd->count_beacon_signal = 1;
1552 } else { 1565 } else {
1553 ifmgd->ave_beacon_signal = 1566 ifmgd->ave_beacon_signal =
1554 (IEEE80211_SIGNAL_AVE_WEIGHT * rx_status->signal * 16 + 1567 (IEEE80211_SIGNAL_AVE_WEIGHT * rx_status->signal * 16 +
1555 (16 - IEEE80211_SIGNAL_AVE_WEIGHT) * 1568 (16 - IEEE80211_SIGNAL_AVE_WEIGHT) *
1556 ifmgd->ave_beacon_signal) / 16; 1569 ifmgd->ave_beacon_signal) / 16;
1570 ifmgd->count_beacon_signal++;
1557 } 1571 }
1558 if (bss_conf->cqm_rssi_thold && 1572 if (bss_conf->cqm_rssi_thold &&
1573 ifmgd->count_beacon_signal >= IEEE80211_SIGNAL_AVE_MIN_COUNT &&
1559 !(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) { 1574 !(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) {
1560 int sig = ifmgd->ave_beacon_signal / 16; 1575 int sig = ifmgd->ave_beacon_signal / 16;
1561 int last_event = ifmgd->last_cqm_event_signal; 1576 int last_event = ifmgd->last_cqm_event_signal;
@@ -2261,6 +2276,9 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
2261 else 2276 else
2262 ifmgd->flags &= ~IEEE80211_STA_CONTROL_PORT; 2277 ifmgd->flags &= ~IEEE80211_STA_CONTROL_PORT;
2263 2278
2279 sdata->control_port_protocol = req->crypto.control_port_ethertype;
2280 sdata->control_port_no_encrypt = req->crypto.control_port_no_encrypt;
2281
2264 ieee80211_add_work(wk); 2282 ieee80211_add_work(wk);
2265 return 0; 2283 return 0;
2266} 2284}