staging: rtl8723au: Eliminate struct qos_priv
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:03:21 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:11:57 +0000 (13:11 -0700)
Having struct qos_priv containing a single integer, and carrying a
dedicated header file for it, is just plain silly. Move the integer
into struct mlme_priv, which is the only place qos_priv was used
anyway, and get rid of the header file.

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/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c
drivers/staging/rtl8723au/core/rtw_xmit.c
drivers/staging/rtl8723au/include/drv_types.h
drivers/staging/rtl8723au/include/rtw_mlme.h
drivers/staging/rtl8723au/include/rtw_qos.h [deleted file]

index 9b31412b75216aff3982d187d097943c1d0b2057..432f0a29892fb4bfb543226534f14c4558c3794c 100644 (file)
@@ -672,7 +672,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        /* todo: update wmm, ht cap */
        /* pmlmeinfo->WMM_enable; */
        /* pmlmeinfo->HT_enable; */
-       if (pmlmepriv->qospriv.qos_option)
+       if (pmlmepriv->qos_option)
                pmlmeinfo->WMM_enable = true;
        if (pmlmepriv->htpriv.ht_option) {
                pmlmeinfo->WMM_enable = true;
@@ -950,14 +950,14 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
 
        /* wmm */
        ie_len = 0;
-       pmlmepriv->qospriv.qos_option = 0;
+       pmlmepriv->qos_option = 0;
        if (pregistrypriv->wmm_enable) {
                for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
                        p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
                                          (pbss_network->IELength -
                                          _BEACON_IE_OFFSET_ - (ie_len + 2)));
                        if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) {
-                               pmlmepriv->qospriv.qos_option = 1;
+                               pmlmepriv->qos_option = 1;
 
                                *(p+8) |= BIT(7);/* QoS Info, support U-APSD */
 
@@ -1037,7 +1037,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        /* ht_cap */
        if (pregistrypriv->ht_enable && ht_cap) {
                pmlmepriv->htpriv.ht_option = true;
-               pmlmepriv->qospriv.qos_option = 1;
+               pmlmepriv->qos_option = 1;
 
                if (pregistrypriv->ampdu_enable == 1)
                        pmlmepriv->htpriv.ampdu_enable = true;
@@ -1864,7 +1864,7 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta)
        else
                psta->qos_option = 0;
 
-       if (pmlmepriv->qospriv.qos_option == 0)
+       if (pmlmepriv->qos_option == 0)
                psta->qos_option = 0;
 
        /* update 802.11n ht cap. */
index 272fb4f4a0478e9de5e647f732255bf3a6754d2e..1ff945caa8f0434ba667e5722a3b657d5a239216 100644 (file)
@@ -481,7 +481,6 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
        struct cmd_obj *pcmd;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct qos_priv *pqospriv = &pmlmepriv->qospriv;
        struct security_priv *psecuritypriv = &padapter->securitypriv;
        struct registry_priv *pregistrypriv = &padapter->registrypriv;
        struct ht_priv *phtpriv = &pmlmepriv->htpriv;
@@ -573,7 +572,7 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
                                       &psecnetwork->IEs[0],
                                       pnetwork->network.IELength);
 
-       pqospriv->qos_option = 0;
+       pmlmepriv->qos_option = 0;
 
        if (pregistrypriv->wmm_enable) {
                u32 tmp_len;
@@ -587,10 +586,10 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
                if (psecnetwork->IELength != tmp_len) {
                        psecnetwork->IELength = tmp_len;
                        /* There is WMM IE in this corresp. beacon */
-                       pqospriv->qos_option = 1;
+                       pmlmepriv->qos_option = 1;
                } else {
                        /* There is no WMM IE in this corresp. beacon */
-                       pqospriv->qos_option = 0;
+                       pmlmepriv->qos_option = 0;
                }
        }
 
index f02b314d25e0658fa88f22e44228e693033871e8..ddbe6c6482251eda8b31d0415245bffdce68ec2d 100644 (file)
@@ -2239,7 +2239,6 @@ unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
        struct ieee80211_ht_cap ht_capie;
        unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct qos_priv *pqospriv = &pmlmepriv->qospriv;
        struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 
        phtpriv->ht_option = false;
