diff mbox series

[1/2] brcmfmac: fix setting of station info chains bitmask

Message ID 20210506132010.3964484-1-alsi@bang-olufsen.dk
State New
Headers show
Series [1/2] brcmfmac: fix setting of station info chains bitmask | expand

Commit Message

Alvin Šipraga May 6, 2021, 1:20 p.m. UTC
The sinfo->chains field is a bitmask for filled values in chain_signal
and chain_signal_avg, not a count. Treat it as such so that the driver
can properly report per-chain RSSI information.

Before (MIMO mode):

  $ iw dev wlan0 station dump
      ...
      signal: -51 [-51] dBm

After (MIMO mode):

  $ iw dev wlan0 station dump
      ...
      signal: -53 [-53, -54] dBm

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Fixes: cae355dc90db ("brcmfmac: Add RSSI information to get_station.")
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.31.1

Comments

Alvin Šipraga June 14, 2021, 1:21 p.m. UTC | #1
Hello,

On 5/6/21 3:20 PM, Alvin Šipraga wrote:
> The sinfo->chains field is a bitmask for filled values in chain_signal

> and chain_signal_avg, not a count. Treat it as such so that the driver

> can properly report per-chain RSSI information.

> 


<snip>

This is a gentle ping to see if these two patches got lost. I was told 
on another mailing list recently that mail sent from my work address is 
finding its way into peoples' junk folders.

I will resend the patches in the near future if I don't see any response 
here.

Thanks,
Alvin
Kalle Valo June 14, 2021, 2:33 p.m. UTC | #2
Alvin Šipraga <alvin@pqrs.dk> writes:

> Hello,

>

> On 5/6/21 3:20 PM, Alvin Šipraga wrote:

>> The sinfo->chains field is a bitmask for filled values in chain_signal

>> and chain_signal_avg, not a count. Treat it as such so that the driver

>> can properly report per-chain RSSI information.

>>

>

> <snip>

>

> This is a gentle ping to see if these two patches got lost. I was told

> on another mailing list recently that mail sent from my work address

> is finding its way into peoples' junk folders.

>

> I will resend the patches in the near future if I don't see any

> response here.


I just have been busy and heavily backlogged. The patches are in
patchwork, so no need to resend:

https://patchwork.kernel.org/project/linux-wireless/list/?series=477877&state=*

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Alvin Šipraga June 14, 2021, 5:18 p.m. UTC | #3
Hi Kalle,

On 6/14/21 4:33 PM, Kalle Valo wrote:
> Alvin Šipraga <alvin@pqrs.dk> writes:

> 

>> Hello,

>>

>> On 5/6/21 3:20 PM, Alvin Šipraga wrote:

>>> The sinfo->chains field is a bitmask for filled values in chain_signal

>>> and chain_signal_avg, not a count. Treat it as such so that the driver

>>> can properly report per-chain RSSI information.

>>>

>>

>> <snip>

>>

>> This is a gentle ping to see if these two patches got lost. I was told

>> on another mailing list recently that mail sent from my work address

>> is finding its way into peoples' junk folders.

>>

>> I will resend the patches in the near future if I don't see any

>> response here.

> 

> I just have been busy and heavily backlogged. The patches are in

> patchwork, so no need to resend:

> 

> https://patchwork.kernel.org/project/linux-wireless/list/?series=477877&state=*>> 


Great - thanks for the quick reply. I will not resend.

Kind regards,
Alvin
Kalle Valo June 15, 2021, 10:36 a.m. UTC | #4
Alvin Šipraga <ALSI@bang-olufsen.dk> wrote:

> The sinfo->chains field is a bitmask for filled values in chain_signal

> and chain_signal_avg, not a count. Treat it as such so that the driver

> can properly report per-chain RSSI information.

> 

> Before (MIMO mode):

> 

>   $ iw dev wlan0 station dump

>       ...

>       signal: -51 [-51] dBm

> 

> After (MIMO mode):

> 

>   $ iw dev wlan0 station dump

>       ...

>       signal: -53 [-53, -54] dBm

> 

> Fixes: cae355dc90db ("brcmfmac: Add RSSI information to get_station.")

> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>


2 patches applied to wireless-drivers-next.git, thanks.

feb456437621 brcmfmac: fix setting of station info chains bitmask
9a1590934d9a brcmfmac: correctly report average RSSI in station info

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210506132010.3964484-1-alsi@bang-olufsen.dk/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index f4405d7861b6..afa75cb83221 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2838,6 +2838,7 @@  brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
 		count_rssi = 0;
 		for (i = 0; i < BRCMF_ANT_MAX; i++) {
 			if (sta_info_le.rssi[i]) {
+				sinfo->chains |= BIT(count_rssi);
 				sinfo->chain_signal_avg[count_rssi] =
 					sta_info_le.rssi[i];
 				sinfo->chain_signal[count_rssi] =
@@ -2848,8 +2849,6 @@  brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
 		}
 		if (count_rssi) {
 			sinfo->filled |= BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL);
-			sinfo->chains = count_rssi;
-
 			sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
 			total_rssi /= count_rssi;
 			sinfo->signal = total_rssi;