diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ht.c | 25 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 4 | ||||
-rw-r--r-- | net/mac80211/main.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 8 | ||||
-rw-r--r-- | net/mac80211/tx.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 12 |
6 files changed, 52 insertions, 3 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 3787455fb696..d7dcee680728 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -34,9 +34,28 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, | |||
34 | 34 | ||
35 | ht_cap->ht_supported = true; | 35 | ht_cap->ht_supported = true; |
36 | 36 | ||
37 | ht_cap->cap = le16_to_cpu(ht_cap_ie->cap_info) & sband->ht_cap.cap; | 37 | /* |
38 | ht_cap->cap &= ~IEEE80211_HT_CAP_SM_PS; | 38 | * The bits listed in this expression should be |
39 | ht_cap->cap |= sband->ht_cap.cap & IEEE80211_HT_CAP_SM_PS; | 39 | * the same for the peer and us, if the station |
40 | * advertises more then we can't use those thus | ||
41 | * we mask them out. | ||
42 | */ | ||
43 | ht_cap->cap = le16_to_cpu(ht_cap_ie->cap_info) & | ||
44 | (sband->ht_cap.cap | | ||
45 | ~(IEEE80211_HT_CAP_LDPC_CODING | | ||
46 | IEEE80211_HT_CAP_SUP_WIDTH_20_40 | | ||
47 | IEEE80211_HT_CAP_GRN_FLD | | ||
48 | IEEE80211_HT_CAP_SGI_20 | | ||
49 | IEEE80211_HT_CAP_SGI_40 | | ||
50 | IEEE80211_HT_CAP_DSSSCCK40)); | ||
51 | /* | ||
52 | * The STBC bits are asymmetric -- if we don't have | ||
53 | * TX then mask out the peer's RX and vice versa. | ||
54 | */ | ||
55 | if (!(sband->ht_cap.cap & IEEE80211_HT_CAP_TX_STBC)) | ||
56 | ht_cap->cap &= ~IEEE80211_HT_CAP_RX_STBC; | ||
57 | if (!(sband->ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)) | ||
58 | ht_cap->cap &= ~IEEE80211_HT_CAP_TX_STBC; | ||
40 | 59 | ||
41 | ampdu_info = ht_cap_ie->ampdu_params_info; | 60 | ampdu_info = ht_cap_ie->ampdu_params_info; |
42 | ht_cap->ampdu_factor = | 61 | ht_cap->ampdu_factor = |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 10d13856f86c..1f2db647bb5c 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -382,6 +382,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
382 | struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | 382 | struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, |
383 | u8 *bssid,u8 *addr, u32 supp_rates) | 383 | u8 *bssid,u8 *addr, u32 supp_rates) |
384 | { | 384 | { |
385 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | ||
385 | struct ieee80211_local *local = sdata->local; | 386 | struct ieee80211_local *local = sdata->local; |
386 | struct sta_info *sta; | 387 | struct sta_info *sta; |
387 | int band = local->hw.conf.channel->band; | 388 | int band = local->hw.conf.channel->band; |
@@ -397,6 +398,9 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
397 | return NULL; | 398 | return NULL; |
398 | } | 399 | } |
399 | 400 | ||
401 | if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) | ||
402 | return NULL; | ||
403 | |||
400 | if (compare_ether_addr(bssid, sdata->u.ibss.bssid)) | 404 | if (compare_ether_addr(bssid, sdata->u.ibss.bssid)) |
401 | return NULL; | 405 | return NULL; |
402 | 406 | ||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 8116d1a96a4a..0d2d94881f1f 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -515,6 +515,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
515 | * and we need some headroom for passing the frame to monitor | 515 | * and we need some headroom for passing the frame to monitor |
516 | * interfaces, but never both at the same time. | 516 | * interfaces, but never both at the same time. |
517 | */ | 517 | */ |
518 | BUILD_BUG_ON(IEEE80211_TX_STATUS_HEADROOM != | ||
519 | sizeof(struct ieee80211_tx_status_rtap_hdr)); | ||
518 | local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom, | 520 | local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom, |
519 | sizeof(struct ieee80211_tx_status_rtap_hdr)); | 521 | sizeof(struct ieee80211_tx_status_rtap_hdr)); |
520 | 522 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d8d50fb5e823..c79e59f82fd9 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -915,6 +915,14 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
915 | sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL | | 915 | sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL | |
916 | IEEE80211_STA_BEACON_POLL); | 916 | IEEE80211_STA_BEACON_POLL); |
917 | 917 | ||
918 | /* | ||
919 | * Always handle WMM once after association regardless | ||
920 | * of the first value the AP uses. Setting -1 here has | ||
921 | * that effect because the AP values is an unsigned | ||
922 | * 4-bit value. | ||
923 | */ | ||
924 | sdata->u.mgd.wmm_last_param_set = -1; | ||
925 | |||
918 | ieee80211_led_assoc(local, 1); | 926 | ieee80211_led_assoc(local, 1); |
919 | 927 | ||
920 | sdata->vif.bss_conf.assoc = 1; | 928 | sdata->vif.bss_conf.assoc = 1; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8834cc93c716..27ceaefd7bc8 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1419,6 +1419,10 @@ static bool need_dynamic_ps(struct ieee80211_local *local) | |||
1419 | if (!local->ps_sdata) | 1419 | if (!local->ps_sdata) |
1420 | return false; | 1420 | return false; |
1421 | 1421 | ||
1422 | /* No point if we're going to suspend */ | ||
1423 | if (local->quiescing) | ||
1424 | return false; | ||
1425 | |||
1422 | return true; | 1426 | return true; |
1423 | } | 1427 | } |
1424 | 1428 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 78a6e924c7e1..dc76267e436e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1039,7 +1039,19 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1039 | 1039 | ||
1040 | /* restart hardware */ | 1040 | /* restart hardware */ |
1041 | if (local->open_count) { | 1041 | if (local->open_count) { |
1042 | /* | ||
1043 | * Upon resume hardware can sometimes be goofy due to | ||
1044 | * various platform / driver / bus issues, so restarting | ||
1045 | * the device may at times not work immediately. Propagate | ||
1046 | * the error. | ||
1047 | */ | ||
1042 | res = drv_start(local); | 1048 | res = drv_start(local); |
1049 | if (res) { | ||
1050 | WARN(local->suspended, "Harware became unavailable " | ||
1051 | "upon resume. This is could be a software issue" | ||
1052 | "prior to suspend or a harware issue\n"); | ||
1053 | return res; | ||
1054 | } | ||
1043 | 1055 | ||
1044 | ieee80211_led_radio(local, true); | 1056 | ieee80211_led_radio(local, true); |
1045 | } | 1057 | } |