summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-12-05 14:46:06 -0500
committerDavid S. Miller <davem@davemloft.net>2018-12-05 14:46:06 -0500
commit64d47902fea3dcd3f2d0f3366259984dbc31653b (patch)
tree2e45d1a2f499278ac27309fce9c2c12e51958d50 /net
parent0fb628f0f250c74b1023edd0ca4a57c8b35b9b2c (diff)
parent312ca38ddda64bac6513ec68e0ac3789b4eb44dc (diff)
Merge tag 'mac80211-for-davem-2018-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg: ==================== As it's been a while, we have various fixes for * hwsim * AP mode (client powersave related) * CSA/FTM interaction * a busy loop in IE handling * and similar ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c7
-rw-r--r--net/mac80211/iface.c2
-rw-r--r--net/mac80211/mlme.c12
-rw-r--r--net/mac80211/rx.c5
-rw-r--r--net/mac80211/status.c2
-rw-r--r--net/mac80211/tx.c4
-rw-r--r--net/wireless/mlme.c4
-rw-r--r--net/wireless/nl80211.c1
-rw-r--r--net/wireless/sme.c8
-rw-r--r--net/wireless/util.c2
10 files changed, 33 insertions, 14 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 51622333d460..818aa0060349 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2891,7 +2891,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
2891 2891
2892 len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len + 2892 len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len +
2893 beacon->proberesp_ies_len + beacon->assocresp_ies_len + 2893 beacon->proberesp_ies_len + beacon->assocresp_ies_len +
2894 beacon->probe_resp_len; 2894 beacon->probe_resp_len + beacon->lci_len + beacon->civicloc_len;
2895 2895
2896 new_beacon = kzalloc(sizeof(*new_beacon) + len, GFP_KERNEL); 2896 new_beacon = kzalloc(sizeof(*new_beacon) + len, GFP_KERNEL);
2897 if (!new_beacon) 2897 if (!new_beacon)
@@ -2934,8 +2934,9 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
2934 memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); 2934 memcpy(pos, beacon->probe_resp, beacon->probe_resp_len);
2935 pos += beacon->probe_resp_len; 2935 pos += beacon->probe_resp_len;
2936 } 2936 }
2937 if (beacon->ftm_responder) 2937
2938 new_beacon->ftm_responder = beacon->ftm_responder; 2938 /* might copy -1, meaning no changes requested */
2939 new_beacon->ftm_responder = beacon->ftm_responder;
2939 if (beacon->lci) { 2940 if (beacon->lci) {
2940 new_beacon->lci_len = beacon->lci_len; 2941 new_beacon->lci_len = beacon->lci_len;
2941 new_beacon->lci = pos; 2942 new_beacon->lci = pos;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 5836ddeac9e3..5f3c81e705c7 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1015,6 +1015,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
1015 if (local->open_count == 0) 1015 if (local->open_count == 0)
1016 ieee80211_clear_tx_pending(local); 1016 ieee80211_clear_tx_pending(local);
1017 1017
1018 sdata->vif.bss_conf.beacon_int = 0;
1019
1018 /* 1020 /*
1019 * If the interface goes down while suspended, presumably because 1021 * If the interface goes down while suspended, presumably because
1020 * the device was unplugged and that happens before our resume, 1022 * the device was unplugged and that happens before our resume,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d2bc8d57c87e..bcf5ffc1567a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2766,6 +2766,7 @@ static bool ieee80211_mark_sta_auth(struct ieee80211_sub_if_data *sdata,
2766{ 2766{
2767 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 2767 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2768 struct sta_info *sta; 2768 struct sta_info *sta;
2769 bool result = true;
2769 2770
2770 sdata_info(sdata, "authenticated\n"); 2771 sdata_info(sdata, "authenticated\n");
2771 ifmgd->auth_data->done = true; 2772 ifmgd->auth_data->done = true;
@@ -2778,15 +2779,18 @@ static bool ieee80211_mark_sta_auth(struct ieee80211_sub_if_data *sdata,
2778 sta = sta_info_get(sdata, bssid); 2779 sta = sta_info_get(sdata, bssid);
2779 if (!sta) { 2780 if (!sta) {
2780 WARN_ONCE(1, "%s: STA %pM not found", sdata->name, bssid); 2781 WARN_ONCE(1, "%s: STA %pM not found", sdata->name, bssid);
2781 return false; 2782 result = false;
2783 goto out;
2782 } 2784 }
2783 if (sta_info_move_state(sta, IEEE80211_STA_AUTH)) { 2785 if (sta_info_move_state(sta, IEEE80211_STA_AUTH)) {
2784 sdata_info(sdata, "failed moving %pM to auth\n", bssid); 2786 sdata_info(sdata, "failed moving %pM to auth\n", bssid);
2785 return false; 2787 result = false;
2788 goto out;
2786 } 2789 }
2787 mutex_unlock(&sdata->local->sta_mtx);
2788 2790
2789 return true; 2791out:
2792 mutex_unlock(&sdata->local->sta_mtx);
2793 return result;
2790} 2794}
2791 2795
2792static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, 2796static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 3bd3b5769797..428f7ad5f9b5 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1403,6 +1403,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
1403 return RX_CONTINUE; 1403 return RX_CONTINUE;
1404 1404
1405 if (ieee80211_is_ctl(hdr->frame_control) || 1405 if (ieee80211_is_ctl(hdr->frame_control) ||
1406 ieee80211_is_nullfunc(hdr->frame_control) ||
1406 ieee80211_is_qos_nullfunc(hdr->frame_control) || 1407 ieee80211_is_qos_nullfunc(hdr->frame_control) ||
1407 is_multicast_ether_addr(hdr->addr1)) 1408 is_multicast_ether_addr(hdr->addr1))
1408 return RX_CONTINUE; 1409 return RX_CONTINUE;
@@ -3063,7 +3064,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
3063 cfg80211_sta_opmode_change_notify(sdata->dev, 3064 cfg80211_sta_opmode_change_notify(sdata->dev,
3064 rx->sta->addr, 3065 rx->sta->addr,
3065 &sta_opmode, 3066 &sta_opmode,
3066 GFP_KERNEL); 3067 GFP_ATOMIC);
3067 goto handled; 3068 goto handled;
3068 } 3069 }
3069 case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: { 3070 case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: {
@@ -3100,7 +3101,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
3100 cfg80211_sta_opmode_change_notify(sdata->dev, 3101 cfg80211_sta_opmode_change_notify(sdata->dev,
3101 rx->sta->addr, 3102 rx->sta->addr,
3102 &sta_opmode, 3103 &sta_opmode,
3103 GFP_KERNEL); 3104 GFP_ATOMIC);
3104 goto handled; 3105 goto handled;
3105 } 3106 }
3106 default: 3107 default:
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index aa4afbf0abaf..a794ca729000 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -964,6 +964,8 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw,
964 /* Track when last TDLS packet was ACKed */ 964 /* Track when last TDLS packet was ACKed */
965 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) 965 if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH))
966 sta->status_stats.last_tdls_pkt_time = jiffies; 966 sta->status_stats.last_tdls_pkt_time = jiffies;
967 } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) {
968 return;
967 } else { 969 } else {
968 ieee80211_lost_packet(sta, info); 970 ieee80211_lost_packet(sta, info);
969 } 971 }
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e0ccee23fbcd..1f536ba573b4 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -439,8 +439,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
439 if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL)) 439 if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL))
440 info->hw_queue = tx->sdata->vif.cab_queue; 440 info->hw_queue = tx->sdata->vif.cab_queue;
441 441
442 /* no stations in PS mode */ 442 /* no stations in PS mode and no buffered packets */
443 if (!atomic_read(&ps->num_sta_ps)) 443 if (!atomic_read(&ps->num_sta_ps) && skb_queue_empty(&ps->bc_buf))
444 return TX_CONTINUE; 444 return TX_CONTINUE;
445 445
446 info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM; 446 info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM;
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 12b3edf70a7b..1615e503f8e3 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -272,11 +272,11 @@ void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
272 272
273 p1 = (u8*)(ht_capa); 273 p1 = (u8*)(ht_capa);
274 p2 = (u8*)(ht_capa_mask); 274 p2 = (u8*)(ht_capa_mask);
275 for (i = 0; i<sizeof(*ht_capa); i++) 275 for (i = 0; i < sizeof(*ht_capa); i++)
276 p1[i] &= p2[i]; 276 p1[i] &= p2[i];
277} 277}
278 278
279/* Do a logical ht_capa &= ht_capa_mask. */ 279/* Do a logical vht_capa &= vht_capa_mask. */
280void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa, 280void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,
281 const struct ieee80211_vht_cap *vht_capa_mask) 281 const struct ieee80211_vht_cap *vht_capa_mask)
282{ 282{
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 744b5851bbf9..8d763725498c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7870,6 +7870,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
7870 } 7870 }
7871 7871
7872 memset(&params, 0, sizeof(params)); 7872 memset(&params, 0, sizeof(params));
7873 params.beacon_csa.ftm_responder = -1;
7873 7874
7874 if (!info->attrs[NL80211_ATTR_WIPHY_FREQ] || 7875 if (!info->attrs[NL80211_ATTR_WIPHY_FREQ] ||
7875 !info->attrs[NL80211_ATTR_CH_SWITCH_COUNT]) 7876 !info->attrs[NL80211_ATTR_CH_SWITCH_COUNT])
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index d536b07582f8..f741d8376a46 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -642,11 +642,15 @@ static bool cfg80211_is_all_idle(void)
642 * All devices must be idle as otherwise if you are actively 642 * All devices must be idle as otherwise if you are actively
643 * scanning some new beacon hints could be learned and would 643 * scanning some new beacon hints could be learned and would
644 * count as new regulatory hints. 644 * count as new regulatory hints.
645 * Also if there is any other active beaconing interface we
646 * need not issue a disconnect hint and reset any info such
647 * as chan dfs state, etc.
645 */ 648 */
646 list_for_each_entry(rdev, &cfg80211_rdev_list, list) { 649 list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
647 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { 650 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
648 wdev_lock(wdev); 651 wdev_lock(wdev);
649 if (wdev->conn || wdev->current_bss) 652 if (wdev->conn || wdev->current_bss ||
653 cfg80211_beaconing_iface_active(wdev))
650 is_all_idle = false; 654 is_all_idle = false;
651 wdev_unlock(wdev); 655 wdev_unlock(wdev);
652 } 656 }
@@ -1171,6 +1175,8 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
1171 1175
1172 cfg80211_oper_and_ht_capa(&connect->ht_capa_mask, 1176 cfg80211_oper_and_ht_capa(&connect->ht_capa_mask,
1173 rdev->wiphy.ht_capa_mod_mask); 1177 rdev->wiphy.ht_capa_mod_mask);
1178 cfg80211_oper_and_vht_capa(&connect->vht_capa_mask,
1179 rdev->wiphy.vht_capa_mod_mask);
1174 1180
1175 if (connkeys && connkeys->def >= 0) { 1181 if (connkeys && connkeys->def >= 0) {
1176 int idx; 1182 int idx;
diff --git a/net/wireless/util.c b/net/wireless/util.c
index ef14d80ca03e..d473bd135da8 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1421,6 +1421,8 @@ size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen,
1421 ies[pos + ext], 1421 ies[pos + ext],
1422 ext == 2)) 1422 ext == 2))
1423 pos = skip_ie(ies, ielen, pos); 1423 pos = skip_ie(ies, ielen, pos);
1424 else
1425 break;
1424 } 1426 }
1425 } else { 1427 } else {
1426 pos = skip_ie(ies, ielen, pos); 1428 pos = skip_ie(ies, ielen, pos);