diff mbox series

brcmfmac: fix wrong location to get firmware feature

Message ID 20200330052528.10503-1-jh80.chung@samsung.com (mailing list archive)
State Accepted
Commit c57673852062428cdeabdd6501ac8b8e4c302067
Delegated to: Kalle Valo
Headers show
Series brcmfmac: fix wrong location to get firmware feature | expand

Commit Message

Jaehoon Chung March 30, 2020, 5:25 a.m. UTC
sup_wpa feature is getting after setting feature_disable flag.
If firmware is supported sup_wpa feature,  it's always enabled
regardless of feature_disable flag.

Fixes: b8a64f0e96c2 ("brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK")

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andy Shevchenko March 30, 2020, 9:08 a.m. UTC | #1
On Mon, Mar 30, 2020 at 8:26 AM Jaehoon Chung <jh80.chung@samsung.com> wrote:
>
> sup_wpa feature is getting after setting feature_disable flag.
> If firmware is supported sup_wpa feature,  it's always enabled
> regardless of feature_disable flag.
>

> Fixes: b8a64f0e96c2 ("brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK")
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

No blank line in between. (Dunno if you need to resend, just wait what
maintainer says)
Kalle Valo March 30, 2020, 10:16 a.m. UTC | #2
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Mon, Mar 30, 2020 at 8:26 AM Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>
>> sup_wpa feature is getting after setting feature_disable flag.
>> If firmware is supported sup_wpa feature,  it's always enabled
>> regardless of feature_disable flag.
>>
>
>> Fixes: b8a64f0e96c2 ("brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK")
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>
> No blank line in between. (Dunno if you need to resend, just wait what
> maintainer says)

I can fix that during commit, no need to resend because of this.
Jaehoon Chung April 1, 2020, 10:20 a.m. UTC | #3
On 3/30/20 7:16 PM, Kalle Valo wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> 
>> On Mon, Mar 30, 2020 at 8:26 AM Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>>
>>> sup_wpa feature is getting after setting feature_disable flag.
>>> If firmware is supported sup_wpa feature,  it's always enabled
>>> regardless of feature_disable flag.
>>>
>>
>>> Fixes: b8a64f0e96c2 ("brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK")
>>>
>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>
>> No blank line in between. (Dunno if you need to resend, just wait what
>> maintainer says)
> 
> I can fix that during commit, no need to resend because of this.

Thanks!

BTW, I have a question about brcmfmac's firmware feature.
When i have tested on RPI4, it seems that 4-way handshake offloading feature is using.

If I entered the wrong password, which event is triggered from firmware? 
And how does wpa_supplicant know about wrong key?

I don't have much knowledge about this..but if my analyzing is correct.

<7>[  119.278494] brcmfmac: brcmf_is_nonetwork Processing failed supplicant state: 8
...
<7>[  119.278525] brcmfmac: brcmf_bss_connect_done Report connect result - connection failed
...
<7>[  119.278726] brcmfmac: brcmf_fweh_event_worker event DEAUTH_IND (6) ifidx 0 bsscfg 0 addr 70:5d:cc:6e:b5:xx

<7>[  119.280966] brcmfmac: brcmf_fweh_event_worker event DEAUTH (5) ifidx 0 bsscfg 0 addr 70:5d:cc:6e:b5:xx


firmware is indicating DEAUTH event and driver will be controlled with it, right?
Can someone explain to me in more detail, plz? 

Best Regards,
Jaehoon Chung



>
Kalle Valo April 14, 2020, 3:03 p.m. UTC | #4
Jaehoon Chung <jh80.chung@samsung.com> wrote:

> sup_wpa feature is getting after setting feature_disable flag.
> If firmware is supported sup_wpa feature,  it's always enabled
> regardless of feature_disable flag.
> 
> Fixes: b8a64f0e96c2 ("brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK")
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Patch applied to wireless-drivers-next.git, thanks.

c57673852062 brcmfmac: fix wrong location to get firmware feature
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
index 5da0dda0d899..0dcefbd0c000 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
@@ -285,13 +285,14 @@  void brcmf_feat_attach(struct brcmf_pub *drvr)
 	if (!err)
 		ifp->drvr->feat_flags |= BIT(BRCMF_FEAT_SCAN_RANDOM_MAC);
 
+	brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_FWSUP, "sup_wpa");
+
 	if (drvr->settings->feature_disable) {
 		brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n",
 			  ifp->drvr->feat_flags,
 			  drvr->settings->feature_disable);
 		ifp->drvr->feat_flags &= ~drvr->settings->feature_disable;
 	}
-	brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_FWSUP, "sup_wpa");
 
 	brcmf_feat_firmware_overrides(drvr);