2023-12-10 15:26:36

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 00/10] staging: rtl8192e: Remove variable reg_bw_40mhz and further

Remove unused or unchanged variables.

Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s)
Transferred this patch over wlan connection of rtl8192e.
Tested in b,g,n mode and n mode in channels 2, 9, 10, 13

Philipp Hortmann (10):
staging: rtl8192e: Remove unused struct iw_range_with_scan_capa
staging: rtl8192e: Remove variable ht_info->reg_bw_40mhz
staging: rtl8192e: Remove variable ht_info->reg_supp_cck
staging: rtl8192e: Remove variable ht_info->reg_short_gi_20mhz
staging: rtl8192e: Remove variable ht_info->reg_short_gi_40mhz
staging: rtl8192e: Remove variable ForcedAMPDUMode
staging: rtl8192e: Remove variable ForcedAMSDUMode
staging: rtl8192e: Remove equation with pPeerHTCap->DssCCk
staging: rtl8192e: Remove variable ht_info->bCurSuppCCK
staging: rtl8192e: Remove struct ht_info_ele SelfHTInfo

drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 22 --------------
drivers/staging/rtl8192e/rtl819x_HT.h | 8 -----
drivers/staging/rtl8192e/rtl819x_HTProc.c | 34 +++-------------------
drivers/staging/rtl8192e/rtllib_softmac.c | 5 +---
drivers/staging/rtl8192e/rtllib_tx.c | 21 ++-----------
5 files changed, 7 insertions(+), 83 deletions(-)

--
2.43.0


2023-12-10 15:26:38

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 01/10] staging: rtl8192e: Remove unused struct iw_range_with_scan_capa

Remove unused struct iw_range_with_scan_capa.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 22 ----------------------
1 file changed, 22 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 4371ab1239ee..4c884c5277f9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -158,28 +158,6 @@ static int _rtl92e_wx_set_mode(struct net_device *dev,
return ret;
}

-struct iw_range_with_scan_capa {
- /* Informative stuff (to choose between different interface) */
- __u32 throughput; /* To give an idea... */
- /* In theory this value should be the maximum benchmarked
- * TCP/IP throughput, because with most of these devices the
- * bit rate is meaningless (overhead an co) to estimate how
- * fast the connection will go and pick the fastest one.
- * I suggest people to play with Netperf or any benchmark...
- */
-
- /* NWID (or domain id) */
- __u32 min_nwid; /* Minimal NWID we are able to set */
- __u32 max_nwid; /* Maximal NWID we are able to set */
-
- /* Old Frequency (backward compat - moved lower ) */
- __u16 old_num_channels;
- __u8 old_num_frequency;
-
- /* Scan capabilities */
- __u8 scan_capa;
-};
-
static int _rtl92e_wx_get_range(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
--
2.43.0

2023-12-10 15:26:52

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 02/10] staging: rtl8192e: Remove variable ht_info->reg_bw_40mhz

ht_info->reg_bw_40mhz is set to 1 and unchanged. Therefore all equations
result accordingly and ht_info->reg_bw_40mhz can be removed.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 14 +++-----------
2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index c004020099e3..bbfdfb79c6f2 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -94,7 +94,6 @@ enum ht_aggre_mode {
struct rt_hi_throughput {
u8 enable_ht;
u8 current_ht_support;
- u8 reg_bw_40mhz;
u8 cur_bw_40mhz;
u8 reg_short_gi_40mhz;
u8 cur_short_gi_40mhz;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 99626be899fd..f81d9ba9c9f5 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -74,12 +74,7 @@ void ht_update_default_setting(struct rtllib_device *ieee)
ht_info->reg_short_gi_20mhz = 1;
ht_info->reg_short_gi_40mhz = 1;

- ht_info->reg_bw_40mhz = 1;
-
- if (ht_info->reg_bw_40mhz)
- ht_info->reg_supp_cck = 1;
- else
- ht_info->reg_supp_cck = true;
+ ht_info->reg_supp_cck = 1;

ht_info->amsdu_max_size = 7935UL;
ht_info->amsdu_support = 0;
@@ -275,7 +270,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
pCapELE->ChlWidth = 0;
else
- pCapELE->ChlWidth = (pHT->reg_bw_40mhz ? 1 : 0);
+ pCapELE->ChlWidth = 1;

pCapELE->MimoPwrSave = pHT->self_mimo_ps;
pCapELE->GreenField = 0;
@@ -286,7 +281,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
pCapELE->RxSTBC = 0;
pCapELE->DelayBA = 0;
pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
- pCapELE->DssCCk = ((pHT->reg_bw_40mhz) ? (pHT->reg_supp_cck ? 1 : 0) : 0);
+ pCapELE->DssCCk = (pHT->reg_supp_cck ? 1 : 0);
pCapELE->PSMP = 0;
pCapELE->LSigTxopProtect = 0;

@@ -734,9 +729,6 @@ void HTSetConnectBwMode(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

- if (!ht_info->reg_bw_40mhz)
- return;
-
if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
bandwidth = HT_CHANNEL_WIDTH_20;

--
2.43.0

2023-12-10 15:26:57

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 05/10] staging: rtl8192e: Remove variable ht_info->reg_short_gi_40mhz

ht_info->reg_short_gi_40mhz is set to 1 and unchanged. Therefore all
equations result accordingly and ht_info->reg_short_gi_40mhz can be
removed.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 +-----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index 8a4bd389004a..0664eb86bada 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -95,7 +95,6 @@ struct rt_hi_throughput {
u8 enable_ht;
u8 current_ht_support;
u8 cur_bw_40mhz;
- u8 reg_short_gi_40mhz;
u8 cur_short_gi_40mhz;
u8 cur_short_gi_20mhz;
u8 bCurSuppCCK;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index ed9b3db1a393..0a5885d6c0a0 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -71,8 +71,6 @@ void ht_update_default_setting(struct rtllib_device *ieee)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

- ht_info->reg_short_gi_40mhz = 1;
-
ht_info->amsdu_max_size = 7935UL;
ht_info->amsdu_support = 0;

@@ -471,9 +469,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
true : false);

ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz == 1) ? true : false);
- ht_info->cur_short_gi_40mhz = ((ht_info->reg_short_gi_40mhz) ?
- ((pPeerHTCap->ShortGI40Mhz == 1) ?
- true : false) : false);
+ ht_info->cur_short_gi_40mhz = ((pPeerHTCap->ShortGI40Mhz == 1) ? true : false);

ht_info->bCurSuppCCK = ((pPeerHTCap->DssCCk == 1) ? true : false);

--
2.43.0

2023-12-10 15:26:58

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 03/10] staging: rtl8192e: Remove variable ht_info->reg_supp_cck

ht_info->reg_supp_cck is set to 1 and unchanged. Therefore all equations
result accordingly and ht_info->reg_supp_cck can be removed.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 8 ++------
2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index bbfdfb79c6f2..6556c5df958d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -99,7 +99,6 @@ struct rt_hi_throughput {
u8 cur_short_gi_40mhz;
u8 reg_short_gi_20mhz;
u8 cur_short_gi_20mhz;
- u8 reg_supp_cck;
u8 bCurSuppCCK;
enum ht_spec_ver ePeerHTSpecVer;
struct ht_capab_ele SelfHTCap;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index f81d9ba9c9f5..7acc8b4c11c4 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -74,8 +74,6 @@ void ht_update_default_setting(struct rtllib_device *ieee)
ht_info->reg_short_gi_20mhz = 1;
ht_info->reg_short_gi_40mhz = 1;

- ht_info->reg_supp_cck = 1;
-
ht_info->amsdu_max_size = 7935UL;
ht_info->amsdu_support = 0;

@@ -281,7 +279,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
pCapELE->RxSTBC = 0;
pCapELE->DelayBA = 0;
pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
- pCapELE->DssCCk = (pHT->reg_supp_cck ? 1 : 0);
+ pCapELE->DssCCk = 1;
pCapELE->PSMP = 0;
pCapELE->LSigTxopProtect = 0;

@@ -480,9 +478,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
((pPeerHTCap->ShortGI40Mhz == 1) ?
true : false) : false);

- ht_info->bCurSuppCCK = ((ht_info->reg_supp_cck) ?
- ((pPeerHTCap->DssCCk == 1) ? true :
- false) : false);
+ ht_info->bCurSuppCCK = ((pPeerHTCap->DssCCk == 1) ? true : false);

ht_info->bCurrent_AMSDU_Support = ht_info->amsdu_support;

