* [PATCH V2 1/2] nl80211: add NL80211_ATTR_IFINDEX to port authorized event
2019-05-09 9:48 [PATCH V2 0/2] nl80211: brcmfmac: add port authorized event support Chi-Hsien Lin
@ 2019-05-09 9:48 ` Chi-Hsien Lin
2019-05-09 9:48 ` [PATCH V2 2/2] brcmfmac: send port authorized event for FT-802.1X Chi-Hsien Lin
1 sibling, 0 replies; 4+ messages in thread
From: Chi-Hsien Lin @ 2019-05-09 9:48 UTC (permalink / raw)
To: linux-wireless
Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo, Stanley Hsu,
Chi-Hsien Lin
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Add NL80211_ATTR_IFINDEX attribute to port authorized event to indicate
the operating interface of the device. Also put NL80211_ATTR_WIPHY
attribute in it to be consistent with the other MLME notifications.
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
net/wireless/nl80211.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fffe4b371e23..539873120627 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -15034,7 +15034,9 @@ void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
return;
}
- if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
+ if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
+ nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
+ nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
goto nla_put_failure;
genlmsg_end(msg, hdr);
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH V2 0/2] nl80211: brcmfmac: add port authorized event support
@ 2019-05-09 9:48 Chi-Hsien Lin
2019-05-09 9:48 ` [PATCH V2 1/2] nl80211: add NL80211_ATTR_IFINDEX to port authorized event Chi-Hsien Lin
2019-05-09 9:48 ` [PATCH V2 2/2] brcmfmac: send port authorized event for FT-802.1X Chi-Hsien Lin
0 siblings, 2 replies; 4+ messages in thread
From: Chi-Hsien Lin @ 2019-05-09 9:48 UTC (permalink / raw)
To: linux-wireless
Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo,
Chi-Hsien Lin
These two patches adds port authorized event in brcmfmac and nl80211.
Changelog:
V2:
- Besides NL80211_ATTR_WIPHY, also set NL80211_ATTR_WIPHY when sending port authorized
event.
- Drop port authorized event for 4-way offload.
Chung-Hsien Hsu (2):
nl80211: add NL80211_ATTR_IFINDEX to port authorized event
brcmfmac: send port authorized event for FT-802.1X
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++++++
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 1 +
net/wireless/nl80211.c | 4 +++-
3 files changed, 12 insertions(+), 1 deletion(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2 2/2] brcmfmac: send port authorized event for FT-802.1X
2019-05-09 9:48 [PATCH V2 0/2] nl80211: brcmfmac: add port authorized event support Chi-Hsien Lin
2019-05-09 9:48 ` [PATCH V2 1/2] nl80211: add NL80211_ATTR_IFINDEX to port authorized event Chi-Hsien Lin
@ 2019-05-09 9:48 ` Chi-Hsien Lin
2019-10-01 9:11 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Chi-Hsien Lin @ 2019-05-09 9:48 UTC (permalink / raw)
To: linux-wireless
Cc: brcm80211-dev-list, brcm80211-dev-list, Arend van Spriel,
Franky Lin, Hante Meuleman, Wright Feng, Kalle Valo, Stanley Hsu,
Chi-Hsien Lin
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
With FT-802.1X, driver should send a port authorized event right after
sending a roamed event. It is used to indicate that a new AP is already
authorized so 802.1X is not required.
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++++++
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 8ee8af4e7ec4..549efb91933c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -1634,6 +1634,7 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
u16 count;
profile->use_fwsup = BRCMF_PROFILE_FWSUP_NONE;
+ profile->is_ft = false;
if (!sme->crypto.n_akm_suites)
return 0;
@@ -1678,11 +1679,13 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
break;
case WLAN_AKM_SUITE_FT_8021X:
val = WPA2_AUTH_UNSPECIFIED | WPA2_AUTH_FT;
+ profile->is_ft = true;
if (sme->want_1x)
profile->use_fwsup = BRCMF_PROFILE_FWSUP_1X;
break;
case WLAN_AKM_SUITE_FT_PSK:
val = WPA2_AUTH_PSK | WPA2_AUTH_FT;
+ profile->is_ft = true;
break;
default:
bphy_err(drvr, "invalid cipher group (%d)\n",
@@ -5557,6 +5560,11 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
brcmf_dbg(CONN, "Report roaming result\n");
+ if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && profile->is_ft) {
+ cfg80211_port_authorized(ndev, profile->bssid, GFP_KERNEL);
+ brcmf_dbg(CONN, "Report port authorized\n");
+ }
+
set_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state);
brcmf_dbg(TRACE, "Exit\n");
return err;
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
index 9a6287f084a9..6a7dec908b6f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
@@ -133,6 +133,7 @@ struct brcmf_cfg80211_profile {
struct brcmf_cfg80211_security sec;
struct brcmf_wsec_key key[BRCMF_MAX_DEFAULT_KEYS];
enum brcmf_profile_fwsup use_fwsup;
+ bool is_ft;
};
/**
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2 2/2] brcmfmac: send port authorized event for FT-802.1X
2019-05-09 9:48 ` [PATCH V2 2/2] brcmfmac: send port authorized event for FT-802.1X Chi-Hsien Lin
@ 2019-10-01 9:11 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-10-01 9:11 UTC (permalink / raw)
To: Chi-Hsien Lin
Cc: linux-wireless, brcm80211-dev-list, brcm80211-dev-list,
Arend van Spriel, Franky Lin, Hante Meuleman, Wright Feng,
Stanley Hsu, Chi-Hsien Lin
Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com> wrote:
> From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
>
> With FT-802.1X, driver should send a port authorized event right after
> sending a roamed event. It is used to indicate that a new AP is already
> authorized so 802.1X is not required.
>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Patch applied to wireless-drivers-next.git, thanks.
be898fed355e brcmfmac: send port authorized event for FT-802.1X
--
https://patchwork.kernel.org/patch/10936943/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-01 9:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09 9:48 [PATCH V2 0/2] nl80211: brcmfmac: add port authorized event support Chi-Hsien Lin
2019-05-09 9:48 ` [PATCH V2 1/2] nl80211: add NL80211_ATTR_IFINDEX to port authorized event Chi-Hsien Lin
2019-05-09 9:48 ` [PATCH V2 2/2] brcmfmac: send port authorized event for FT-802.1X Chi-Hsien Lin
2019-10-01 9:11 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).