Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-davem-2020-08-03' of git://git.kernel.or…
Browse files Browse the repository at this point in the history
…g/pub/scm/linux/kernel/git/jberg/mac80211-next

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>
  • Loading branch information
David S. Miller committed Aug 4, 2020
2 parents 01f4d47 + 0b91111 commit ee494f4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};


Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/agg-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = { 0 };
struct ieee802_11_elems elems = { };
u8 dialog_token;
int ies_len;

Expand Down
8 changes: 7 additions & 1 deletion net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion net/mac80211/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ee494f4

Please sign in to comment.