[PATCH 06/16] staging: wfx: dual CTS is never necessary

From: Jerome Pouiller
Date: Mon Apr 20 2020 - 12:03:50 EST


From: JÃrÃme Pouiller <jerome.pouiller@xxxxxxxxxx>

Dual CTS is only necessary when sending/receiving STBC data. However,
the chip does not support STBC, so it is never necessary to enable
double CTS.

We can simplify the code.

Signed-off-by: JÃrÃme Pouiller <jerome.pouiller@xxxxxxxxxx>
---
drivers/staging/wfx/hif_api_mib.h | 6 ------
drivers/staging/wfx/hif_tx_mib.c | 10 ----------
drivers/staging/wfx/hif_tx_mib.h | 1 -
drivers/staging/wfx/sta.c | 6 ------
4 files changed, 23 deletions(-)

diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h
index 9f30cf503ad5..6f1434795fa8 100644
--- a/drivers/staging/wfx/hif_api_mib.h
+++ b/drivers/staging/wfx/hif_api_mib.h
@@ -379,12 +379,6 @@ struct hif_mib_protected_mgmt_policy {
u8 reserved2[3];
} __packed;

-struct hif_mib_set_ht_protection {
- u8 dual_cts_prot:1;
- u8 reserved1:7;
- u8 reserved2[3];
-} __packed;
-
struct hif_mib_keep_alive_period {
__le16 keep_alive_period;
u8 reserved[2];
diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c
index 1d26d740bd0b..f04116ecb373 100644
--- a/drivers/staging/wfx/hif_tx_mib.c
+++ b/drivers/staging/wfx/hif_tx_mib.c
@@ -365,16 +365,6 @@ int hif_slot_time(struct wfx_vif *wvif, int val)
&arg, sizeof(arg));
}

-int hif_dual_cts_protection(struct wfx_vif *wvif, bool enable)
-{
- struct hif_mib_set_ht_protection arg = {
- .dual_cts_prot = enable,
- };
-
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SET_HT_PROTECTION,
- &arg, sizeof(arg));
-}
-
int hif_wep_default_key_id(struct wfx_vif *wvif, int val)
{
struct hif_mib_wep_default_key_id arg = {
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h
index 0f8b3bd9f14e..bb7c104a03d8 100644
--- a/drivers/staging/wfx/hif_tx_mib.h
+++ b/drivers/staging/wfx/hif_tx_mib.h
@@ -52,7 +52,6 @@ int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable);
int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val);
int hif_erp_use_protection(struct wfx_vif *wvif, bool enable);
int hif_slot_time(struct wfx_vif *wvif, int val);
-int hif_dual_cts_protection(struct wfx_vif *wvif, bool enable);
int hif_wep_default_key_id(struct wfx_vif *wvif, int val);
int hif_rts_threshold(struct wfx_vif *wvif, int val);

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index a0c7737903b9..2a9c7f28d934 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -482,12 +482,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
else
bss_params.operational_rate_set = -1;
rcu_read_unlock();
- if (sta &&
- info->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)
- hif_dual_cts_protection(wvif, true);
- else
- hif_dual_cts_protection(wvif, false);
-
// beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use
// the same value.
bss_params.beacon_lost_count = 7;
--
2.26.1