--
2.43.0

2023-12-10 15:27:13

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 04/10] staging: rtl8192e: Remove variable ht_info->reg_short_gi_20mhz

ht_info->reg_short_gi_20mhz is set to 1 and unchanged. Therefore all
equations result accordingly and ht_info->reg_short_gi_20mhz can be
removed.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 5 +----
2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index 6556c5df958d..8a4bd389004a 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -97,7 +97,6 @@ struct rt_hi_throughput {
u8 cur_bw_40mhz;
u8 reg_short_gi_40mhz;
u8 cur_short_gi_40mhz;
- u8 reg_short_gi_20mhz;
u8 cur_short_gi_20mhz;
u8 bCurSuppCCK;
enum ht_spec_ver ePeerHTSpecVer;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 7acc8b4c11c4..ed9b3db1a393 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -71,7 +71,6 @@ void ht_update_default_setting(struct rtllib_device *ieee)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

- ht_info->reg_short_gi_20mhz = 1;
ht_info->reg_short_gi_40mhz = 1;

ht_info->amsdu_max_size = 7935UL;
@@ -471,9 +470,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
ht_info->cur_tx_bw40mhz = ((pPeerHTInfo->RecommemdedTxWidth == 1) ?
true : false);

- ht_info->cur_short_gi_20mhz = ((ht_info->reg_short_gi_20mhz) ?
- ((pPeerHTCap->ShortGI20Mhz == 1) ?
- true : false) : false);
+ ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz == 1) ? true : false);
ht_info->cur_short_gi_40mhz = ((ht_info->reg_short_gi_40mhz) ?
((pPeerHTCap->ShortGI40Mhz == 1) ?
true : false) : false);
--
2.43.0

2023-12-10 15:27:20

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 07/10] staging: rtl8192e: Remove variable ForcedAMSDUMode

ForcedAMSDUMode is set to 1 and then never evaluated.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index d249062e7b66..670affe9d57b 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -115,7 +115,6 @@ struct rt_hi_throughput {
u8 current_mpdu_density;
u8 forced_ampdu_factor;
u8 forced_mpdu_density;
- enum ht_aggre_mode ForcedAMSDUMode;
u8 forced_short_gi;
u8 current_op_mode;
u8 self_mimo_ps;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0a5885d6c0a0..bedee290e7f5 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -513,7 +513,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
pPeerHTCap->MPDUDensity);
if (ht_info->iot_action & HT_IOT_ACT_TX_USE_AMSDU_8K) {
ht_info->current_ampdu_enable = false;
- ht_info->ForcedAMSDUMode = HT_AGG_FORCE_ENABLE;
}
ht_info->cur_rx_reorder_enable = ht_info->reg_rx_reorder_enable;

--
2.43.0

2023-12-10 15:27:42

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 08/10] staging: rtl8192e: Remove equation with pPeerHTCap->DssCCk

Remove equation with pPeerHTCap->DssCCk as it is set to 1 and unchanged.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index bedee290e7f5..ca9da96b6f6c 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -471,7 +471,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz == 1) ? true : false);
ht_info->cur_short_gi_40mhz = ((pPeerHTCap->ShortGI40Mhz == 1) ? true : false);

- ht_info->bCurSuppCCK = ((pPeerHTCap->DssCCk == 1) ? true : false);
+ ht_info->bCurSuppCCK = true;

ht_info->bCurrent_AMSDU_Support = ht_info->amsdu_support;

--
2.43.0

2023-12-10 15:27:47

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 06/10] staging: rtl8192e: Remove variable ForcedAMPDUMode

