1
0
Fork 0

staging: rtl8723au: Eliminate struct qos_priv

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>
wifi-calibration
Jes Sorensen 2014-05-09 15:03:21 +02:00 committed by Greg Kroah-Hartman
parent 62dff10d20
commit bd8ad4a510
9 changed files with 18 additions and 49 deletions

View 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. */

View 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;
}
}

View 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;

View 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;

View 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;
}

View 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;
}

View 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>

View 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;

View File

@ -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_ */