]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rtl8192u: align local ieee80211_wmm_ac_param struct fields with global
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 27 Apr 2015 05:25:38 +0000 (01:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 07:24:14 +0000 (09:24 +0200)
The <linux/ieee80211.h> and this local file both have a struct of the
same name.  They also have the same field sizes and generally the
same fields, as can be seen here:

   ~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {'
   drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param {
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h-};
   --
   include/linux/ieee80211.h:struct ieee80211_wmm_ac_param {
   include/linux/ieee80211.h-      u8 aci_aifsn; /* AIFSN, ACM, ACI */
   include/linux/ieee80211.h-      u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
   include/linux/ieee80211.h-      __le16 txop_limit;
   include/linux/ieee80211.h-} __packed;
   ~/git/linux-head$

Here we just align the local field names with the main system one.  Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.

Not that the replacement:

 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done

implicitly shows that only one of the three fields is currently used.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211.h
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c

index f6db98c7824c4fbeee83c3c27c882f3f6b99742c..14ef5e193f2e94e7d40992217d0e9b2802582dd6 100644 (file)
@@ -1277,9 +1277,9 @@ struct ieee80211_tim_parameters {
 
 //#else
 struct ieee80211_wmm_ac_param {
-       u8 ac_aci_acm_aifsn;
-       u8 ac_ecwmin_ecwmax;
-       u16 ac_txop_limit;
+       u8 aci_aifsn;
+       u8 cw;
+       u16 txop_limit;
 };
 
 struct ieee80211_wmm_ts_info {
index e833687c7371b9f3d9731999a00ac5955fe237c1..b374088c5ff87c11fa9f4baa78324d5680206ea6 100644 (file)
@@ -2366,10 +2366,10 @@ static inline void update_network(struct ieee80211_network *dst,
 
        /* dst->last_associate is not overwritten */
        dst->wmm_info = src->wmm_info; //sure to exist in beacon or probe response frame.
-       if (src->wmm_param[0].ac_aci_acm_aifsn|| \
-          src->wmm_param[1].ac_aci_acm_aifsn|| \
-          src->wmm_param[2].ac_aci_acm_aifsn|| \
-          src->wmm_param[3].ac_aci_acm_aifsn) {
+       if (src->wmm_param[0].aci_aifsn|| \
+          src->wmm_param[1].aci_aifsn|| \
+          src->wmm_param[2].aci_aifsn|| \
+          src->wmm_param[3].aci_aifsn) {
          memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
        }
        //dst->QoS_Enable = src->QoS_Enable;