AMPDU_RX_FACTOR_64K -> IEEE80211_HT_MAX_AMPDU_64K AMPDU_RX_FACTOR_32K -> IEEE80211_HT_MAX_AMPDU_32K DOT11_MAX_KEY_SIZE -> WLAN_MAX_KEY_LEN HT_CAP_MIMO_PS_MASK -> IEEE80211_HT_CAP_SM_PS HT_CAP_MAX_AMSU -> IEEE80211_HT_CAP_MAX_AMSU HT_CAP_RX_STBC_MASK -> IEEE80211_HT_CAP_RX_STBC HT_CAP_RX_STBC_SHIFT -> IEEE80211_HT_CAP_RX_STBC_SHIFT HT_PARAMS_RX_FACTOR_MASK -> IEEE80211_HT_AMPDU_PARM_FACTOR Signed-off-by: Stanislav Fomichev <kernel@xxxxxxxxxxx> --- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 2 +- drivers/staging/brcm80211/brcmfmac/wl_iw.c | 2 +- drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 6 +++--- drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | 8 ++++---- drivers/staging/brcm80211/brcmsmac/wlc_key.h | 2 +- drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c | 2 +- drivers/staging/brcm80211/brcmsmac/wlc_pub.h | 4 ++-- drivers/staging/brcm80211/brcmsmac/wlc_stf.c | 4 ++-- drivers/staging/brcm80211/include/proto/802.11.h | 15 +-------------- drivers/staging/brcm80211/include/wlioctl.h | 2 +- 10 files changed, 17 insertions(+), 30 deletions(-) diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c index 2faa6d0..44ecf95 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c @@ -1766,7 +1766,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, 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)); diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c index 91d8488..f82c10e 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c @@ -2435,7 +2435,7 @@ wl_iw_get_encode(struct net_device *dev, 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))) diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c index 7645c6c..ad2ed04 100644 --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c @@ -587,7 +587,7 @@ wl_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 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 | @@ -981,7 +981,7 @@ static struct ieee80211_supported_band wl_band_2GHz_nphy = { 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 */ @@ -1001,7 +1001,7 @@ static struct ieee80211_supported_band wl_band_5GHz_nphy = { /* 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 */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c index bedf4b2..ae946a2 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c @@ -196,9 +196,9 @@ struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc) 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; @@ -1339,8 +1339,8 @@ void wlc_ampdu_shm_upd(struct ampdu_info *ampdu) 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 { diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_key.h b/drivers/staging/brcm80211/brcmsmac/wlc_key.h index 70d3173..50a4e38 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_key.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_key.h @@ -98,7 +98,7 @@ typedef struct wsec_key { 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 */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c index 94a5fa4..10b2897 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c @@ -8340,7 +8340,7 @@ void wlc_reset_bmac_done(struct wlc_info *wlc) 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) { diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h index ded018a..1160e62 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h @@ -146,9 +146,9 @@ struct rsn_parms { #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) /* Event data type */ typedef struct wlc_event { diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_stf.c b/drivers/staging/brcm80211/brcmsmac/wlc_stf.c index 5ac120e..724ffb8 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_stf.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_stf.c @@ -74,8 +74,8 @@ static void wlc_stf_stbc_rx_ht_update(struct wlc_info *wlc, int val) 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); diff --git a/drivers/staging/brcm80211/include/proto/802.11.h b/drivers/staging/brcm80211/include/proto/802.11.h index 5d49939..374125d 100644 --- a/drivers/staging/brcm80211/include/proto/802.11.h +++ b/drivers/staging/brcm80211/include/proto/802.11.h @@ -171,22 +171,10 @@ typedef struct d11cnt { #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 @@ -205,7 +193,6 @@ typedef struct d11cnt { #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" diff --git a/drivers/staging/brcm80211/include/wlioctl.h b/drivers/staging/brcm80211/include/wlioctl.h index 2de49b8..5e2b11b 100644 --- a/drivers/staging/brcm80211/include/wlioctl.h +++ b/drivers/staging/brcm80211/include/wlioctl.h @@ -474,7 +474,7 @@ typedef struct wl_rm_rep { 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 */ -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel