staging: rtl8723au: Use kernel provided IEEE80211_HT_OP_MODE_* defines
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 21 May 2014 07:37:47 +0000 (09:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 07:27:44 +0000 (16:27 +0900)
In addition remove unused HT_INFO_STBC_PARAM_* defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/include/wifi.h

index 0f21e2c1e538c5fa3745039e7a9d5fffd194fdd2..a5353153eb8d228d03e314077c749354a10f697c 100644 (file)
@@ -1387,28 +1387,28 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
        DBG_8723A("%s current operation mode = 0x%X\n",
                   __func__, pmlmepriv->ht_op_mode);
 
-       if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT)
+       if (!(pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)
            && pmlmepriv->num_sta_ht_no_gf) {
                pmlmepriv->ht_op_mode |=
-                       HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT;
+                       IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT;
                op_mode_changes++;
        } else if ((pmlmepriv->ht_op_mode &
-                   HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT) &&
+                   IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) &&
                   pmlmepriv->num_sta_ht_no_gf == 0) {
                pmlmepriv->ht_op_mode &=
-                       ~HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT;
+                       ~IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT;
                op_mode_changes++;
        }
 
-       if (!(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT) &&
+       if (!(pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT) &&
            (pmlmepriv->num_sta_no_ht || pmlmepriv->olbc_ht)) {
-               pmlmepriv->ht_op_mode |= HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT;
+               pmlmepriv->ht_op_mode |= IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT;
                op_mode_changes++;
        } else if ((pmlmepriv->ht_op_mode &
-                   HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT) &&
+                   IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT) &&
                   (pmlmepriv->num_sta_no_ht == 0 && !pmlmepriv->olbc_ht)) {
                pmlmepriv->ht_op_mode &=
-                       ~HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT;
+                       ~IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT;
                op_mode_changes++;
        }
 
@@ -1418,7 +1418,7 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
         */
        new_op_mode = 0;
        if (pmlmepriv->num_sta_no_ht ||
-           (pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT))
+           (pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT))
                new_op_mode = OP_MODE_MIXED;
        else if ((le16_to_cpu(phtpriv_ap->ht_cap.cap_info) &
                  IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
@@ -1429,9 +1429,9 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
        else
                new_op_mode = OP_MODE_PURE;
 
-       cur_op_mode = pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_OP_MODE_MASK;
+       cur_op_mode = pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_PROTECTION;
        if (cur_op_mode != new_op_mode) {
-               pmlmepriv->ht_op_mode &= ~HT_INFO_OPERATION_MODE_OP_MODE_MASK;
+               pmlmepriv->ht_op_mode &= ~IEEE80211_HT_OP_MODE_PROTECTION;
                pmlmepriv->ht_op_mode |= new_op_mode;
                op_mode_changes++;
        }
index 149564f92c809608c8d6aa5ceeed4fcfb5bff042..bfe1eb36f179e5c46880b4da23629a6ef7ac7254 100644 (file)
@@ -241,22 +241,6 @@ struct ADDBA_request {
 #define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY              ((u8) BIT(4))
 #define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY      ((u8) BIT(5))
 
-#define HT_INFO_OPERATION_MODE_OP_MODE_MASK    \
-               ((u16) (0x0001 | 0x0002))
-#define HT_INFO_OPERATION_MODE_OP_MODE_OFFSET          0
-#define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT     ((u8) BIT(2))
-#define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT    ((u8) BIT(3))
-#define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT      ((u8) BIT(4))
-
-#define HT_INFO_STBC_PARAM_DUAL_BEACON         ((u16) BIT(6))
-#define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT   ((u16) BIT(7))
-#define HT_INFO_STBC_PARAM_SECONDARY_BCN       ((u16) BIT(8))
-#define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED   ((u16) BIT(9))
-#define HT_INFO_STBC_PARAM_PCO_ACTIVE          ((u16) BIT(10))
-#define HT_INFO_STBC_PARAM_PCO_PHASE           ((u16) BIT(11))
-
-
-
 /*     ===============WPS Section=============== */
 /*     For WPSv1.0 */
 #define WPSOUI                                 0x0050f204