qtnfmac: support WPA3 SAE in AP mode
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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
e6e0f093d9
commit
b3860e7a3e
@ -60,7 +60,8 @@ qtnf_mgmt_stypes[NUM_NL80211_IFTYPES] = {
|
|||||||
BIT(IEEE80211_STYPE_AUTH >> 4),
|
BIT(IEEE80211_STYPE_AUTH >> 4),
|
||||||
},
|
},
|
||||||
[NL80211_IFTYPE_AP] = {
|
[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) |
|
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
|
||||||
BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
|
BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
|
||||||
BIT(IEEE80211_STYPE_ASSOC_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);
|
struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (vif->wdev.iftype != NL80211_IFTYPE_STATION)
|
if (vif->wdev.iftype == NL80211_IFTYPE_STATION &&
|
||||||
return -EOPNOTSUPP;
|
!ether_addr_equal(vif->bssid, auth->bssid))
|
||||||
|
|
||||||
if (!ether_addr_equal(vif->bssid, auth->bssid))
|
|
||||||
pr_warn("unexpected bssid: %pM", auth->bssid);
|
pr_warn("unexpected bssid: %pM", auth->bssid);
|
||||||
|
|
||||||
ret = qtnf_cmd_send_external_auth(vif, auth);
|
ret = qtnf_cmd_send_external_auth(vif, auth);
|
||||||
|
@ -2211,7 +2211,7 @@ int qtnf_cmd_send_external_auth(struct qtnf_vif *vif,
|
|||||||
|
|
||||||
cmd = (struct qlink_cmd_external_auth *)cmd_skb->data;
|
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);
|
cmd->status = cpu_to_le16(auth->status);
|
||||||
|
|
||||||
qtnf_bus_lock(vif->mac->bus);
|
qtnf_bus_lock(vif->mac->bus);
|
||||||
|
@ -578,9 +578,9 @@ qtnf_event_handle_external_auth(struct qtnf_vif *vif,
|
|||||||
ether_addr_copy(auth.bssid, ev->bssid);
|
ether_addr_copy(auth.bssid, ev->bssid);
|
||||||
auth.action = ev->action;
|
auth.action = ev->action;
|
||||||
|
|
||||||
pr_info("%s: external auth bss=%pM action=%u akm=%u\n",
|
pr_debug("%s: external SAE processing: bss=%pM action=%u akm=%u\n",
|
||||||
vif->netdev->name, auth.bssid, auth.action,
|
vif->netdev->name, auth.bssid, auth.action,
|
||||||
auth.key_mgmt_suite);
|
auth.key_mgmt_suite);
|
||||||
|
|
||||||
ret = cfg80211_external_auth_request(vif->netdev, &auth, GFP_KERNEL);
|
ret = cfg80211_external_auth_request(vif->netdev, &auth, GFP_KERNEL);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -589,7 +589,7 @@ struct qlink_cmd_connect {
|
|||||||
*/
|
*/
|
||||||
struct qlink_cmd_external_auth {
|
struct qlink_cmd_external_auth {
|
||||||
struct qlink_cmd chdr;
|
struct qlink_cmd chdr;
|
||||||
u8 bssid[ETH_ALEN];
|
u8 peer[ETH_ALEN];
|
||||||
__le16 status;
|
__le16 status;
|
||||||
u8 payload[0];
|
u8 payload[0];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
Loading…
Reference in New Issue
Block a user