ForcedAMPDUMode is set to 0 and unchanged. Therefore all equations result
accordingly and ForcedAMPDUMode can be removed. As a result label
FORCED_AGG_SETTING is unused and can be removed as well.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtllib_tx.c | 21 ++-------------------
2 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index 0664eb86bada..d249062e7b66 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -113,7 +113,6 @@ struct rt_hi_throughput {
u8 CurrentAMPDUFactor;
u8 mpdu_density;
u8 current_mpdu_density;
- enum ht_aggre_mode ForcedAMPDUMode;
u8 forced_ampdu_factor;
u8 forced_mpdu_density;
enum ht_aggre_mode ForcedAMSDUMode;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index a2ae68cc13f5..0fa6f674a844 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -303,13 +303,13 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
} else if (!ts->disable_add_ba) {
TsStartAddBaProcess(ieee, ts);
}
- goto FORCED_AGG_SETTING;
+ return;
} else if (!ts->using_ba) {
if (SN_LESS(ts->tx_admitted_ba_record.ba_start_seq_ctrl.field.seq_num,
(ts->tx_cur_seq + 1) % 4096))
ts->using_ba = true;
else
- goto FORCED_AGG_SETTING;
+ return;
}
if (ieee->iw_mode == IW_MODE_INFRA) {
tcb_desc->ampdu_enable = true;
@@ -317,23 +317,6 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
tcb_desc->ampdu_density = ht_info->current_mpdu_density;
}
}
-FORCED_AGG_SETTING:
- switch (ht_info->ForcedAMPDUMode) {
- case HT_AGG_AUTO:
- break;
-
- case HT_AGG_FORCE_ENABLE:
- tcb_desc->ampdu_enable = true;
- tcb_desc->ampdu_density = ht_info->forced_mpdu_density;
- tcb_desc->ampdu_factor = ht_info->forced_ampdu_factor;
- break;
-
- case HT_AGG_FORCE_DISABLE:
- tcb_desc->ampdu_enable = false;
- tcb_desc->ampdu_density = 0;
- tcb_desc->ampdu_factor = 0;
- break;
- }
}

static void rtllib_query_ShortPreambleMode(struct rtllib_device *ieee,
--
2.43.0

2023-12-10 15:27:47

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 09/10] staging: rtl8192e: Remove variable ht_info->bCurSuppCCK

ht_info->bCurSuppCCK is set to 1 and unchanged. Therefore all equations
result accordingly and ht_info->bCurSuppCCK can be removed.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ----
drivers/staging/rtl8192e/rtllib_softmac.c | 5 +----
3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index 670affe9d57b..416633b88446 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -97,7 +97,6 @@ struct rt_hi_throughput {
u8 cur_bw_40mhz;
u8 cur_short_gi_40mhz;
u8 cur_short_gi_20mhz;
- u8 bCurSuppCCK;
enum ht_spec_ver ePeerHTSpecVer;
struct ht_capab_ele SelfHTCap;
struct ht_info_ele SelfHTInfo;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index ca9da96b6f6c..439b43faa2bb 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -471,8 +471,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz == 1) ? true : false);
ht_info->cur_short_gi_40mhz = ((pPeerHTCap->ShortGI40Mhz == 1) ? true : false);

- ht_info->bCurSuppCCK = true;
-
ht_info->bCurrent_AMSDU_Support = ht_info->amsdu_support;

nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize == 0) ? 3839 : 7935;
@@ -549,8 +547,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
ht_info->cur_short_gi_40mhz = false;
ht_info->forced_short_gi = false;

- ht_info->bCurSuppCCK = true;
-
ht_info->bCurrent_AMSDU_Support = false;
ht_info->nCurrent_AMSDU_MaxSize = ht_info->amsdu_max_size;
ht_info->current_mpdu_density = ht_info->mpdu_density;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 5c89744b2bbe..416f89ec576c 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -173,10 +173,7 @@ static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee)
rate = ieee->basic_rate & 0x7f;

if (rate == 0) {
- if (ieee->mode == WIRELESS_MODE_N_24G && !ht_info->bCurSuppCCK)
- rate = 0x0c;
- else
- rate = 0x02;
+ rate = 0x02;
}

return rate;
--
2.43.0

2023-12-10 15:27:51

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 10/10] staging: rtl8192e: Remove struct ht_info_ele SelfHTInfo

Remove struct ht_info_ele SelfHTInfo as it is unused.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HT.h | 1 -
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 --
2 files changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index 416633b88446..0f27c820ffc5 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -99,7 +99,6 @@ struct rt_hi_throughput {
u8 cur_short_gi_20mhz;
enum ht_spec_ver ePeerHTSpecVer;
struct ht_capab_ele SelfHTCap;
- struct ht_info_ele SelfHTInfo;
u8 PeerHTCapBuf[32];
u8 PeerHTInfoBuf[32];
u8 amsdu_support;
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 439b43faa2bb..0474594a4b96 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -554,8 +554,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)

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,
--
2.43.0