Message ID | 20200213114518.4415-2-sergey.matyukevich.os@quantenna.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b3860e7a3e7197bd471f546733ad2ee9c23af010 |
Delegated to: | Kalle Valo |
Headers | show |
Series | qtnfmac: WPA3 OWE/SAE support for AP and misc fixes | expand |
Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> wrote: > Enable WPA3 SAE support in AP mode. Driver currently supports cards > that offload SAE authentication to userspace. So allow userspace > software to subscribe and to send AUTH frames. Besides, enable > AP mode support in external_auth cfg80211 callback. > > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> 5 patches applied to wireless-drivers-next.git, thanks. b3860e7a3e71 qtnfmac: support WPA3 SAE in AP mode 44d09764856f qtnfmac: support WPA3 OWE in AP mode c3d476d21851 qtnfmac: set valid edmg in cfg80211_chan_def 616f5701f4ab qtnfmac: assign each wiphy to its own virtual platform device 2d83dddf85cc qtnfmac: add interface combination check for repeater mode
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 73d5014a4234..a5ab1270add1 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -60,7 +60,8 @@ qtnf_mgmt_stypes[NUM_NL80211_IFTYPES] = { BIT(IEEE80211_STYPE_AUTH >> 4), }, [NL80211_IFTYPE_AP] = { - .tx = BIT(IEEE80211_STYPE_ACTION >> 4), + .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | + BIT(IEEE80211_STYPE_AUTH >> 4), .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) | @@ -679,10 +680,8 @@ qtnf_external_auth(struct wiphy *wiphy, struct net_device *dev, struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); int ret; - if (vif->wdev.iftype != NL80211_IFTYPE_STATION) - return -EOPNOTSUPP; - - if (!ether_addr_equal(vif->bssid, auth->bssid)) + if (vif->wdev.iftype == NL80211_IFTYPE_STATION && + !ether_addr_equal(vif->bssid, auth->bssid)) pr_warn("unexpected bssid: %pM", auth->bssid); ret = qtnf_cmd_send_external_auth(vif, auth); diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index ccc1e06dfcf6..4a4c213fe9f1 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2211,7 +2211,7 @@ int qtnf_cmd_send_external_auth(struct qtnf_vif *vif, cmd = (struct qlink_cmd_external_auth *)cmd_skb->data; - ether_addr_copy(cmd->bssid, auth->bssid); + ether_addr_copy(cmd->peer, auth->bssid); cmd->status = cpu_to_le16(auth->status); qtnf_bus_lock(vif->mac->bus); diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 7e408b5c5549..cb610a7864ea 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -578,9 +578,9 @@ qtnf_event_handle_external_auth(struct qtnf_vif *vif, ether_addr_copy(auth.bssid, ev->bssid); auth.action = ev->action; - pr_info("%s: external auth bss=%pM action=%u akm=%u\n", - vif->netdev->name, auth.bssid, auth.action, - auth.key_mgmt_suite); + pr_debug("%s: external SAE processing: bss=%pM action=%u akm=%u\n", + vif->netdev->name, auth.bssid, auth.action, + auth.key_mgmt_suite); ret = cfg80211_external_auth_request(vif->netdev, &auth, GFP_KERNEL); if (ret) diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 7ee1070f985f..5e9254f8fa8a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -589,7 +589,7 @@ struct qlink_cmd_connect { */ struct qlink_cmd_external_auth { struct qlink_cmd chdr; - u8 bssid[ETH_ALEN]; + u8 peer[ETH_ALEN]; __le16 status; u8 payload[0]; } __packed;
Enable WPA3 SAE support in AP mode. Driver currently supports cards that offload SAE authentication to userspace. So allow userspace software to subscribe and to send AUTH frames. Besides, enable AP mode support in external_auth cfg80211 callback. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 9 ++++----- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 +- drivers/net/wireless/quantenna/qtnfmac/event.c | 6 +++--- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-)