brcm80211: replace broadcom specific defines
authorStanislav Fomichev <kernel@fomichev.me>
Sun, 27 Feb 2011 20:28:21 +0000 (23:28 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 1 Mar 2011 03:09:46 +0000 (19:09 -0800)
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_AMSDU -> IEEE80211_HT_CAP_MAX_AMSDU
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@fomichev.me>
Acked-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_iw.c
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
drivers/staging/brcm80211/brcmsmac/wlc_key.h
drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
drivers/staging/brcm80211/brcmsmac/wlc_pub.h
drivers/staging/brcm80211/brcmsmac/wlc_stf.c
drivers/staging/brcm80211/include/proto/802.11.h
drivers/staging/brcm80211/include/wlioctl.h

index 86c18be7d64e8152d855aa2662683272f0050cd9..fc920787cdaa93f27daaa8cd267690502f03cece 100644 (file)
@@ -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(&params, 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));
index 91d8488075371745199253fba4e961940947e8e2..f82c10ef8bad715b05cfab0a1b5a81f1e64b2a0d 100644 (file)
@@ -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)))
index de245ac38c7b52feb402912d09d5ccba743b7b8a..57c1789832a666e1cc0d9ad24585bc704e15229c 100644 (file)
@@ -595,7 +595,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 |
@@ -989,7 +989,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 */
@@ -1009,7 +1009,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 */
index 19e22c8b2d9cd8df65d45adb9230d9fb9e65ff8e..b198797fa307b1c326026e7c1d2734c062d7d637 100644 (file)
@@ -201,9 +201,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;
 
@@ -1340,8 +1340,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 {
index 70d3173e9fdeef1d0a753687f2194ef6ebd05859..50a4e38b4cca3a5db31d94a528b045386e7630af 100644 (file)
@@ -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 */
 
index e7028ec03dfd62cb774e018454ca591f405bb95c..26eb69fd552a37f95af58bf9207f8f7cad399b04 100644 (file)
@@ -8304,7 +8304,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) {
index af5d82ca3d2118ce4469630f0ee39d20e4077c68..0cd98910987a20857d90529f74fb6db0f07ee909 100644 (file)
@@ -142,9 +142,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)
 
 /* wlc internal bss_info, wl external one is in wlioctl.h */
 typedef struct wlc_bss_info {
index 25fbcdac4f77853fc7ccf22dead47b961f448bcc..9e27be9d49f9c6358e59d16703f8f4e08f5f33b4 100644 (file)
@@ -80,8 +80,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);
index 141e95f57c6bb3a5a3dd8ce23be641c99ab59d58..913cb547731b239bc9346563e9a972056a39db8a 100644 (file)
@@ -186,22 +186,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
 
@@ -220,7 +208,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"
index 2de49b84cb6346097d4bb90293cc02a82aa3af90..5e2b11bcfc6f04afbb5965f433945962bff490ff 100644 (file)
@@ -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 */