Skip to content

Commit 4282ff1

Browse files
Dan HaabKalle Valo
authored andcommitted
brcmfmac: support STA info struct v7
The newest firmwares provide STA info using v7 of the struct. As v7 isn't backward compatible, a union is needed. Even though brcmfmac does not use any of the new info it's important to provide the proper struct buffer. Without this change new firmwares will fallback to the very limited v3 instead of something in between such as v4. Signed-off-by: Dan Haab <dan.haab@luxul.com> Reviewed-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
1 parent d5a4335 commit 4282ff1

File tree

1 file changed

+33
-7
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

1 file changed

+33
-7
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176

177177
#define BRCMF_VHT_CAP_MCS_MAP_NSS_MAX 8
178178

179+
#define BRCMF_HE_CAP_MCS_MAP_NSS_MAX 8
180+
179181
/* MAX_CHUNK_LEN is the maximum length for data passing to firmware in each
180182
* ioctl. It is relatively small because firmware has small maximum size input
181183
* playload restriction for ioctls.
@@ -601,13 +603,37 @@ struct brcmf_sta_info_le {
601603
__le32 rx_pkts_retried; /* # rx with retry bit set */
602604
__le32 tx_rate_fallback; /* lowest fallback TX rate */
603605

604-
/* Fields valid for ver >= 5 */
605-
struct {
606-
__le32 count; /* # rates in this set */
607-
u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
608-
u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */
609-
__le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */
610-
} rateset_adv;
606+
union {
607+
struct {
608+
struct {
609+
__le32 count; /* # rates in this set */
610+
u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
611+
u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */
612+
__le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */
613+
} rateset_adv;
614+
} v5;
615+
616+
struct {
617+
__le32 rx_dur_total; /* total user RX duration (estimated) */
618+
__le16 chanspec; /** chanspec this sta is on */
619+
__le16 pad_1;
620+
struct {
621+
__le16 version; /* version */
622+
__le16 len; /* length */
623+
__le32 count; /* # rates in this set */
624+
u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
625+
u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */
626+
__le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */
627+
__le16 he_mcs[BRCMF_HE_CAP_MCS_MAP_NSS_MAX]; /* supported he mcs index bit map per nss */
628+
} rateset_adv; /* rateset along with mcs index bitmap */
629+
__le16 wpauth; /* authentication type */
630+
u8 algo; /* crypto algorithm */
631+
u8 pad_2;
632+
__le32 tx_rspec; /* Rate of last successful tx frame */
633+
__le32 rx_rspec; /* Rate of last successful rx frame */
634+
__le32 wnm_cap; /* wnm capabilities */
635+
} v7;
636+
};
611637
};
612638

613639
struct brcmf_chanspec_list {

0 commit comments

Comments
 (0)