Commit bd8ad4a5 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman
Browse files

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: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62dff10d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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. */
+3 −4
Original line number Diff line number Diff line
@@ -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;
		}
	}

+2 −3
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}
Loading