]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: r8188eu: change rtw_ieee80211_ht_cap type of structures members to ieee80211...
authorIvan Safonov <insafonov@gmail.com>
Wed, 24 Aug 2016 08:21:33 +0000 (15:21 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 16:01:40 +0000 (18:01 +0200)
Also cap_info member of ieee80211_ht_cap wrapped by le16_to_cpu function.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ap.c
drivers/staging/rtl8188eu/include/ieee80211.h
drivers/staging/rtl8188eu/include/rtw_ht.h

index 1bccd0a4f0367e2506ce0c1c3299c1b4926d5f22..a148e7d0c9bd905670e8494fed41af20ea0f6c81 100644 (file)
@@ -481,7 +481,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
                        limit = 8;/*   1R */
 
                for (i = 0; i < limit; i++) {
-                       if (psta_ht->ht_cap.supp_mcs_set[i/8] & BIT(i%8))
+                       if (psta_ht->ht_cap.mcs.rx_mask[i / 8] & BIT(i % 8))
                                tx_ra_bitmap |= BIT(i+12);
                }
 
@@ -658,11 +658,15 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
                phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable;
 
                /* check if sta support s Short GI */
-               if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40))
+               if (le16_to_cpu(phtpriv_sta->ht_cap.cap_info &
+                               phtpriv_ap->ht_cap.cap_info) &
+                   (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40))
                        phtpriv_sta->sgi = true;
 
                /*  bwmode */
-               if ((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) {
+               if (le16_to_cpu(phtpriv_sta->ht_cap.cap_info &
+                               phtpriv_ap->ht_cap.cap_info) &
+                   IEEE80211_HT_CAP_SUP_WIDTH) {
                        phtpriv_sta->bwmode = pmlmeext->cur_bwmode;
                        phtpriv_sta->ch_offset = pmlmeext->cur_ch_offset;
                }
@@ -1422,7 +1426,8 @@ static int rtw_ht_operation_update(struct adapter *padapter)
        if (pmlmepriv->num_sta_no_ht ||
            (pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT))
                new_op_mode = OP_MODE_MIXED;
-       else if ((phtpriv_ap->ht_cap.cap_info & IEEE80211_HT_CAP_SUP_WIDTH) &&
+       else if ((le16_to_cpu(phtpriv_ap->ht_cap.cap_info) &
+                 IEEE80211_HT_CAP_SUP_WIDTH) &&
                 pmlmepriv->num_sta_ht_20mhz)
                new_op_mode = OP_MODE_20MHZ_HT_STA_ASSOCED;
        else if (pmlmepriv->olbc_ht)
@@ -1552,7 +1557,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
        }
 
        if (psta->flags & WLAN_STA_HT) {
-               u16 ht_capab = psta->htpriv.ht_cap.cap_info;
+               u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);
 
                DBG_88E("HT: STA %pM HT Capabilities Info: 0x%04x\n",
                        (psta->hwaddr), ht_capab);
index e45ef1422c6f0708727eaecd294533b6241877f6..b57f5d715eed2701ee5549c2460c923b7e7472e9 100644 (file)
@@ -239,7 +239,7 @@ struct ieee_param {
                        u16 capability;
                        int flags;
                        u8 tx_supp_rates[16];
-                       struct rtw_ieee80211_ht_cap ht_cap;
+                       struct ieee80211_ht_cap ht_cap;
                } add_sta;
                struct {
                        u8      reserved[2];/* for set max_num_sta */
@@ -264,7 +264,7 @@ struct sta_data {
        u32 sta_set;
        u8 tx_supp_rates[16];
        u32 tx_supp_rates_len;
-       struct rtw_ieee80211_ht_cap ht_cap;
+       struct ieee80211_ht_cap ht_cap;
        u64     rx_pkts;
        u64     rx_bytes;
        u64     rx_drops;
index b45483fd069fab07afd58a6d7c2ae8fb08d37d19..7beb0b1f9e213ebe1088dae4b86c1ad9e626e0be 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef _RTW_HT_H_
 #define _RTW_HT_H_
 
+#include <linux/ieee80211.h>
 #include <osdep_service.h>
-#include "wifi.h"
 
 struct ht_priv {
        u32     ht_option;
@@ -33,7 +33,7 @@ struct ht_priv {
        u8      agg_enable_bitmap;
        u8      candidate_tid_bitmap;
 
-       struct rtw_ieee80211_ht_cap ht_cap;
+       struct ieee80211_ht_cap ht_cap;
 };
 
 #endif /* _RTL871X_HT_H_ */