From nobody Mon Apr 13 14:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19CEFC433FE for ; Sun, 13 Nov 2022 04:37:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235235AbiKMEhd (ORCPT ); Sat, 12 Nov 2022 23:37:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235233AbiKMEgh (ORCPT ); Sat, 12 Nov 2022 23:36:37 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93AAC13CF3 for ; Sat, 12 Nov 2022 20:36:19 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so5544749wmi.3 for ; Sat, 12 Nov 2022 20:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2DKr7cwbkVgEdJvuHQ0DWRO4kJzVzO0mkTMPxDpfInI=; b=WWQniVj+v02JZBk+1TvKBaHKMDoGBi3MPb000u8U/EgiTH/T1TxTiJx1+iimQ5gQ3W ij9YE9TpbEOX7EmF9lr/gxbEe6+Vyls40Cf94NhB7ehQE9HUCalDAUnaJrAGNFNLMbZf 8ufR80v/LwG+WOVPiE7xrfffM5QNzcMxl8MnE/CsblD8Xbj+lnm6L9OvqOI3ONjli+O/ mdOtwLMF7tuMMArz25yUQTXs3qDSbY0Mg0U4WKNmod4fqYuio0vvzYBwh0IKzszOfmzA RTLvIBq0bet2gPsBLCsB3g8jI7ehL6Q6tZyJ9ZQYe0cBJZO6NtnTVn1+oGgHsxruTOoq kM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2DKr7cwbkVgEdJvuHQ0DWRO4kJzVzO0mkTMPxDpfInI=; b=ALvhcXChShPF0I33g7bzDTM2BHv4oZCftKbQ9qgB1lkqieK3RzE+7GLxiIPD91lZI/ ghO5OxHBSRuAoRs+hoiV5EcCjQByp6lg4giW+xL+pi/P5WWIVI4faUInwnw5285ulwI5 Z6yTdxIeOHwNeWIC5vdP7Njw7tqwQpFJRAJfBVlczd0hvEz1R5g98V3hntojr42wVJDU BR4bXaWmnwh2CYWJ6GVwnVlh5DIL6Bwq5LtPNo7LZwiu2OEc43mw50sQOcArvjkLi5oU ssDv1uVy3xEqWnjsd7gCxe3UGZnwICNxZaNg5cYx2fPMFCfohnj/N9AqUPVWTaCBx+NY AT2g== X-Gm-Message-State: ANoB5pmXpwyniA4RkRDs6d/ZUKV5QrwJXUxx2mbSi11IxAWxJoC9O2qU emWRm46PNdwQsqWtssuZltQ= X-Google-Smtp-Source: AA0mqf7Fg/LaxV/0UzvOCF52HyDH0HCvbm0mKeC5DGhit675MLM1B+TxyttvEztwgVfEu9C7mtWW5A== X-Received: by 2002:a05:600c:1c89:b0:3cf:a41d:8418 with SMTP id k9-20020a05600c1c8900b003cfa41d8418mr5219611wms.190.1668314177739; Sat, 12 Nov 2022 20:36:17 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p54a07888.dip0.t-ipconnect.de. [84.160.120.136]) by smtp.gmail.com with ESMTPSA id c15-20020a05600c0a4f00b003b3365b38f9sm8229677wmq.10.2022.11.12.20.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 20:36:17 -0800 (PST) Date: Sun, 13 Nov 2022 05:36:15 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 10/10] staging: rtl8192e: Rename pHTInfo Message-ID: <88cdc0ef393c92cb2102a66893c5320e8c8606df.1668313325.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rename variable pHTInfo to ht_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 +- drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 12 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 50 +-- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtl819x_BAProc.c | 20 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 354 +++++++++--------- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 4 +- drivers/staging/rtl8192e/rtllib_module.c | 6 +- drivers/staging/rtl8192e/rtllib_rx.c | 12 +- drivers/staging/rtl8192e/rtllib_softmac.c | 78 ++-- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 8 +- drivers/staging/rtl8192e/rtllib_tx.c | 54 +-- 14 files changed, 307 insertions(+), 307 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/stagi= ng/rtl8192e/rtl8192e/r8192E_dev.c index e530f917fd23..b9c846015d28 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1978,7 +1978,7 @@ void rtl92e_update_ratr_table(struct net_device *dev) break; case IEEE_N_24G: case IEEE_N_5G: - if (ieee->pHTInfo->peer_mimo_ps =3D=3D 0) { + if (ieee->ht_info->peer_mimo_ps =3D=3D 0) { ratr_value &=3D 0x0007F007; } else { if (priv->rf_type =3D=3D RF_1T2R) @@ -1991,11 +1991,11 @@ void rtl92e_update_ratr_table(struct net_device *de= v) break; } ratr_value &=3D 0x0FFFFFFF; - if (ieee->pHTInfo->cur_tx_bw40mhz && - ieee->pHTInfo->bCurShortGI40MHz) + if (ieee->ht_info->cur_tx_bw40mhz && + ieee->ht_info->bCurShortGI40MHz) ratr_value |=3D 0x80000000; - else if (!ieee->pHTInfo->cur_tx_bw40mhz && - ieee->pHTInfo->bCurShortGI20MHz) + else if (!ieee->ht_info->cur_tx_bw40mhz && + ieee->ht_info->bCurShortGI20MHz) ratr_value |=3D 0x80000000; rtl92e_writel(dev, RATR0+rate_index*4, ratr_value); rtl92e_writeb(dev, UFWP, 1); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/= rtl8192e/rtl8192e/rtl_cam.c index 9d8d4837e6b2..a4d65b4d99c2 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c @@ -41,7 +41,7 @@ void rtl92e_enable_hw_security_config(struct net_device *= dev) } =20 ieee->hwsec_active =3D 1; - if ((ieee->pHTInfo->iot_action & HT_IOT_ACT_PURE_N_MODE) || !hwwep) { + if ((ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE) || !hwwep) { ieee->hwsec_active =3D 0; SECR_value &=3D ~SCR_RxDecEnable; } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging= /rtl8192e/rtl8192e/rtl_core.c index 43601ec8d903..399ee9783f99 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -307,7 +307,7 @@ static void _rtl92e_update_cap(struct net_device *dev, = u16 cap) u8 cur_slot_time =3D priv->slot_time; =20 if ((cap & WLAN_CAPABILITY_SHORT_SLOT_TIME) && - (!priv->rtllib->pHTInfo->current_rt2rt_long_slot_time)) { + (!priv->rtllib->ht_info->current_rt2rt_long_slot_time)) { if (cur_slot_time !=3D SHORT_SLOT_TIME) { slot_time_val =3D SHORT_SLOT_TIME; priv->rtllib->SetHwRegHandler(dev, @@ -339,10 +339,10 @@ static void _rtl92e_update_beacon(void *data) struct rtllib_device *ieee =3D priv->rtllib; struct rtllib_network *net =3D &ieee->current_network; =20 - if (ieee->pHTInfo->bCurrentHTSupport) + if (ieee->ht_info->bCurrentHTSupport) HT_update_self_and_peer_setting(ieee, net); - ieee->pHTInfo->current_rt2rt_long_slot_time =3D net->bssht.bd_rt2rt_long_= slot_time; - ieee->pHTInfo->RT2RT_HT_Mode =3D net->bssht.rt2rt_ht_mode; + ieee->ht_info->current_rt2rt_long_slot_time =3D net->bssht.bd_rt2rt_long_= slot_time; + ieee->ht_info->RT2RT_HT_Mode =3D net->bssht.rt2rt_ht_mode; _rtl92e_update_cap(dev, net->capability); } =20 @@ -672,9 +672,9 @@ void rtl92e_set_wireless_mode(struct net_device *dev, u= 8 wireless_mode) =20 if ((wireless_mode =3D=3D WIRELESS_MODE_N_24G) || (wireless_mode =3D=3D WIRELESS_MODE_N_5G)) { - priv->rtllib->pHTInfo->enable_ht =3D 1; + priv->rtllib->ht_info->enable_ht =3D 1; } else { - priv->rtllib->pHTInfo->enable_ht =3D 0; + priv->rtllib->ht_info->enable_ht =3D 0; } _rtl92e_refresh_support_rate(priv); } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/r= tl8192e/rtl8192e/rtl_dm.c index e0f6f1405c17..a18393c8a833 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -321,7 +321,7 @@ void rtl92e_init_adaptive_rate(struct net_device *dev) static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev) { struct r8192_priv *priv =3D rtllib_priv(dev); - struct rt_hi_throughput *pHTInfo =3D priv->rtllib->pHTInfo; + struct rt_hi_throughput *ht_info =3D priv->rtllib->ht_info; struct rate_adaptive *pra =3D &priv->rate_adaptive; u32 currentRATR, targetRATR =3D 0; u32 LowRSSIThreshForRA =3D 0, HighRSSIThreshForRA =3D 0; @@ -340,10 +340,10 @@ static void _rtl92e_dm_check_rate_adaptive(struct net= _device *dev) =20 if (priv->rtllib->state =3D=3D RTLLIB_LINKED) { =20 - bshort_gi_enabled =3D (pHTInfo->cur_tx_bw40mhz && - pHTInfo->bCurShortGI40MHz) || - (!pHTInfo->cur_tx_bw40mhz && - pHTInfo->bCurShortGI20MHz); + bshort_gi_enabled =3D (ht_info->cur_tx_bw40mhz && + ht_info->bCurShortGI40MHz) || + (!ht_info->cur_tx_bw40mhz && + ht_info->bCurShortGI20MHz); =20 pra->upper_rssi_threshold_ratr =3D (pra->upper_rssi_threshold_ratr & (~BIT31)) | @@ -1532,7 +1532,7 @@ void rtl92e_dm_init_edca_turbo(struct net_device *dev) static void _rtl92e_dm_check_edca_turbo(struct net_device *dev) { struct r8192_priv *priv =3D rtllib_priv(dev); - struct rt_hi_throughput *pHTInfo =3D priv->rtllib->pHTInfo; + struct rt_hi_throughput *ht_info =3D priv->rtllib->ht_info; =20 static unsigned long lastTxOkCnt; static unsigned long lastRxOkCnt; @@ -1543,18 +1543,18 @@ static void _rtl92e_dm_check_edca_turbo(struct net_= device *dev) goto dm_CheckEdcaTurbo_EXIT; if (priv->rtllib->state !=3D RTLLIB_LINKED) goto dm_CheckEdcaTurbo_EXIT; - if (priv->rtllib->pHTInfo->iot_action & HT_IOT_ACT_DISABLE_EDCA_TURBO) + if (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_DISABLE_EDCA_TURBO) goto dm_CheckEdcaTurbo_EXIT; =20 if (!priv->rtllib->bis_any_nonbepkts) { curTxOkCnt =3D priv->stats.txbytesunicast - lastTxOkCnt; curRxOkCnt =3D priv->stats.rxbytesunicast - lastRxOkCnt; - if (pHTInfo->iot_action & HT_IOT_ACT_EDCA_BIAS_ON_RX) { + if (ht_info->iot_action & HT_IOT_ACT_EDCA_BIAS_ON_RX) { if (curTxOkCnt > 4*curRxOkCnt) { if (priv->bis_cur_rdlstate || !priv->bcurrent_turbo_EDCA) { rtl92e_writel(dev, EDCAPARA_BE, - edca_setting_UL[pHTInfo->IOTPeer]); + edca_setting_UL[ht_info->IOTPeer]); priv->bis_cur_rdlstate =3D false; } } else { @@ -1562,10 +1562,10 @@ static void _rtl92e_dm_check_edca_turbo(struct net_= device *dev) !priv->bcurrent_turbo_EDCA) { if (priv->rtllib->mode =3D=3D WIRELESS_MODE_G) rtl92e_writel(dev, EDCAPARA_BE, - edca_setting_DL_GMode[pHTInfo->IOTPeer]); + edca_setting_DL_GMode[ht_info->IOTPeer]); else rtl92e_writel(dev, EDCAPARA_BE, - edca_setting_DL[pHTInfo->IOTPeer]); + edca_setting_DL[ht_info->IOTPeer]); priv->bis_cur_rdlstate =3D true; } } @@ -1576,17 +1576,17 @@ static void _rtl92e_dm_check_edca_turbo(struct net_= device *dev) !priv->bcurrent_turbo_EDCA) { if (priv->rtllib->mode =3D=3D WIRELESS_MODE_G) rtl92e_writel(dev, EDCAPARA_BE, - edca_setting_DL_GMode[pHTInfo->IOTPeer]); + edca_setting_DL_GMode[ht_info->IOTPeer]); else rtl92e_writel(dev, EDCAPARA_BE, - edca_setting_DL[pHTInfo->IOTPeer]); + edca_setting_DL[ht_info->IOTPeer]); priv->bis_cur_rdlstate =3D true; } } else { if (priv->bis_cur_rdlstate || !priv->bcurrent_turbo_EDCA) { rtl92e_writel(dev, EDCAPARA_BE, - edca_setting_UL[pHTInfo->IOTPeer]); + edca_setting_UL[ht_info->IOTPeer]); priv->bis_cur_rdlstate =3D false; } =20 @@ -1621,23 +1621,23 @@ static void _rtl92e_dm_init_cts_to_self(struct net_= device *dev) static void _rtl92e_dm_cts_to_self(struct net_device *dev) { struct r8192_priv *priv =3D rtllib_priv((struct net_device *)dev); - struct rt_hi_throughput *pHTInfo =3D priv->rtllib->pHTInfo; + struct rt_hi_throughput *ht_info =3D priv->rtllib->ht_info; static unsigned long lastTxOkCnt; static unsigned long lastRxOkCnt; unsigned long curTxOkCnt =3D 0; unsigned long curRxOkCnt =3D 0; =20 if (!priv->rtllib->bCTSToSelfEnable) { - pHTInfo->iot_action &=3D ~HT_IOT_ACT_FORCED_CTS2SELF; + ht_info->iot_action &=3D ~HT_IOT_ACT_FORCED_CTS2SELF; return; } - if (pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) { + if (ht_info->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) { curTxOkCnt =3D priv->stats.txbytesunicast - lastTxOkCnt; curRxOkCnt =3D priv->stats.rxbytesunicast - lastRxOkCnt; if (curRxOkCnt > 4*curTxOkCnt) - pHTInfo->iot_action &=3D ~HT_IOT_ACT_FORCED_CTS2SELF; + ht_info->iot_action &=3D ~HT_IOT_ACT_FORCED_CTS2SELF; else - pHTInfo->iot_action |=3D HT_IOT_ACT_FORCED_CTS2SELF; + ht_info->iot_action |=3D HT_IOT_ACT_FORCED_CTS2SELF; =20 lastTxOkCnt =3D priv->stats.txbytesunicast; lastRxOkCnt =3D priv->stats.rxbytesunicast; @@ -1648,10 +1648,10 @@ static void _rtl92e_dm_cts_to_self(struct net_devic= e *dev) static void _rtl92e_dm_init_wa_broadcom_iot(struct net_device *dev) { struct r8192_priv *priv =3D rtllib_priv((struct net_device *)dev); - struct rt_hi_throughput *pHTInfo =3D priv->rtllib->pHTInfo; + struct rt_hi_throughput *ht_info =3D priv->rtllib->ht_info; =20 - pHTInfo->bWAIotBroadcom =3D false; - pHTInfo->WAIotTH =3D WAIotTHVal; + ht_info->bWAIotBroadcom =3D false; + ht_info->WAIotTH =3D WAIotTHVal; } =20 static void _rtl92e_dm_check_rf_ctrl_gpio(void *data) @@ -1992,7 +1992,7 @@ static void _rtl92e_dm_fsync_timer_callback(struct ti= mer_list *t) =20 if (priv->rtllib->state =3D=3D RTLLIB_LINKED && priv->rtllib->bfsync_enable && - (priv->rtllib->pHTInfo->iot_action & HT_IOT_ACT_CDD_FSYNC)) { + (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_CDD_FSYNC)) { u32 rate_bitmap; =20 for (rate_index =3D 0; rate_index <=3D 27; rate_index++) { @@ -2163,7 +2163,7 @@ static void _rtl92e_dm_check_fsync(struct net_device = *dev) static u32 reset_cnt; =20 if (priv->rtllib->state =3D=3D RTLLIB_LINKED && - priv->rtllib->pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) { + priv->rtllib->ht_info->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) { if (priv->rtllib->bfsync_enable =3D=3D 0) { switch (priv->rtllib->fsync_state) { case Default_Fsync: @@ -2288,7 +2288,7 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_de= vice *dev) priv->bDynamicTxLowPower =3D false; return; } - if ((priv->rtllib->pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_ATHEROS) && + if ((priv->rtllib->ht_info->IOTPeer =3D=3D HT_IOT_PEER_ATHEROS) && (priv->rtllib->mode =3D=3D IEEE_G)) { txhipower_threshold =3D TX_POWER_ATHEROAP_THRESH_HIGH; txlowpower_threshold =3D TX_POWER_ATHEROAP_THRESH_LOW; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/r= tl8192e/rtl8192e/rtl_wx.c index 7ff14aa9f476..bf0030144e5d 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -915,7 +915,7 @@ static int _rtl92e_wx_set_encode_ext(struct net_device = *dev, key, 0); } else { if ((ieee->pairwise_key_type =3D=3D KEY_TYPE_CCMP) && - ieee->pHTInfo->bCurrentHTSupport) + ieee->ht_info->bCurrentHTSupport) rtl92e_writeb(dev, 0x173, 1); rtl92e_set_key(dev, 4, idx, alg, (u8 *)ieee->ap_mac_addr, 0, key); diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rt= l8192e/rtl819x_BAProc.c index 7c0369319f97..acc19514bca6 100644 --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c @@ -244,13 +244,13 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, st= ruct sk_buff *skb) pBaStartSeqCtrl =3D (union sequence_control *)(req + 7); =20 if (!ieee->current_network.qos_data.active || - !ieee->pHTInfo->bCurrentHTSupport || - (ieee->pHTInfo->iot_action & HT_IOT_ACT_REJECT_ADDBA_REQ)) { + !ieee->ht_info->bCurrentHTSupport || + (ieee->ht_info->iot_action & HT_IOT_ACT_REJECT_ADDBA_REQ)) { rc =3D ADDBA_STATUS_REFUSED; netdev_warn(ieee->dev, "Failed to reply on ADDBA_REQ as some capability is not ready(%d, %= d)\n", ieee->current_network.qos_data.active, - ieee->pHTInfo->bCurrentHTSupport); + ieee->ht_info->bCurrentHTSupport); goto OnADDBAReq_Fail; } if (!GetTs(ieee, (struct ts_common_info **)&pTS, dst, @@ -277,7 +277,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, stru= ct sk_buff *skb) pBA->ba_start_seq_ctrl =3D *pBaStartSeqCtrl; =20 if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) || - (ieee->pHTInfo->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT)) + (ieee->ht_info->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT)) pBA->ba_param_set.field.buffer_size =3D 1; else pBA->ba_param_set.field.buffer_size =3D 32; @@ -326,13 +326,13 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, st= ruct sk_buff *skb) pBaTimeoutVal =3D (u16 *)(tag + 7); =20 if (!ieee->current_network.qos_data.active || - !ieee->pHTInfo->bCurrentHTSupport || - !ieee->pHTInfo->bCurrentAMPDUEnable) { + !ieee->ht_info->bCurrentHTSupport || + !ieee->ht_info->bCurrentAMPDUEnable) { netdev_warn(ieee->dev, "reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n", ieee->current_network.qos_data.active, - ieee->pHTInfo->bCurrentHTSupport, - ieee->pHTInfo->bCurrentAMPDUEnable); + ieee->ht_info->bCurrentHTSupport, + ieee->ht_info->bCurrentAMPDUEnable); ReasonCode =3D DELBA_REASON_UNKNOWN_BA; goto OnADDBARsp_Reject; } @@ -413,11 +413,11 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struc= t sk_buff *skb) } =20 if (!ieee->current_network.qos_data.active || - !ieee->pHTInfo->bCurrentHTSupport) { + !ieee->ht_info->bCurrentHTSupport) { netdev_warn(ieee->dev, "received DELBA while QOS or HT is not supported(%d, %d)\n", ieee->current_network. qos_data.active, - ieee->pHTInfo->bCurrentHTSupport); + ieee->ht_info->bCurrentHTSupport); return -1; } =20 diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rt= l8192e/rtl819x_HTProc.c index 2c4c1cb4cbed..fe30a291e64c 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -69,48 +69,48 @@ static u8 LINKSYS_MARVELL_4400N[3] =3D {0x00, 0x14, 0xa= 4}; =20 void HTUpdateDefaultSetting(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - pHTInfo->bRegShortGI20MHz =3D 1; - pHTInfo->bRegShortGI40MHz =3D 1; + ht_info->bRegShortGI20MHz =3D 1; + ht_info->bRegShortGI40MHz =3D 1; =20 - pHTInfo->bRegBW40MHz =3D 1; + ht_info->bRegBW40MHz =3D 1; =20 - if (pHTInfo->bRegBW40MHz) - pHTInfo->bRegSuppCCK =3D 1; + if (ht_info->bRegBW40MHz) + ht_info->bRegSuppCCK =3D 1; else - pHTInfo->bRegSuppCCK =3D true; + ht_info->bRegSuppCCK =3D true; =20 - pHTInfo->nAMSDU_MaxSize =3D 7935UL; - pHTInfo->bAMSDU_Support =3D 0; + ht_info->nAMSDU_MaxSize =3D 7935UL; + ht_info->bAMSDU_Support =3D 0; =20 - pHTInfo->bAMPDUEnable =3D 1; - pHTInfo->AMPDU_Factor =3D 2; - pHTInfo->MPDU_Density =3D 0; + ht_info->bAMPDUEnable =3D 1; + ht_info->AMPDU_Factor =3D 2; + ht_info->MPDU_Density =3D 0; =20 - pHTInfo->self_mimo_ps =3D 3; - if (pHTInfo->self_mimo_ps =3D=3D 2) - pHTInfo->self_mimo_ps =3D 3; + ht_info->self_mimo_ps =3D 3; + if (ht_info->self_mimo_ps =3D=3D 2) + ht_info->self_mimo_ps =3D 3; ieee->tx_dis_rate_fallback =3D 0; ieee->tx_use_drv_assinged_rate =3D 0; =20 ieee->bTxEnableFwCalcDur =3D 1; =20 - pHTInfo->reg_rt2rt_aggregation =3D 1; + ht_info->reg_rt2rt_aggregation =3D 1; =20 - pHTInfo->reg_rx_reorder_enable =3D 1; - pHTInfo->rx_reorder_win_size =3D 64; - pHTInfo->rx_reorder_pending_time =3D 30; + ht_info->reg_rx_reorder_enable =3D 1; + ht_info->rx_reorder_win_size =3D 64; + ht_info->rx_reorder_pending_time =3D 30; } =20 static u16 HTMcsToDataRate(struct rtllib_device *ieee, u8 nMcsRate) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - u8 is40MHz =3D (pHTInfo->bCurBW40MHz) ? 1 : 0; - u8 isShortGI =3D (pHTInfo->bCurBW40MHz) ? - ((pHTInfo->bCurShortGI40MHz) ? 1 : 0) : - ((pHTInfo->bCurShortGI20MHz) ? 1 : 0); + u8 is40MHz =3D (ht_info->bCurBW40MHz) ? 1 : 0; + u8 isShortGI =3D (ht_info->bCurBW40MHz) ? + ((ht_info->bCurShortGI40MHz) ? 1 : 0) : + ((ht_info->bCurShortGI20MHz) ? 1 : 0); return MCS_DATA_RATE[is40MHz][isShortGI][(nMcsRate & 0x7f)]; } =20 @@ -166,45 +166,45 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) =20 static void HTIOTPeerDetermine(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; struct rtllib_network *net =3D &ieee->current_network; =20 if (net->bssht.bd_rt2rt_aggregation) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_REALTEK; + ht_info->IOTPeer =3D HT_IOT_PEER_REALTEK; if (net->bssht.rt2rt_ht_mode & RT_HT_CAP_USE_92SE) - pHTInfo->IOTPeer =3D HT_IOT_PEER_REALTEK_92SE; + ht_info->IOTPeer =3D HT_IOT_PEER_REALTEK_92SE; if (net->bssht.rt2rt_ht_mode & RT_HT_CAP_USE_SOFTAP) - pHTInfo->IOTPeer =3D HT_IOT_PEER_92U_SOFTAP; + ht_info->IOTPeer =3D HT_IOT_PEER_92U_SOFTAP; } else if (net->broadcom_cap_exist) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_BROADCOM; + ht_info->IOTPeer =3D HT_IOT_PEER_BROADCOM; } else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) || !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || !memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_BROADCOM; + ht_info->IOTPeer =3D HT_IOT_PEER_BROADCOM; } else if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) =3D=3D 0) || (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) =3D=3D 0) || (memcmp(net->bssid, PCI_RALINK, 3) =3D=3D 0) || (memcmp(net->bssid, EDIMAX_RALINK, 3) =3D=3D 0) || (memcmp(net->bssid, AIRLINK_RALINK, 3) =3D=3D 0) || net->ralink_cap_exist) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_RALINK; + ht_info->IOTPeer =3D HT_IOT_PEER_RALINK; } else if ((net->atheros_cap_exist) || (memcmp(net->bssid, DLINK_ATHEROS_1, 3) =3D=3D 0) || (memcmp(net->bssid, DLINK_ATHEROS_2, 3) =3D=3D 0)) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_ATHEROS; + ht_info->IOTPeer =3D HT_IOT_PEER_ATHEROS; } else if ((memcmp(net->bssid, CISCO_BROADCOM, 3) =3D=3D 0) || net->cisco_cap_exist) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_CISCO; + ht_info->IOTPeer =3D HT_IOT_PEER_CISCO; } else if ((memcmp(net->bssid, LINKSYS_MARVELL_4400N, 3) =3D=3D 0) || net->marvell_cap_exist) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_MARVELL; + ht_info->IOTPeer =3D HT_IOT_PEER_MARVELL; } else if (net->airgo_cap_exist) { - pHTInfo->IOTPeer =3D HT_IOT_PEER_AIRGO; + ht_info->IOTPeer =3D HT_IOT_PEER_AIRGO; } else { - pHTInfo->IOTPeer =3D HT_IOT_PEER_UNKNOWN; + ht_info->IOTPeer =3D HT_IOT_PEER_UNKNOWN; } =20 - netdev_dbg(ieee->dev, "IOTPEER: %x\n", pHTInfo->IOTPeer); + netdev_dbg(ieee->dev, "IOTPEER: %x\n", ht_info->IOTPeer); } =20 static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAd= dr) @@ -233,7 +233,7 @@ static u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *= ieee, { u8 retValue =3D 0; =20 - if (ieee->pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) + if (ieee->ht_info->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) retValue =3D 1; =20 return retValue; @@ -243,40 +243,40 @@ static u8 HTIOTActIsCCDFsync(struct rtllib_device *ie= ee) { u8 retValue =3D 0; =20 - if (ieee->pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) + if (ieee->ht_info->IOTPeer =3D=3D HT_IOT_PEER_BROADCOM) retValue =3D 1; return retValue; } =20 static void HTIOTActDetermineRaFunc(struct rtllib_device *ieee, bool bPeer= Rx2ss) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - pHTInfo->iot_ra_func &=3D HT_IOT_RAFUNC_DISABLE_ALL; + ht_info->iot_ra_func &=3D HT_IOT_RAFUNC_DISABLE_ALL; =20 - if (pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_RALINK && !bPeerRx2ss) - pHTInfo->iot_ra_func |=3D HT_IOT_RAFUNC_PEER_1R; + if (ht_info->IOTPeer =3D=3D HT_IOT_PEER_RALINK && !bPeerRx2ss) + ht_info->iot_ra_func |=3D HT_IOT_RAFUNC_PEER_1R; =20 - if (pHTInfo->iot_action & HT_IOT_ACT_AMSDU_ENABLE) - pHTInfo->iot_ra_func |=3D HT_IOT_RAFUNC_TX_AMSDU; + if (ht_info->iot_action & HT_IOT_ACT_AMSDU_ENABLE) + ht_info->iot_ra_func |=3D HT_IOT_RAFUNC_TX_AMSDU; } =20 -void HTResetIOTSetting(struct rt_hi_throughput *pHTInfo) +void HTResetIOTSetting(struct rt_hi_throughput *ht_info) { - pHTInfo->iot_action =3D 0; - pHTInfo->IOTPeer =3D HT_IOT_PEER_UNKNOWN; - pHTInfo->iot_ra_func =3D 0; + ht_info->iot_action =3D 0; + ht_info->IOTPeer =3D HT_IOT_PEER_UNKNOWN; + ht_info->iot_ra_func =3D 0; } =20 void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, u8 *len, u8 IsEncrypt, bool bAssoc) { - struct rt_hi_throughput *pHT =3D ieee->pHTInfo; + struct rt_hi_throughput *pHT =3D ieee->ht_info; struct ht_capab_ele *pCapELE =3D NULL; =20 if (!posHTCap || !pHT) { netdev_warn(ieee->dev, - "%s(): posHTCap and pHTInfo are null\n", __func__); + "%s(): posHTCap and ht_info are null\n", __func__); return; } memset(posHTCap, 0, *len); @@ -352,7 +352,7 @@ void HTConstructCapabilityElement(struct rtllib_device = *ieee, u8 *posHTCap, void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo, u8 *len, u8 IsEncrypt) { - struct rt_hi_throughput *pHT =3D ieee->pHTInfo; + struct rt_hi_throughput *pHT =3D ieee->ht_info; struct ht_info_ele *pHTInfoEle =3D (struct ht_info_ele *)posHTInfo; =20 if (!posHTInfo || !pHTInfoEle) { @@ -509,7 +509,7 @@ void HTSetConnectBwMode(struct rtllib_device *ieee, =20 void HTOnAssocRsp(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; struct ht_capab_ele *pPeerHTCap =3D NULL; struct ht_info_ele *pPeerHTInfo =3D NULL; u16 nMaxAMSDUSize =3D 0; @@ -518,22 +518,22 @@ void HTOnAssocRsp(struct rtllib_device *ieee) static const u8 EWC11NHTCap[] =3D { 0x00, 0x90, 0x4c, 0x33 }; static const u8 EWC11NHTInfo[] =3D { 0x00, 0x90, 0x4c, 0x34 }; =20 - if (!pHTInfo->bCurrentHTSupport) { + if (!ht_info->bCurrentHTSupport) { netdev_warn(ieee->dev, "%s(): HT_DISABLE\n", __func__); return; } netdev_dbg(ieee->dev, "%s(): HT_ENABLE\n", __func__); =20 - if (!memcmp(pHTInfo->PeerHTCapBuf, EWC11NHTCap, sizeof(EWC11NHTCap))) - pPeerHTCap =3D (struct ht_capab_ele *)(&pHTInfo->PeerHTCapBuf[4]); + if (!memcmp(ht_info->PeerHTCapBuf, EWC11NHTCap, sizeof(EWC11NHTCap))) + pPeerHTCap =3D (struct ht_capab_ele *)(&ht_info->PeerHTCapBuf[4]); else - pPeerHTCap =3D (struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf); + pPeerHTCap =3D (struct ht_capab_ele *)(ht_info->PeerHTCapBuf); =20 - if (!memcmp(pHTInfo->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo))) + if (!memcmp(ht_info->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo))) pPeerHTInfo =3D (struct ht_info_ele *) - (&pHTInfo->PeerHTInfoBuf[4]); + (&ht_info->PeerHTInfoBuf[4]); else - pPeerHTInfo =3D (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf); + pPeerHTInfo =3D (struct ht_info_ele *)(ht_info->PeerHTInfoBuf); =20 #ifdef VERBOSE_DEBUG print_hex_dump_bytes("%s: ", __func__, DUMP_PREFIX_NONE, @@ -541,63 +541,63 @@ void HTOnAssocRsp(struct rtllib_device *ieee) #endif HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth), (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset)); - pHTInfo->cur_tx_bw40mhz =3D ((pPeerHTInfo->RecommemdedTxWidth =3D=3D 1) ? + ht_info->cur_tx_bw40mhz =3D ((pPeerHTInfo->RecommemdedTxWidth =3D=3D 1) ? true : false); =20 - pHTInfo->bCurShortGI20MHz =3D ((pHTInfo->bRegShortGI20MHz) ? + ht_info->bCurShortGI20MHz =3D ((ht_info->bRegShortGI20MHz) ? ((pPeerHTCap->ShortGI20Mhz =3D=3D 1) ? true : false) : false); - pHTInfo->bCurShortGI40MHz =3D ((pHTInfo->bRegShortGI40MHz) ? + ht_info->bCurShortGI40MHz =3D ((ht_info->bRegShortGI40MHz) ? ((pPeerHTCap->ShortGI40Mhz =3D=3D 1) ? true : false) : false); =20 - pHTInfo->bCurSuppCCK =3D ((pHTInfo->bRegSuppCCK) ? + ht_info->bCurSuppCCK =3D ((ht_info->bRegSuppCCK) ? ((pPeerHTCap->DssCCk =3D=3D 1) ? true : false) : false); =20 - pHTInfo->bCurrent_AMSDU_Support =3D pHTInfo->bAMSDU_Support; + ht_info->bCurrent_AMSDU_Support =3D ht_info->bAMSDU_Support; =20 nMaxAMSDUSize =3D (pPeerHTCap->MaxAMSDUSize =3D=3D 0) ? 3839 : 7935; =20 - if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize) - pHTInfo->nCurrent_AMSDU_MaxSize =3D nMaxAMSDUSize; + if (ht_info->nAMSDU_MaxSize > nMaxAMSDUSize) + ht_info->nCurrent_AMSDU_MaxSize =3D nMaxAMSDUSize; else - pHTInfo->nCurrent_AMSDU_MaxSize =3D pHTInfo->nAMSDU_MaxSize; + ht_info->nCurrent_AMSDU_MaxSize =3D ht_info->nAMSDU_MaxSize; =20 - pHTInfo->bCurrentAMPDUEnable =3D pHTInfo->bAMPDUEnable; + ht_info->bCurrentAMPDUEnable =3D ht_info->bAMPDUEnable; if (ieee->rtllib_ap_sec_type && (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) { - if ((pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_ATHEROS) || - (pHTInfo->IOTPeer =3D=3D HT_IOT_PEER_UNKNOWN)) - pHTInfo->bCurrentAMPDUEnable =3D false; + if ((ht_info->IOTPeer =3D=3D HT_IOT_PEER_ATHEROS) || + (ht_info->IOTPeer =3D=3D HT_IOT_PEER_UNKNOWN)) + ht_info->bCurrentAMPDUEnable =3D false; } =20 - if (!pHTInfo->reg_rt2rt_aggregation) { - if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor) - pHTInfo->CurrentAMPDUFactor =3D + if (!ht_info->reg_rt2rt_aggregation) { + if (ht_info->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor) + ht_info->CurrentAMPDUFactor =3D pPeerHTCap->MaxRxAMPDUFactor; else - pHTInfo->CurrentAMPDUFactor =3D pHTInfo->AMPDU_Factor; + ht_info->CurrentAMPDUFactor =3D ht_info->AMPDU_Factor; =20 } else { if (ieee->current_network.bssht.bd_rt2rt_aggregation) { if (ieee->pairwise_key_type !=3D KEY_TYPE_NA) - pHTInfo->CurrentAMPDUFactor =3D + ht_info->CurrentAMPDUFactor =3D pPeerHTCap->MaxRxAMPDUFactor; else - pHTInfo->CurrentAMPDUFactor =3D HT_AGG_SIZE_64K; + ht_info->CurrentAMPDUFactor =3D HT_AGG_SIZE_64K; } else { - pHTInfo->CurrentAMPDUFactor =3D min_t(u32, pPeerHTCap->MaxRxAMPDUFactor, + ht_info->CurrentAMPDUFactor =3D min_t(u32, pPeerHTCap->MaxRxAMPDUFactor, HT_AGG_SIZE_32K); } } - pHTInfo->current_mpdu_density =3D max_t(u8, pHTInfo->MPDU_Density, + ht_info->current_mpdu_density =3D max_t(u8, ht_info->MPDU_Density, pPeerHTCap->MPDUDensity); - if (pHTInfo->iot_action & HT_IOT_ACT_TX_USE_AMSDU_8K) { - pHTInfo->bCurrentAMPDUEnable =3D false; - pHTInfo->ForcedAMSDUMode =3D HT_AGG_FORCE_ENABLE; + if (ht_info->iot_action & HT_IOT_ACT_TX_USE_AMSDU_8K) { + ht_info->bCurrentAMPDUEnable =3D false; + ht_info->ForcedAMSDUMode =3D HT_AGG_FORCE_ENABLE; } - pHTInfo->cur_rx_reorder_enable =3D pHTInfo->reg_rx_reorder_enable; + ht_info->cur_rx_reorder_enable =3D ht_info->reg_rx_reorder_enable; =20 if (pPeerHTCap->MCS[0] =3D=3D 0) pPeerHTCap->MCS[0] =3D 0xff; @@ -606,8 +606,8 @@ void HTOnAssocRsp(struct rtllib_device *ieee) =20 HTFilterMCSRate(ieee, pPeerHTCap->MCS, ieee->dot11ht_oper_rate_set); =20 - pHTInfo->peer_mimo_ps =3D pPeerHTCap->MimoPwrSave; - if (pHTInfo->peer_mimo_ps =3D=3D MIMO_PS_STATIC) + ht_info->peer_mimo_ps =3D pPeerHTCap->MimoPwrSave; + if (ht_info->peer_mimo_ps =3D=3D MIMO_PS_STATIC) pMcsFilter =3D MCS_FILTER_1SS; else pMcsFilter =3D MCS_FILTER_ALL; @@ -616,49 +616,49 @@ void HTOnAssocRsp(struct rtllib_device *ieee) pMcsFilter); ieee->HTCurrentOperaRate =3D ieee->HTHighestOperaRate; =20 - pHTInfo->current_op_mode =3D pPeerHTInfo->OptMode; + ht_info->current_op_mode =3D pPeerHTInfo->OptMode; } =20 void HTInitializeHTInfo(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - pHTInfo->bCurrentHTSupport =3D false; + ht_info->bCurrentHTSupport =3D false; =20 - pHTInfo->bCurBW40MHz =3D false; - pHTInfo->cur_tx_bw40mhz =3D false; + ht_info->bCurBW40MHz =3D false; + ht_info->cur_tx_bw40mhz =3D false; =20 - pHTInfo->bCurShortGI20MHz =3D false; - pHTInfo->bCurShortGI40MHz =3D false; - pHTInfo->forced_short_gi =3D false; + ht_info->bCurShortGI20MHz =3D false; + ht_info->bCurShortGI40MHz =3D false; + ht_info->forced_short_gi =3D false; =20 - pHTInfo->bCurSuppCCK =3D true; + ht_info->bCurSuppCCK =3D true; =20 - pHTInfo->bCurrent_AMSDU_Support =3D false; - pHTInfo->nCurrent_AMSDU_MaxSize =3D pHTInfo->nAMSDU_MaxSize; - pHTInfo->current_mpdu_density =3D pHTInfo->MPDU_Density; - pHTInfo->CurrentAMPDUFactor =3D pHTInfo->AMPDU_Factor; + ht_info->bCurrent_AMSDU_Support =3D false; + ht_info->nCurrent_AMSDU_MaxSize =3D ht_info->nAMSDU_MaxSize; + ht_info->current_mpdu_density =3D ht_info->MPDU_Density; + ht_info->CurrentAMPDUFactor =3D ht_info->AMPDU_Factor; =20 - memset((void *)(&pHTInfo->SelfHTCap), 0, - sizeof(pHTInfo->SelfHTCap)); - memset((void *)(&pHTInfo->SelfHTInfo), 0, - sizeof(pHTInfo->SelfHTInfo)); - memset((void *)(&pHTInfo->PeerHTCapBuf), 0, - sizeof(pHTInfo->PeerHTCapBuf)); - memset((void *)(&pHTInfo->PeerHTInfoBuf), 0, - sizeof(pHTInfo->PeerHTInfoBuf)); + memset((void *)(&ht_info->SelfHTCap), 0, + sizeof(ht_info->SelfHTCap)); + memset((void *)(&ht_info->SelfHTInfo), 0, + sizeof(ht_info->SelfHTInfo)); + memset((void *)(&ht_info->PeerHTCapBuf), 0, + sizeof(ht_info->PeerHTCapBuf)); + memset((void *)(&ht_info->PeerHTInfoBuf), 0, + sizeof(ht_info->PeerHTInfoBuf)); =20 - pHTInfo->sw_bw_in_progress =3D false; + ht_info->sw_bw_in_progress =3D false; =20 - pHTInfo->ePeerHTSpecVer =3D HT_SPEC_VER_IEEE; + ht_info->ePeerHTSpecVer =3D HT_SPEC_VER_IEEE; =20 - pHTInfo->current_rt2rt_aggregation =3D false; - pHTInfo->current_rt2rt_long_slot_time =3D false; - pHTInfo->RT2RT_HT_Mode =3D (enum rt_ht_capability)0; + ht_info->current_rt2rt_aggregation =3D false; + ht_info->current_rt2rt_long_slot_time =3D false; + ht_info->RT2RT_HT_Mode =3D (enum rt_ht_capability)0; =20 - pHTInfo->IOTPeer =3D 0; - pHTInfo->iot_action =3D 0; - pHTInfo->iot_ra_func =3D 0; + ht_info->IOTPeer =3D 0; + ht_info->iot_action =3D 0; + ht_info->iot_ra_func =3D 0; =20 { u8 *RegHTSuppRateSets =3D &ieee->reg_ht_supp_rate_set[0]; @@ -687,114 +687,114 @@ void HTInitializeBssDesc(struct bss_ht *pBssHT) void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee, struct rtllib_network *pNetwork) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; u8 bIOTAction =3D 0; =20 /* unmark enable_ht flag here is the same reason why unmarked in * function rtllib_softmac_new_net. WB 2008.09.10 */ if (pNetwork->bssht.bd_support_ht) { - pHTInfo->bCurrentHTSupport =3D true; - pHTInfo->ePeerHTSpecVer =3D pNetwork->bssht.bd_ht_spec_ver; + ht_info->bCurrentHTSupport =3D true; + ht_info->ePeerHTSpecVer =3D pNetwork->bssht.bd_ht_spec_ver; =20 if (pNetwork->bssht.bd_ht_cap_len > 0 && - pNetwork->bssht.bd_ht_cap_len <=3D sizeof(pHTInfo->PeerHTCapBuf)) - memcpy(pHTInfo->PeerHTCapBuf, + pNetwork->bssht.bd_ht_cap_len <=3D sizeof(ht_info->PeerHTCapBuf)) + memcpy(ht_info->PeerHTCapBuf, pNetwork->bssht.bd_ht_cap_buf, pNetwork->bssht.bd_ht_cap_len); =20 if (pNetwork->bssht.bd_ht_info_len > 0 && pNetwork->bssht.bd_ht_info_len <=3D - sizeof(pHTInfo->PeerHTInfoBuf)) - memcpy(pHTInfo->PeerHTInfoBuf, + sizeof(ht_info->PeerHTInfoBuf)) + memcpy(ht_info->PeerHTInfoBuf, pNetwork->bssht.bd_ht_info_buf, pNetwork->bssht.bd_ht_info_len); =20 - if (pHTInfo->reg_rt2rt_aggregation) { - pHTInfo->current_rt2rt_aggregation =3D + if (ht_info->reg_rt2rt_aggregation) { + ht_info->current_rt2rt_aggregation =3D pNetwork->bssht.bd_rt2rt_aggregation; - pHTInfo->current_rt2rt_long_slot_time =3D + ht_info->current_rt2rt_long_slot_time =3D pNetwork->bssht.bd_rt2rt_long_slot_time; - pHTInfo->RT2RT_HT_Mode =3D pNetwork->bssht.rt2rt_ht_mode; + ht_info->RT2RT_HT_Mode =3D pNetwork->bssht.rt2rt_ht_mode; } else { - pHTInfo->current_rt2rt_aggregation =3D false; - pHTInfo->current_rt2rt_long_slot_time =3D false; - pHTInfo->RT2RT_HT_Mode =3D (enum rt_ht_capability)0; + ht_info->current_rt2rt_aggregation =3D false; + ht_info->current_rt2rt_long_slot_time =3D false; + ht_info->RT2RT_HT_Mode =3D (enum rt_ht_capability)0; } =20 HTIOTPeerDetermine(ieee); =20 - pHTInfo->iot_action =3D 0; + ht_info->iot_action =3D 0; bIOTAction =3D HTIOTActIsDisableMCS14(ieee, pNetwork->bssid); if (bIOTAction) - pHTInfo->iot_action |=3D HT_IOT_ACT_DISABLE_MCS14; + ht_info->iot_action |=3D HT_IOT_ACT_DISABLE_MCS14; =20 bIOTAction =3D HTIOTActIsDisableMCS15(ieee); if (bIOTAction) - pHTInfo->iot_action |=3D HT_IOT_ACT_DISABLE_MCS15; + ht_info->iot_action |=3D HT_IOT_ACT_DISABLE_MCS15; =20 bIOTAction =3D HTIOTActIsDisableMCSTwoSpatialStream(ieee); if (bIOTAction) - pHTInfo->iot_action |=3D HT_IOT_ACT_DISABLE_ALL_2SS; + ht_info->iot_action |=3D HT_IOT_ACT_DISABLE_ALL_2SS; =20 bIOTAction =3D HTIOTActIsDisableEDCATurbo(ieee, pNetwork->bssid); if (bIOTAction) - pHTInfo->iot_action |=3D HT_IOT_ACT_DISABLE_EDCA_TURBO; + ht_info->iot_action |=3D HT_IOT_ACT_DISABLE_EDCA_TURBO; =20 bIOTAction =3D HTIOTActIsMgntUseCCK6M(ieee, pNetwork); if (bIOTAction) - pHTInfo->iot_action |=3D HT_IOT_ACT_MGNT_USE_CCK_6M; + ht_info->iot_action |=3D HT_IOT_ACT_MGNT_USE_CCK_6M; bIOTAction =3D HTIOTActIsCCDFsync(ieee); if (bIOTAction) - pHTInfo->iot_action |=3D HT_IOT_ACT_CDD_FSYNC; + ht_info->iot_action |=3D HT_IOT_ACT_CDD_FSYNC; } else { - pHTInfo->bCurrentHTSupport =3D false; - pHTInfo->current_rt2rt_aggregation =3D false; - pHTInfo->current_rt2rt_long_slot_time =3D false; - pHTInfo->RT2RT_HT_Mode =3D (enum rt_ht_capability)0; + ht_info->bCurrentHTSupport =3D false; + ht_info->current_rt2rt_aggregation =3D false; + ht_info->current_rt2rt_long_slot_time =3D false; + ht_info->RT2RT_HT_Mode =3D (enum rt_ht_capability)0; =20 - pHTInfo->iot_action =3D 0; - pHTInfo->iot_ra_func =3D 0; + ht_info->iot_action =3D 0; + ht_info->iot_ra_func =3D 0; } } =20 void HT_update_self_and_peer_setting(struct rtllib_device *ieee, struct rtllib_network *pNetwork) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; struct ht_info_ele *pPeerHTInfo =3D (struct ht_info_ele *)pNetwork->bssht.bd_ht_info_buf; =20 - if (pHTInfo->bCurrentHTSupport) { + if (ht_info->bCurrentHTSupport) { if (pNetwork->bssht.bd_ht_info_len !=3D 0) - pHTInfo->current_op_mode =3D pPeerHTInfo->OptMode; + ht_info->current_op_mode =3D pPeerHTInfo->OptMode; } } EXPORT_SYMBOL(HT_update_self_and_peer_setting); =20 void HTUseDefaultSetting(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - if (pHTInfo->enable_ht) { - pHTInfo->bCurrentHTSupport =3D true; - pHTInfo->bCurSuppCCK =3D pHTInfo->bRegSuppCCK; + if (ht_info->enable_ht) { + ht_info->bCurrentHTSupport =3D true; + ht_info->bCurSuppCCK =3D ht_info->bRegSuppCCK; =20 - pHTInfo->bCurBW40MHz =3D pHTInfo->bRegBW40MHz; - pHTInfo->bCurShortGI20MHz =3D pHTInfo->bRegShortGI20MHz; + ht_info->bCurBW40MHz =3D ht_info->bRegBW40MHz; + ht_info->bCurShortGI20MHz =3D ht_info->bRegShortGI20MHz; =20 - pHTInfo->bCurShortGI40MHz =3D pHTInfo->bRegShortGI40MHz; + ht_info->bCurShortGI40MHz =3D ht_info->bRegShortGI40MHz; =20 if (ieee->iw_mode =3D=3D IW_MODE_ADHOC) ieee->current_network.qos_data.active =3D ieee->current_network.qos_data.supported; - pHTInfo->bCurrent_AMSDU_Support =3D pHTInfo->bAMSDU_Support; - pHTInfo->nCurrent_AMSDU_MaxSize =3D pHTInfo->nAMSDU_MaxSize; + ht_info->bCurrent_AMSDU_Support =3D ht_info->bAMSDU_Support; + ht_info->nCurrent_AMSDU_MaxSize =3D ht_info->nAMSDU_MaxSize; =20 - pHTInfo->bCurrentAMPDUEnable =3D pHTInfo->bAMPDUEnable; - pHTInfo->CurrentAMPDUFactor =3D pHTInfo->AMPDU_Factor; + ht_info->bCurrentAMPDUEnable =3D ht_info->bAMPDUEnable; + ht_info->CurrentAMPDUFactor =3D ht_info->AMPDU_Factor; =20 - pHTInfo->current_mpdu_density =3D pHTInfo->current_mpdu_density; + ht_info->current_mpdu_density =3D ht_info->current_mpdu_density; =20 HTFilterMCSRate(ieee, ieee->reg_dot11tx_ht_oper_rate_set, ieee->dot11ht_oper_rate_set); @@ -804,13 +804,13 @@ void HTUseDefaultSetting(struct rtllib_device *ieee) ieee->HTCurrentOperaRate =3D ieee->HTHighestOperaRate; =20 } else { - pHTInfo->bCurrentHTSupport =3D false; + ht_info->bCurrentHTSupport =3D false; } } =20 u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame) { - if (ieee->pHTInfo->bCurrentHTSupport) { + if (ieee->ht_info->bCurrentHTSupport) { if ((IsQoSDataFrame(pFrame) && Frame_Order(pFrame)) =3D=3D 1) { netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n"); return true; @@ -821,13 +821,13 @@ u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame) =20 static void HTSetConnectBwModeCallback(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - if (pHTInfo->bCurBW40MHz) { - if (pHTInfo->CurSTAExtChnlOffset =3D=3D HT_EXTCHNL_OFFSET_UPPER) + if (ht_info->bCurBW40MHz) { + if (ht_info->CurSTAExtChnlOffset =3D=3D HT_EXTCHNL_OFFSET_UPPER) ieee->set_chan(ieee->dev, ieee->current_network.channel + 2); - else if (pHTInfo->CurSTAExtChnlOffset =3D=3D + else if (ht_info->CurSTAExtChnlOffset =3D=3D HT_EXTCHNL_OFFSET_LOWER) ieee->set_chan(ieee->dev, ieee->current_network.channel - 2); @@ -836,29 +836,29 @@ static void HTSetConnectBwModeCallback(struct rtllib_= device *ieee) ieee->current_network.channel); =20 ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20_40, - pHTInfo->CurSTAExtChnlOffset); + ht_info->CurSTAExtChnlOffset); } else { ieee->set_chan(ieee->dev, ieee->current_network.channel); ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); } =20 - pHTInfo->sw_bw_in_progress =3D false; + ht_info->sw_bw_in_progress =3D false; } =20 void HTSetConnectBwMode(struct rtllib_device *ieee, enum ht_channel_width bandwidth, enum ht_extchnl_offset Offset) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 - if (!pHTInfo->bRegBW40MHz) + if (!ht_info->bRegBW40MHz) return; =20 if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) bandwidth =3D HT_CHANNEL_WIDTH_20; =20 - if (pHTInfo->sw_bw_in_progress) { + if (ht_info->sw_bw_in_progress) { pr_info("%s: sw_bw_in_progress!!\n", __func__); return; } @@ -868,21 +868,21 @@ void HTSetConnectBwMode(struct rtllib_device *ieee, Offset =3D HT_EXTCHNL_OFFSET_NO_EXT; if (Offset =3D=3D HT_EXTCHNL_OFFSET_UPPER || Offset =3D=3D HT_EXTCHNL_OFFSET_LOWER) { - pHTInfo->bCurBW40MHz =3D true; - pHTInfo->CurSTAExtChnlOffset =3D Offset; + ht_info->bCurBW40MHz =3D true; + ht_info->CurSTAExtChnlOffset =3D Offset; } else { - pHTInfo->bCurBW40MHz =3D false; - pHTInfo->CurSTAExtChnlOffset =3D HT_EXTCHNL_OFFSET_NO_EXT; + ht_info->bCurBW40MHz =3D false; + ht_info->CurSTAExtChnlOffset =3D HT_EXTCHNL_OFFSET_NO_EXT; } } else { - pHTInfo->bCurBW40MHz =3D false; - pHTInfo->CurSTAExtChnlOffset =3D HT_EXTCHNL_OFFSET_NO_EXT; + ht_info->bCurBW40MHz =3D false; + ht_info->CurSTAExtChnlOffset =3D HT_EXTCHNL_OFFSET_NO_EXT; } =20 - netdev_dbg(ieee->dev, "%s():pHTInfo->bCurBW40MHz:%x\n", __func__, - pHTInfo->bCurBW40MHz); + netdev_dbg(ieee->dev, "%s():ht_info->bCurBW40MHz:%x\n", __func__, + ht_info->bCurBW40MHz); =20 - pHTInfo->sw_bw_in_progress =3D true; + ht_info->sw_bw_in_progress =3D true; =20 HTSetConnectBwModeCallback(ieee); } diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rt= l8192e/rtl819x_TSProc.c index 05c7e822f372..68c131afc2ba 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -83,7 +83,7 @@ static void RxPktPendingTimeout(struct timer_list *t) if (bPktInBuf && (pRxTs->rx_timeout_indicate_seq =3D=3D 0xffff)) { pRxTs->rx_timeout_indicate_seq =3D pRxTs->rx_indicate_seq; mod_timer(&pRxTs->rx_pkt_pending_timer, jiffies + - msecs_to_jiffies(ieee->pHTInfo->rx_reorder_pending_time) + msecs_to_jiffies(ieee->ht_info->rx_reorder_pending_time) ); } spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/r= tllib.h index 9c81ca38f4b1..7119c9c5e1fe 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1432,7 +1432,7 @@ struct rtllib_device { RT_RF_CHANGE_SOURCE rf_off_reason; bool is_set_key; bool wx_set_enc; - struct rt_hi_throughput *pHTInfo; + struct rt_hi_throughput *ht_info; =20 spinlock_t reorder_spinlock; u8 reg_dot11ht_oper_rate_set[16]; @@ -2089,7 +2089,7 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8= *pMCSRateSet, extern u8 MCS_FILTER_ALL[]; extern u16 MCS_DATA_RATE[2][2][77]; u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame); -void HTResetIOTSetting(struct rt_hi_throughput *pHTInfo); +void HTResetIOTSetting(struct rt_hi_throughput *ht_info); bool IsHTHalfNmodeAPs(struct rtllib_device *ieee); u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate); int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb); diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl= 8192e/rtllib_module.c index ce8b73f437a3..d6a4d6b4ec57 100644 --- a/drivers/staging/rtl8192e/rtllib_module.c +++ b/drivers/staging/rtl8192e/rtllib_module.c @@ -125,8 +125,8 @@ struct net_device *alloc_rtllib(int sizeof_priv) if (err) goto free_crypt_info; =20 - ieee->pHTInfo =3D kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL); - if (!ieee->pHTInfo) + ieee->ht_info =3D kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL); + if (!ieee->ht_info) goto free_softmac; =20 HTUpdateDefaultSetting(ieee); @@ -160,7 +160,7 @@ void free_rtllib(struct net_device *dev) struct rtllib_device *ieee =3D (struct rtllib_device *) netdev_priv_rsl(dev); =20 - kfree(ieee->pHTInfo); + kfree(ieee->ht_info); rtllib_softmac_free(ieee); =20 lib80211_crypt_info_free(&ieee->crypt_info); diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192= e/rtllib_rx.c index 75190c389ccf..6a0f5bbb99ef 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -567,9 +567,9 @@ static void RxReorderIndicatePacket(struct rtllib_devic= e *ieee, struct rtllib_rxb *prxb, struct rx_ts_record *pTS, u16 SeqNum) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; struct rx_reorder_entry *pReorderEntry =3D NULL; - u8 WinSize =3D pHTInfo->rx_reorder_win_size; + u8 WinSize =3D ht_info->rx_reorder_win_size; u16 WinEnd =3D 0; u8 index =3D 0; bool bMatchWinStart =3D false, bPktInBuf =3D false; @@ -591,7 +591,7 @@ static void RxReorderIndicatePacket(struct rtllib_devic= e *ieee, netdev_dbg(ieee->dev, "Packet Drop! IndicateSeq: %d, NewSeq: %d\n", pTS->rx_indicate_seq, SeqNum); - pHTInfo->rx_reorder_drop_counter++; + ht_info->rx_reorder_drop_counter++; { int i; =20 @@ -755,7 +755,7 @@ static void RxReorderIndicatePacket(struct rtllib_devic= e *ieee, netdev_dbg(ieee->dev, "%s(): SET rx timeout timer\n", __func__); pTS->rx_timeout_indicate_seq =3D pTS->rx_indicate_seq; mod_timer(&pTS->rx_pkt_pending_timer, jiffies + - msecs_to_jiffies(pHTInfo->rx_reorder_pending_time)); + msecs_to_jiffies(ht_info->rx_reorder_pending_time)); } spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); } @@ -924,7 +924,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_devi= ce *ieee, sc =3D le16_to_cpu(hdr->seq_ctl); frag =3D WLAN_GET_SEQ_FRAG(sc); =20 - if (!ieee->pHTInfo->cur_rx_reorder_enable || + if (!ieee->ht_info->cur_rx_reorder_enable || !ieee->current_network.qos_data.active || !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) { @@ -1442,7 +1442,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device = *ieee, struct sk_buff *skb, } =20 /* Indicate packets to upper layer or Rx Reorder */ - if (!ieee->pHTInfo->cur_rx_reorder_enable || pTS =3D=3D NULL || bToOtherS= TA) + if (!ieee->ht_info->cur_rx_reorder_enable || pTS =3D=3D NULL || bToOtherS= TA) rtllib_rx_indicate_pkt_legacy(ieee, rx_stats, rxb, dst, src); else RxReorderIndicatePacket(ieee, rxb, pTS, SeqNum); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rt= l8192e/rtllib_softmac.c index 8b1d88061125..2552aa089700 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -176,10 +176,10 @@ u8 MgntQuery_TxRateExcludeCCKRates(struct rtllib_devi= ce *ieee) =20 static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; u8 rate; =20 - if (pHTInfo->iot_action & HT_IOT_ACT_MGNT_USE_CCK_6M) + if (ht_info->iot_action & HT_IOT_ACT_MGNT_USE_CCK_6M) rate =3D 0x0c; else rate =3D ieee->basic_rate & 0x7f; @@ -187,7 +187,7 @@ static u8 MgntQuery_MgntFrameTxRate(struct rtllib_devic= e *ieee) if (rate =3D=3D 0) { if (ieee->mode =3D=3D IEEE_A || ieee->mode =3D=3D IEEE_N_5G || - (ieee->mode =3D=3D IEEE_N_24G && !pHTInfo->bCurSuppCCK)) + (ieee->mode =3D=3D IEEE_N_24G && !ht_info->bCurSuppCCK)) rate =3D 0x0c; else rate =3D 0x02; @@ -829,7 +829,7 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_= device *ieee, u8 tmp_ht_cap_len =3D 0; u8 *tmp_ht_info_buf =3D NULL; u8 tmp_ht_info_len =3D 0; - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; u8 *tmp_generic_ie_buf =3D NULL; u8 tmp_generic_ie_len =3D 0; =20 @@ -843,7 +843,7 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_= device *ieee, =20 if ((ieee->current_network.mode =3D=3D IEEE_G) || (ieee->current_network.mode =3D=3D IEEE_N_24G && - ieee->pHTInfo->bCurSuppCCK)) { + ieee->ht_info->bCurSuppCCK)) { erp_len =3D 3; erpinfo_content =3D 0; if (ieee->current_network.buseprotection) @@ -854,20 +854,20 @@ static struct sk_buff *rtllib_probe_resp(struct rtlli= b_device *ieee, crypt =3D ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; encrypt =3D ieee->host_encrypt && crypt && crypt->ops && ((strcmp(crypt->ops->name, "R-WEP") =3D=3D 0 || wpa_ie_len)); - if (ieee->pHTInfo->bCurrentHTSupport) { - tmp_ht_cap_buf =3D (u8 *)&(ieee->pHTInfo->SelfHTCap); - tmp_ht_cap_len =3D sizeof(ieee->pHTInfo->SelfHTCap); - tmp_ht_info_buf =3D (u8 *)&(ieee->pHTInfo->SelfHTInfo); - tmp_ht_info_len =3D sizeof(ieee->pHTInfo->SelfHTInfo); + if (ieee->ht_info->bCurrentHTSupport) { + tmp_ht_cap_buf =3D (u8 *)&(ieee->ht_info->SelfHTCap); + tmp_ht_cap_len =3D sizeof(ieee->ht_info->SelfHTCap); + tmp_ht_info_buf =3D (u8 *)&(ieee->ht_info->SelfHTInfo); + tmp_ht_info_len =3D sizeof(ieee->ht_info->SelfHTInfo); HTConstructCapabilityElement(ieee, tmp_ht_cap_buf, &tmp_ht_cap_len, encrypt, false); HTConstructInfoElement(ieee, tmp_ht_info_buf, &tmp_ht_info_len, encrypt); =20 - if (pHTInfo->reg_rt2rt_aggregation) { - tmp_generic_ie_buf =3D ieee->pHTInfo->sz_rt2rt_agg_buf; + if (ht_info->reg_rt2rt_aggregation) { + tmp_generic_ie_buf =3D ieee->ht_info->sz_rt2rt_agg_buf; tmp_generic_ie_len =3D - sizeof(ieee->pHTInfo->sz_rt2rt_agg_buf); + sizeof(ieee->ht_info->sz_rt2rt_agg_buf); HTConstructRT2RTAggElement(ieee, tmp_generic_ie_buf, &tmp_generic_ie_len); } @@ -1179,19 +1179,19 @@ rtllib_association_req(struct rtllib_network *beaco= n, if ((ieee->rtllib_ap_sec_type && (ieee->rtllib_ap_sec_type(ieee) & SEC_ALG_TKIP)) || ieee->bForcedBgMode) { - ieee->pHTInfo->enable_ht =3D 0; + ieee->ht_info->enable_ht =3D 0; ieee->mode =3D WIRELESS_MODE_G; } =20 - if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->enable_ht) { - ht_cap_buf =3D (u8 *)&(ieee->pHTInfo->SelfHTCap); - ht_cap_len =3D sizeof(ieee->pHTInfo->SelfHTCap); + if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht) { + ht_cap_buf =3D (u8 *)&(ieee->ht_info->SelfHTCap); + ht_cap_len =3D sizeof(ieee->ht_info->SelfHTCap); HTConstructCapabilityElement(ieee, ht_cap_buf, &ht_cap_len, encrypt, true); - if (ieee->pHTInfo->current_rt2rt_aggregation) { - realtek_ie_buf =3D ieee->pHTInfo->sz_rt2rt_agg_buf; + if (ieee->ht_info->current_rt2rt_aggregation) { + realtek_ie_buf =3D ieee->ht_info->sz_rt2rt_agg_buf; realtek_ie_len =3D - sizeof(ieee->pHTInfo->sz_rt2rt_agg_buf); + sizeof(ieee->ht_info->sz_rt2rt_agg_buf); HTConstructRT2RTAggElement(ieee, realtek_ie_buf, &realtek_ie_len); } @@ -1324,8 +1324,8 @@ rtllib_association_req(struct rtllib_network *beacon, memcpy(tag, osCcxVerNum.Octet, osCcxVerNum.Length); tag +=3D osCcxVerNum.Length; } - if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->enable_ht) { - if (ieee->pHTInfo->ePeerHTSpecVer !=3D HT_SPEC_VER_EWC) { + if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht) { + if (ieee->ht_info->ePeerHTSpecVer !=3D HT_SPEC_VER_EWC) { tag =3D skb_put(skb, ht_cap_len); *tag++ =3D MFIE_TYPE_HT_CAP; *tag++ =3D ht_cap_len - 2; @@ -1358,8 +1358,8 @@ rtllib_association_req(struct rtllib_network *beacon, rtllib_TURBO_Info(ieee, &tag); } =20 - if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->enable_ht) { - if (ieee->pHTInfo->ePeerHTSpecVer =3D=3D HT_SPEC_VER_EWC) { + if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht) { + if (ieee->ht_info->ePeerHTSpecVer =3D=3D HT_SPEC_VER_EWC) { tag =3D skb_put(skb, ht_cap_len); *tag++ =3D MFIE_TYPE_GENERIC; *tag++ =3D ht_cap_len - 2; @@ -1367,7 +1367,7 @@ rtllib_association_req(struct rtllib_network *beacon, tag +=3D ht_cap_len - 2; } =20 - if (ieee->pHTInfo->current_rt2rt_aggregation) { + if (ieee->ht_info->current_rt2rt_aggregation) { tag =3D skb_put(skb, realtek_ie_len); *tag++ =3D MFIE_TYPE_GENERIC; *tag++ =3D realtek_ie_len - 2; @@ -1524,14 +1524,14 @@ static void rtllib_associate_complete_wq(void *data) ieee->SetWirelessMode(ieee->dev, IEEE_B); netdev_info(ieee->dev, "Using B rates:%d\n", ieee->rate); } - if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->enable_ht) { + if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht) { netdev_info(ieee->dev, "Successfully associated, ht enabled\n"); HTOnAssocRsp(ieee); } else { netdev_info(ieee->dev, "Successfully associated, ht not enabled(%d, %d)\n", - ieee->pHTInfo->bCurrentHTSupport, - ieee->pHTInfo->enable_ht); + ieee->ht_info->bCurrentHTSupport, + ieee->ht_info->enable_ht); memset(ieee->dot11ht_oper_rate_set, 0, 16); } ieee->link_detect_info.SlotNum =3D 2 * (1 + @@ -1684,7 +1684,7 @@ inline void rtllib_softmac_new_net(struct rtllib_devi= ce *ieee, ieee->current_network.ssid, ieee->current_network.channel, ieee->current_network.qos_data.supported, - ieee->pHTInfo->enable_ht, + ieee->ht_info->enable_ht, ieee->current_network.bssht.bd_support_ht, ieee->current_network.mode, ieee->current_network.flags); @@ -1693,7 +1693,7 @@ inline void rtllib_softmac_new_net(struct rtllib_devi= ce *ieee, !(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) rtllib_stop_scan_syncro(ieee); =20 - HTResetIOTSetting(ieee->pHTInfo); + HTResetIOTSetting(ieee->ht_info); ieee->wmm_acm =3D 0; if (ieee->iw_mode =3D=3D IW_MODE_INFRA) { /* Join the network for the first time */ @@ -1703,7 +1703,7 @@ inline void rtllib_softmac_new_net(struct rtllib_devi= ce *ieee, HTResetSelfAndSavePeerSetting(ieee, &(ieee->current_network)); else - ieee->pHTInfo->bCurrentHTSupport =3D + ieee->ht_info->bCurrentHTSupport =3D false; =20 ieee->state =3D RTLLIB_ASSOCIATING; @@ -1893,7 +1893,7 @@ static inline u16 assoc_parse(struct rtllib_device *i= eee, struct sk_buff *skb, ((ieee->mode =3D=3D IEEE_G) && (ieee->current_network.mode =3D=3D IEEE_N_24G) && (ieee->AsocRetryCount++ < (RT_ASOC_RETRY_LIMIT-1)))) { - ieee->pHTInfo->iot_action |=3D HT_IOT_ACT_PURE_N_MODE; + ieee->ht_info->iot_action |=3D HT_IOT_ACT_PURE_N_MODE; } else { ieee->AsocRetryCount =3D 0; } @@ -2100,7 +2100,7 @@ static void rtllib_sta_wakeup(struct rtllib_device *i= eee, short nl) { if (ieee->sta_sleep =3D=3D LPS_IS_WAKE) { if (nl) { - if (ieee->pHTInfo->iot_action & + if (ieee->ht_info->iot_action & HT_IOT_ACT_NULL_DATA_POWER_SAVING) { ieee->ack_tx_to_ieee =3D 1; rtllib_sta_ps_send_null_frame(ieee, 0); @@ -2116,7 +2116,7 @@ static void rtllib_sta_wakeup(struct rtllib_device *i= eee, short nl) if (ieee->sta_sleep =3D=3D LPS_IS_SLEEP) ieee->sta_wake_up(ieee->dev); if (nl) { - if (ieee->pHTInfo->iot_action & + if (ieee->ht_info->iot_action & HT_IOT_ACT_NULL_DATA_POWER_SAVING) { ieee->ack_tx_to_ieee =3D 1; rtllib_sta_ps_send_null_frame(ieee, 0); @@ -2151,7 +2151,7 @@ void rtllib_ps_tx_ack(struct rtllib_device *ieee, sho= rt success) =20 if ((ieee->sta_sleep =3D=3D LPS_IS_WAKE) && !success) { spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); - if (ieee->pHTInfo->iot_action & + if (ieee->ht_info->iot_action & HT_IOT_ACT_NULL_DATA_POWER_SAVING) rtllib_sta_ps_send_null_frame(ieee, 0); else @@ -2235,10 +2235,10 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, st= ruct sk_buff *skb, kfree(network); return 1; } - memcpy(ieee->pHTInfo->PeerHTCapBuf, + memcpy(ieee->ht_info->PeerHTCapBuf, network->bssht.bd_ht_cap_buf, network->bssht.bd_ht_cap_len); - memcpy(ieee->pHTInfo->PeerHTInfoBuf, + memcpy(ieee->ht_info->PeerHTInfoBuf, network->bssht.bd_ht_info_buf, network->bssht.bd_ht_info_len); if (ieee->handle_assoc_response !=3D NULL) @@ -2295,7 +2295,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device = *ieee, struct sk_buff *skb) if (ieee->open_wep || !challenge) { ieee->state =3D RTLLIB_ASSOCIATING_AUTHENTICATED; ieee->softmac_stats.rx_auth_rs_ok++; - if (!(ieee->pHTInfo->iot_action & HT_IOT_ACT_PURE_N_MODE)) { + if (!(ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE)) { if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) { if (IsHTHalfNmodeAPs(ieee)) { bSupportNmode =3D true; @@ -2669,7 +2669,7 @@ static void rtllib_start_ibss_wq(void *data) if ((ieee->mode =3D=3D IEEE_N_24G) || (ieee->mode =3D=3D IEEE_N_5G)) HTUseDefaultSetting(ieee); else - ieee->pHTInfo->bCurrentHTSupport =3D false; + ieee->ht_info->bCurrentHTSupport =3D false; =20 ieee->SetHwRegHandler(ieee->dev, HW_VAR_MEDIA_STATUS, (u8 *)(&ieee->state)); diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging= /rtl8192e/rtllib_softmac_wx.c index e02e7d9566b2..63edf68c0b49 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -359,11 +359,11 @@ void rtllib_wx_sync_scan_wq(void *data) if (ieee->ScanOperationBackupHandler) ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_BACKUP); =20 - if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->enable_ht && - ieee->pHTInfo->bCurBW40MHz) { + if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht && + ieee->ht_info->bCurBW40MHz) { b40M =3D 1; - chan_offset =3D ieee->pHTInfo->CurSTAExtChnlOffset; - bandwidth =3D (enum ht_channel_width)ieee->pHTInfo->bCurBW40MHz; + chan_offset =3D ieee->ht_info->CurSTAExtChnlOffset; + bandwidth =3D (enum ht_channel_width)ieee->ht_info->bCurBW40MHz; ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); } diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192= e/rtllib_tx.c index 8b01cfe03381..9ab8ee46ef66 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -266,14 +266,14 @@ static void rtllib_tx_query_agg_cap(struct rtllib_dev= ice *ieee, struct sk_buff *skb, struct cb_desc *tcb_desc) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; struct tx_ts_record *pTxTs =3D NULL; struct rtllib_hdr_1addr *hdr =3D (struct rtllib_hdr_1addr *)skb->data; =20 if (rtllib_act_scanning(ieee, false)) return; =20 - if (!pHTInfo->bCurrentHTSupport || !pHTInfo->enable_ht) + if (!ht_info->bCurrentHTSupport || !ht_info->enable_ht) return; if (!IsQoSDataFrame(skb->data)) return; @@ -283,12 +283,12 @@ static void rtllib_tx_query_agg_cap(struct rtllib_dev= ice *ieee, if (tcb_desc->bdhcp || ieee->CntAfterLink < 2) return; =20 - if (pHTInfo->iot_action & HT_IOT_ACT_TX_NO_AGGREGATION) + if (ht_info->iot_action & HT_IOT_ACT_TX_NO_AGGREGATION) return; =20 if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) return; - if (pHTInfo->bCurrentAMPDUEnable) { + if (ht_info->bCurrentAMPDUEnable) { if (!GetTs(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true)) { netdev_info(ieee->dev, "%s: can't get TS\n", __func__); @@ -313,19 +313,19 @@ static void rtllib_tx_query_agg_cap(struct rtllib_dev= ice *ieee, } if (ieee->iw_mode =3D=3D IW_MODE_INFRA) { tcb_desc->bAMPDUEnable =3D true; - tcb_desc->ampdu_factor =3D pHTInfo->CurrentAMPDUFactor; - tcb_desc->ampdu_density =3D pHTInfo->current_mpdu_density; + tcb_desc->ampdu_factor =3D ht_info->CurrentAMPDUFactor; + tcb_desc->ampdu_density =3D ht_info->current_mpdu_density; } } FORCED_AGG_SETTING: - switch (pHTInfo->ForcedAMPDUMode) { + switch (ht_info->ForcedAMPDUMode) { case HT_AGG_AUTO: break; =20 case HT_AGG_FORCE_ENABLE: tcb_desc->bAMPDUEnable =3D true; - tcb_desc->ampdu_density =3D pHTInfo->forced_mpdu_density; - tcb_desc->ampdu_factor =3D pHTInfo->forced_ampdu_factor; + tcb_desc->ampdu_density =3D ht_info->forced_mpdu_density; + tcb_desc->ampdu_factor =3D ht_info->forced_ampdu_factor; break; =20 case HT_AGG_FORCE_DISABLE: @@ -350,32 +350,32 @@ static void rtllib_query_ShortPreambleMode(struct rtl= lib_device *ieee, static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee, struct cb_desc *tcb_desc) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 tcb_desc->bUseShortGI =3D false; =20 - if (!pHTInfo->bCurrentHTSupport || !pHTInfo->enable_ht) + if (!ht_info->bCurrentHTSupport || !ht_info->enable_ht) return; =20 - if (pHTInfo->forced_short_gi) { + if (ht_info->forced_short_gi) { tcb_desc->bUseShortGI =3D true; return; } =20 - if (pHTInfo->bCurBW40MHz && pHTInfo->bCurShortGI40MHz) + if (ht_info->bCurBW40MHz && ht_info->bCurShortGI40MHz) tcb_desc->bUseShortGI =3D true; - else if (!pHTInfo->bCurBW40MHz && pHTInfo->bCurShortGI20MHz) + else if (!ht_info->bCurBW40MHz && ht_info->bCurShortGI20MHz) tcb_desc->bUseShortGI =3D true; } =20 static void rtllib_query_BandwidthMode(struct rtllib_device *ieee, struct cb_desc *tcb_desc) { - struct rt_hi_throughput *pHTInfo =3D ieee->pHTInfo; + struct rt_hi_throughput *ht_info =3D ieee->ht_info; =20 tcb_desc->bPacketBW =3D false; =20 - if (!pHTInfo->bCurrentHTSupport || !pHTInfo->enable_ht) + if (!ht_info->bCurrentHTSupport || !ht_info->enable_ht) return; =20 if (tcb_desc->bMulticast || tcb_desc->bBroadcast) @@ -383,7 +383,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_de= vice *ieee, =20 if ((tcb_desc->data_rate & 0x80) =3D=3D 0) return; - if (pHTInfo->bCurBW40MHz && pHTInfo->cur_tx_bw40mhz && + if (ht_info->bCurBW40MHz && ht_info->cur_tx_bw40mhz && !ieee->bandwidth_auto_switch.bforced_tx20Mhz) tcb_desc->bPacketBW =3D true; } @@ -392,7 +392,7 @@ static void rtllib_query_protectionmode(struct rtllib_d= evice *ieee, struct cb_desc *tcb_desc, struct sk_buff *skb) { - struct rt_hi_throughput *pHTInfo; + struct rt_hi_throughput *ht_info; =20 tcb_desc->bRTSSTBC =3D false; tcb_desc->bRTSUseShortGI =3D false; @@ -418,15 +418,15 @@ static void rtllib_query_protectionmode(struct rtllib= _device *ieee, return; } =20 - pHTInfo =3D ieee->pHTInfo; + ht_info =3D ieee->ht_info; =20 while (true) { - if (pHTInfo->iot_action & HT_IOT_ACT_FORCED_CTS2SELF) { + if (ht_info->iot_action & HT_IOT_ACT_FORCED_CTS2SELF) { tcb_desc->bCTSEnable =3D true; tcb_desc->rts_rate =3D MGN_24M; tcb_desc->bRTSEnable =3D true; break; - } else if (pHTInfo->iot_action & (HT_IOT_ACT_FORCED_RTS | + } else if (ht_info->iot_action & (HT_IOT_ACT_FORCED_RTS | HT_IOT_ACT_PURE_N_MODE)) { tcb_desc->bRTSEnable =3D true; tcb_desc->rts_rate =3D MGN_24M; @@ -438,12 +438,12 @@ static void rtllib_query_protectionmode(struct rtllib= _device *ieee, tcb_desc->rts_rate =3D MGN_24M; break; } - if (pHTInfo->bCurrentHTSupport && pHTInfo->enable_ht) { - u8 HTOpMode =3D pHTInfo->current_op_mode; + if (ht_info->bCurrentHTSupport && ht_info->enable_ht) { + u8 HTOpMode =3D ht_info->current_op_mode; =20 - if ((pHTInfo->bCurBW40MHz && (HTOpMode =3D=3D 2 || + if ((ht_info->bCurBW40MHz && (HTOpMode =3D=3D 2 || HTOpMode =3D=3D 3)) || - (!pHTInfo->bCurBW40MHz && HTOpMode =3D=3D 3)) { + (!ht_info->bCurBW40MHz && HTOpMode =3D=3D 3)) { tcb_desc->rts_rate =3D MGN_24M; tcb_desc->bRTSEnable =3D true; break; @@ -882,7 +882,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struc= t net_device *dev) tcb_desc->priority =3D skb->priority; =20 if (ether_type =3D=3D ETH_P_PAE) { - if (ieee->pHTInfo->iot_action & + if (ieee->ht_info->iot_action & HT_IOT_ACT_WA_IOT_Broadcom) { tcb_desc->data_rate =3D MgntQuery_TxRateExcludeCCKRates(ieee); @@ -906,7 +906,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struc= t net_device *dev) tcb_desc->data_rate =3D rtllib_current_rate(ieee); =20 if (bdhcp) { - if (ieee->pHTInfo->iot_action & + if (ieee->ht_info->iot_action & HT_IOT_ACT_WA_IOT_Broadcom) { tcb_desc->data_rate =3D MgntQuery_TxRateExcludeCCKRates(ieee); --=20 2.37.3