Merge tag 'mac80211-next-for-davem-2020-08-03' of git://git.kernel.org/pub/scm/linux...
authorDavid S. Miller <davem@davemloft.net>
Tue, 4 Aug 2020 01:00:22 +0000 (18:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Aug 2020 01:00:22 +0000 (18:00 -0700)
Johannes Berg says:

====================
A few more changes, notably:
 * handle new SAE (WPA3 authentication) status codes in the correct way
 * fix a while that should be an if instead, avoiding infinite loops
 * handle beacon filtering changing better
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ieee80211.h
net/mac80211/agg-rx.c
net/mac80211/mlme.c
net/mac80211/sta_info.c
net/mac80211/trace.h
net/wireless/nl80211.c

index 9f73249..c47f43e 100644 (file)
@@ -2561,6 +2561,8 @@ enum ieee80211_statuscode {
        /* 802.11ai */
        WLAN_STATUS_FILS_AUTHENTICATION_FAILURE = 108,
        WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER = 109,
+       WLAN_STATUS_SAE_HASH_TO_ELEMENT = 126,
+       WLAN_STATUS_SAE_PK = 127,
 };
 
 
index 7f245e9..313ba97 100644 (file)
@@ -477,7 +477,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
                                     size_t len)
 {
        u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num;
-       struct ieee802_11_elems elems = { };
+       struct ieee802_11_elems elems = { };
        u8 dialog_token;
        int ies_len;
 
index 839d036..ac87030 100644 (file)
@@ -2988,7 +2988,10 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
                cfg80211_rx_mlme_mgmt(sdata->dev, (u8 *)mgmt, len);
 
                if (auth_alg == WLAN_AUTH_SAE &&
-                   status_code == WLAN_STATUS_ANTI_CLOG_REQUIRED)
+                   (status_code == WLAN_STATUS_ANTI_CLOG_REQUIRED ||
+                    (auth_transaction == 1 &&
+                     (status_code == WLAN_STATUS_SAE_HASH_TO_ELEMENT ||
+                      status_code == WLAN_STATUS_SAE_PK))))
                        return;
 
                sdata_info(sdata, "%pM denied authentication (status %d)\n",
@@ -4560,6 +4563,9 @@ static void ieee80211_sta_bcn_mon_timer(struct timer_list *t)
        if (sdata->vif.csa_active && !ifmgd->csa_waiting_bcn)
                return;
 
+       if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER)
+               return;
+
        sdata->u.mgd.connection_loss = false;
        ieee80211_queue_work(&sdata->local->hw,
                             &sdata->u.mgd.beacon_connection_loss_work);
index 1dc747d..f2840d1 100644 (file)
@@ -1050,7 +1050,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
        might_sleep();
        lockdep_assert_held(&local->sta_mtx);
 
-       while (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
+       if (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
                ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
                WARN_ON_ONCE(ret);
        }
index 1b47096..50ab5b9 100644 (file)
@@ -22,7 +22,8 @@
 #define LOCAL_PR_ARG   __entry->wiphy_name
 
 #define STA_ENTRY      __array(char, sta_addr, ETH_ALEN)
-#define STA_ASSIGN     (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
+#define STA_ASSIGN     (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : \
+                               eth_zero_addr(__entry->sta_addr))
 #define STA_NAMED_ASSIGN(s)    memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN)
 #define STA_PR_FMT     " sta:%pM"
 #define STA_PR_ARG     __entry->sta_addr
index 5c57ac2..814e23d 100644 (file)
@@ -10400,8 +10400,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
                        memcpy(dev->ieee80211_ptr->disconnect_bssid,
                               connect.bssid, ETH_ALEN);
                else
-                       memset(dev->ieee80211_ptr->disconnect_bssid,
-                              0, ETH_ALEN);
+                       eth_zero_addr(dev->ieee80211_ptr->disconnect_bssid);
        }
 
        wdev_unlock(dev->ieee80211_ptr);