@@ -2248,13 +2247,13 @@ unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
 
        if (p && p[1] > 0) {
                u32 rx_packet_offset, max_recvbuf_sz;
-               if (pqospriv->qos_option == 0) {
+               if (pmlmepriv->qos_option == 0) {
                        out_len = *pout_len;
                        pframe = rtw_set_ie23a(out_ie + out_len,
                                            WLAN_EID_VENDOR_SPECIFIC,
                                            _WMM_IE_Length_, WMM_IE, pout_len);
 
-                       pqospriv->qos_option = 1;
+                       pmlmepriv->qos_option = 1;
                }
 
                out_len = *pout_len;
index 3a0a4229e5ed3a477fb529c0f4a35d3f3f6409c8..5ac41131a1a905da66b1e854bd609b6289b4d382 100644 (file)
@@ -1540,7 +1540,7 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        pstat->uapsd_vi = 0;
        pstat->uapsd_be = 0;
        pstat->uapsd_bk = 0;
-       if (pmlmepriv->qospriv.qos_option) {
+       if (pmlmepriv->qos_option) {
                const u8 *end = pos + left;
                p = pos;
 
@@ -3225,7 +3225,7 @@ void issue_asocrsp23a(struct rtw_adapter *padapter, unsigned short status,
        }
 
        /* FILL WMM IE */
-       if (pstat->flags & WLAN_STA_WME && pmlmepriv->qospriv.qos_option) {
+       if (pstat->flags & WLAN_STA_WME && pmlmepriv->qos_option) {
                unsigned char WMM_PARA_IE[] = {0x00, 0x50, 0xf2, 0x02,
                                               0x01, 0x01};
                int ie_len = 0;
@@ -5369,7 +5369,7 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
        psta->htpriv.candidate_tid_bitmap = 0x0;/* reset */
 
        /* QoS */
-       if (pmlmepriv->qospriv.qos_option)
+       if (pmlmepriv->qos_option)
                psta->qos_option = true;
 
        psta->state = _FW_LINKED;
index 09f3a66010d991759ca9da6c9073fcd566ab64c9..0241a19d5f56df8ce56e8e3441bbbf8605ab70e5 100644 (file)
@@ -506,7 +506,7 @@ int WMM_param_handler23a(struct rtw_adapter *padapter, struct ndis_802_11_var_ie
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
-       if (pmlmepriv->qospriv.qos_option == 0) {
+       if (pmlmepriv->qos_option == 0) {
                pmlmeinfo->WMM_enable = 0;
                return _FAIL;
        }
index 31a44feaab1d8432ee09211d73f4aecb6e3f5f20..470d868f0f5c4a02dca7656ca8252fbd4754aad2 100644 (file)
@@ -473,7 +473,6 @@ static s32 update_attrib(struct rtw_adapter *padapter,
        struct sta_priv *pstapriv = &padapter->stapriv;
        struct security_priv *psecuritypriv = &padapter->securitypriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct qos_priv *pqospriv = &pmlmepriv->qospriv;
        int res = _SUCCESS;
        struct ethhdr *ehdr = (struct ethhdr *) skb->data;
 
@@ -586,7 +585,7 @@ static s32 update_attrib(struct rtw_adapter *padapter,
                if (psta->qos_option)
                        set_qos(skb, pattrib);
        } else {
-               if (pqospriv->qos_option) {
+               if (pmlmepriv->qos_option) {
                        set_qos(skb, pattrib);
 
                        if (pmlmepriv->acm_mask != 0) {
@@ -767,7 +766,7 @@ static s32 xmitframe_addmic(struct rtw_adapter *padapter,
                                                         &pframe[10], 6);
                        }
 
-                       /* if (pqospriv->qos_option == 1) */
+                       /* if (pmlmepriv->qos_option == 1) */
                        if (pattrib->qos_en)
                                priority[0] = (u8)pxmitframe->attrib.priority;
 
@@ -905,7 +904,6 @@ s32 rtw_make_wlanhdr23a(struct rtw_adapter *padapter, u8 *hdr,
 
        struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct qos_priv *pqospriv = &pmlmepriv->qospriv;
        u8 qos_option = false;
        int res = _SUCCESS;
        __le16 *fctrl = &pwlanhdr->frame_control;
@@ -948,7 +946,7 @@ s32 rtw_make_wlanhdr23a(struct rtw_adapter *padapter, u8 *hdr,
                        memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
                        memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
 
-                       if (pqospriv->qos_option)
+                       if (pmlmepriv->qos_option)
                                qos_option = true;
 
                }
index bec8fd7126d1bf82fa34cde59607a944ffc342e7..a61408cc7eb3175c42ca4ef41b4a244a9d7498cc 100644 (file)
@@ -43,7 +43,6 @@ enum _NIC_VERSION {
 #include <rtw_recv.h>
 #include <hal_intf.h>
 #include <hal_com.h>
-#include <rtw_qos.h>
 #include <rtw_security.h>
 #include <rtw_pwrctrl.h>
 #include <rtw_io.h>
index 50a2f90095266fe0ae58fe560ae1b7839ba91401..6dd8fb4765532ab3285a8895d2cd2cc983d69866 100644 (file)
@@ -237,7 +237,7 @@ struct mlme_priv {
        struct timer_list set_scan_deny_timer;
        atomic_t set_scan_deny; /* 0: allowed, 1: deny */
 
-       struct qos_priv qospriv;
+       unsigned int qos_option;
 
        /* Number of non-HT AP/stations */
        int num_sta_no_ht;
diff --git a/drivers/staging/rtl8723au/include/rtw_qos.h b/drivers/staging/rtl8723au/include/rtw_qos.h
deleted file mode 100644 (file)
index 68fc5ba..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- ******************************************************************************/
-
-#ifndef _RTW_QOS_H_
-#define _RTW_QOS_H_
-
-#include <osdep_service.h>
-
-struct qos_priv        {
-       /* bit mask option: u-apsd, s-apsd, ts, block ack... */
-       unsigned int      qos_option;
-};
-
-#endif /* _RTL871X_QOS_H_ */