Commit d48200ba authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: determine the wiphy->bands property correctly.

Use information from the device to determine the bands property
of the wiphy object. After this change the support of 80211n is
correctly presented in the bands property.
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarPiotr Haber <phaber@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent aeecc574
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
#define BRCMF_C_SET_WSEC 134 #define BRCMF_C_SET_WSEC 134
#define BRCMF_C_GET_PHY_NOISE 135 #define BRCMF_C_GET_PHY_NOISE 135
#define BRCMF_C_GET_BSS_INFO 136 #define BRCMF_C_GET_BSS_INFO 136
#define BRCMF_C_GET_BANDLIST 140
#define BRCMF_C_SET_SCB_TIMEOUT 158 #define BRCMF_C_SET_SCB_TIMEOUT 158
#define BRCMF_C_GET_PHYLIST 180 #define BRCMF_C_GET_PHYLIST 180
#define BRCMF_C_SET_SCAN_CHANNEL_TIME 185 #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185
...@@ -475,6 +476,11 @@ struct brcmf_sta_info_le { ...@@ -475,6 +476,11 @@ struct brcmf_sta_info_le {
__le32 rx_decrypt_failures; /* # of packet decrypted failed */ __le32 rx_decrypt_failures; /* # of packet decrypted failed */
}; };
struct brcmf_chanspec_list {
__le32 count; /* # of entries */
__le32 element[1]; /* variable length uint32 list */
};
/* /*
* WLC_E_PROBRESP_MSG * WLC_E_PROBRESP_MSG
* WLC_E_P2P_PROBREQ_MSG * WLC_E_P2P_PROBREQ_MSG
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
#define CH_20MHZ_APART 4 #define CH_20MHZ_APART 4
#define CH_10MHZ_APART 2 #define CH_10MHZ_APART 2
#define CH_5MHZ_APART 1 /* 2G band channels are 5 Mhz apart */ #define CH_5MHZ_APART 1 /* 2G band channels are 5 Mhz apart */
#define CH_MIN_2G_CHANNEL 1
#define CH_MAX_2G_CHANNEL 14 /* Max channel in 2G band */ #define CH_MAX_2G_CHANNEL 14 /* Max channel in 2G band */
#define BRCM_MAX_2G_CHANNEL CH_MAX_2G_CHANNEL /* legacy define */ #define CH_MIN_5G_CHANNEL 34
/* bandstate array indices */ /* bandstate array indices */
#define BAND_2G_INDEX 0 /* wlc->bandstate[x] index */ #define BAND_2G_INDEX 0 /* wlc->bandstate[x] index */
...@@ -60,6 +61,7 @@ ...@@ -60,6 +61,7 @@
#define WL_CHANSPEC_BW_10 0x0400 #define WL_CHANSPEC_BW_10 0x0400
#define WL_CHANSPEC_BW_20 0x0800 #define WL_CHANSPEC_BW_20 0x0800
#define WL_CHANSPEC_BW_40 0x0C00 #define WL_CHANSPEC_BW_40 0x0C00
#define WL_CHANSPEC_BW_80 0x2000
#define WL_CHANSPEC_BAND_MASK 0xf000 #define WL_CHANSPEC_BAND_MASK 0xf000
#define WL_CHANSPEC_BAND_SHIFT 12 #define WL_CHANSPEC_BAND_SHIFT 12
...@@ -67,6 +69,25 @@ ...@@ -67,6 +69,25 @@
#define WL_CHANSPEC_BAND_2G 0x2000 #define WL_CHANSPEC_BAND_2G 0x2000
#define INVCHANSPEC 255 #define INVCHANSPEC 255
#define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */
#define WL_CHAN_VALID_SW (1 << 1) /* valid with country sett. */
#define WL_CHAN_BAND_5G (1 << 2) /* 5GHz-band channel */
#define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */
#define WL_CHAN_INACTIVE (1 << 4) /* inactive due to radar */
#define WL_CHAN_PASSIVE (1 << 5) /* channel in passive mode */
#define WL_CHAN_RESTRICTED (1 << 6) /* restricted use channel */
/* values for band specific 40MHz capabilities */
#define WLC_N_BW_20ALL 0
#define WLC_N_BW_40ALL 1
#define WLC_N_BW_20IN2G_40IN5G 2
/* band types */
#define WLC_BAND_AUTO 0 /* auto-select */
#define WLC_BAND_5G 1 /* 5 Ghz */
#define WLC_BAND_2G 2 /* 2.4 Ghz */
#define WLC_BAND_ALL 3 /* all bands */
#define CHSPEC_CHANNEL(chspec) ((u8)((chspec) & WL_CHANSPEC_CHAN_MASK)) #define CHSPEC_CHANNEL(chspec) ((u8)((chspec) & WL_CHANSPEC_CHAN_MASK))
#define CHSPEC_BAND(chspec) ((chspec) & WL_CHANSPEC_BAND_MASK) #define CHSPEC_BAND(chspec) ((chspec) & WL_CHANSPEC_BAND_MASK)
...@@ -79,10 +100,11 @@ ...@@ -79,10 +100,11 @@
#define CHSPEC_IS20(chspec) \ #define CHSPEC_IS20(chspec) \
(((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_20) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_20)
#ifndef CHSPEC_IS40
#define CHSPEC_IS40(chspec) \ #define CHSPEC_IS40(chspec) \
(((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40)
#endif
#define CHSPEC_IS80(chspec) \
(((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_80)
#define CHSPEC_IS5G(chspec) \ #define CHSPEC_IS5G(chspec) \
(((chspec) & WL_CHANSPEC_BAND_MASK) == WL_CHANSPEC_BAND_5G) (((chspec) & WL_CHANSPEC_BAND_MASK) == WL_CHANSPEC_BAND_5G)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment