key.index = key_idx;
swap_key_to_BE(&key);
memset(¶ms, 0, sizeof(params));
- params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
+ params.key_len = (u8) min_t(u8, WLAN_MAX_KEY_LEN, key.len);
memcpy(params.key, key.data, params.key_len);
err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec));
wsec = le32_to_cpu(wsec);
auth = le32_to_cpu(auth);
- dwrq->length = min_t(u16, DOT11_MAX_KEY_SIZE, key.len);
+ dwrq->length = min_t(u16, WLAN_MAX_KEY_LEN, key.len);
dwrq->flags = key.index + 1;
if (!(wsec & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)))
AMPDU_MAX_SCB_TID * PKTQ_LEN_DEFAULT);
sta->ht_cap.ht_supported = true;
- sta->ht_cap.ampdu_factor = AMPDU_RX_FACTOR_64K;
+ sta->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
sta->ht_cap.ampdu_density = AMPDU_DEF_MPDU_DENSITY;
sta->ht_cap.cap = IEEE80211_HT_CAP_GRN_FLD |
IEEE80211_HT_CAP_SGI_20 |
IEEE80211_HT_CAP_SGI_20 |
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_40MHZ_INTOLERANT,
.ht_supported = true,
- .ampdu_factor = AMPDU_RX_FACTOR_64K,
+ .ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K,
.ampdu_density = AMPDU_DEF_MPDU_DENSITY,
.mcs = {
/* placeholders for now */
/* use IEEE80211_HT_CAP_* from include/linux/ieee80211.h */
.cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_40MHZ_INTOLERANT, /* No 40 mhz yet */
.ht_supported = true,
- .ampdu_factor = AMPDU_RX_FACTOR_64K,
+ .ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K,
.ampdu_density = AMPDU_DEF_MPDU_DENSITY,
.mcs = {
/* placeholders for now */
ampdu->ffpld_rsvd = AMPDU_DEF_FFPLD_RSVD;
/* bump max ampdu rcv size to 64k for all 11n devices except 4321A0 and 4321A1 */
if (WLCISNPHY(wlc->band) && NREV_LT(wlc->band->phyrev, 2))
- ampdu->rx_factor = AMPDU_RX_FACTOR_32K;
+ ampdu->rx_factor = IEEE80211_HT_MAX_AMPDU_32K;
else
- ampdu->rx_factor = AMPDU_RX_FACTOR_64K;
+ ampdu->rx_factor = IEEE80211_HT_MAX_AMPDU_64K;
ampdu->retry_limit = AMPDU_DEF_RETRY_LIMIT;
ampdu->rr_retry_limit = AMPDU_DEF_RR_RETRY_LIMIT;
struct wlc_info *wlc = ampdu->wlc;
/* Extend ucode internal watchdog timer to match larger received frames */
- if ((ampdu->rx_factor & HT_PARAMS_RX_FACTOR_MASK) ==
- AMPDU_RX_FACTOR_64K) {
+ if ((ampdu->rx_factor & IEEE80211_HT_AMPDU_PARM_FACTOR) ==
+ IEEE80211_HT_MAX_AMPDU_64K) {
wlc_write_shm(wlc, M_MIMO_MAXSYM, MIMO_MAXSYM_MAX);
wlc_write_shm(wlc, M_WATCHDOG_8TU, WATCHDOG_8TU_MAX);
} else {
s8 icv_len; /* ICV length */
u32 len; /* key length..don't move this var */
/* data is 4byte aligned */
- u8 data[DOT11_MAX_KEY_SIZE]; /* key data */
+ u8 data[WLAN_MAX_KEY_LEN]; /* key data */
wsec_iv_t rxiv[WLC_NUMRXIVS]; /* Rx IV (one per TID) */
wsec_iv_t txiv; /* Tx IV */
void wlc_ht_mimops_cap_update(struct wlc_info *wlc, u8 mimops_mode)
{
- wlc->ht_cap.cap_info &= ~HT_CAP_MIMO_PS_MASK;
+ wlc->ht_cap.cap_info &= ~IEEE80211_HT_CAP_SM_PS;
wlc->ht_cap.cap_info |= (mimops_mode << IEEE80211_HT_CAP_SM_PS_SHIFT);
if (AP_ENAB(wlc->pub) && wlc->clk) {
#define AMPDU_DEF_MPDU_DENSITY 6 /* default mpdu density (110 ==> 4us) */
/* defaults for the HT (MIMO) bss */
-#define HT_CAP ((HT_CAP_MIMO_PS_OFF << IEEE80211_HT_CAP_SM_PS_SHIFT) |\
+#define HT_CAP (IEEE80211_HT_CAP_SM_PS |\
IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_GRN_FLD |\
- HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
+ IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
/* wlc internal bss_info, wl external one is in wlioctl.h */
typedef struct wlc_bss_info {
return;
}
- wlc->ht_cap.cap_info &= ~HT_CAP_RX_STBC_MASK;
- wlc->ht_cap.cap_info |= (val << HT_CAP_RX_STBC_SHIFT);
+ wlc->ht_cap.cap_info &= ~IEEE80211_HT_CAP_RX_STBC;
+ wlc->ht_cap.cap_info |= (val << IEEE80211_HT_CAP_RX_STBC_SHIFT);
if (wlc->pub->up) {
wlc_update_beacon(wlc);
#define HT_CAP_IE_LEN 26
-#define HT_CAP_MIMO_PS_MASK 0x000C
-#define HT_CAP_MIMO_PS_OFF 0x0003
-#define HT_CAP_MIMO_PS_ON 0x0000
-#define HT_CAP_RX_STBC_MASK 0x0300
-#define HT_CAP_RX_STBC_SHIFT 8
-#define HT_CAP_MAX_AMSDU 0x0800
-
#define HT_CAP_RX_STBC_NO 0x0
#define HT_CAP_RX_STBC_ONE_STREAM 0x1
-#define HT_PARAMS_RX_FACTOR_MASK 0x03
-
-#define AMPDU_MAX_MPDU_DENSITY 7
-#define AMPDU_RX_FACTOR_16K 1
-#define AMPDU_RX_FACTOR_32K 2
-#define AMPDU_RX_FACTOR_64K 3
+#define AMPDU_MAX_MPDU_DENSITY IEEE80211_HT_MPDU_DENSITY_16
#define AMPDU_DELIMITER_LEN 4
#define RSN_AKM_PSK 2
#define DOT11_MAX_DEFAULT_KEYS 4
-#define DOT11_MAX_KEY_SIZE 32
#define DOT11_WPA_KEY_RSC_LEN 8
#define BRCM_OUI "\x00\x10\x18"
typedef struct wl_wsec_key {
u32 index; /* key index */
u32 len; /* key length */
- u8 data[DOT11_MAX_KEY_SIZE]; /* key data */
+ u8 data[WLAN_MAX_KEY_LEN]; /* key data */
u32 pad_1[18];
u32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
u32 flags; /* misc flags */