[OEM-B,SRU,2/3] UBUNTU: SAUCE: rsi: fix for 40MHZ connection issue.

Message ID 20180601092341.4592-3-shrirang.bagul@canonical.com
State New
Headers show
Series
  • Wifi AP does not work
Related show

Commit Message

Shrirang Bagul June 1, 2018, 9:23 a.m.
From: Ganapathi Raju <ganapathi.kondraju@redpinesignals.com>

Radio capabilities packet is not prepared properly for 40MHz case,
ppe_ack_rate is a two byte variable which is initialized wrongly,
hence we are unable to connect, resolved by assigning it properly.

Signed-off-by: Ganapathi Raju <ganapathi.kondraju@redpinesignals.com>
Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
---
 drivers/net/wireless/rsi/rsi_91x_mgmt.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index d55ed69c3f48..550c9757d237 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -369,20 +369,14 @@  static int rsi_load_radio_caps(struct rsi_common *common)
 			struct ieee80211_conf *conf = &hw->conf;
 
 			if (conf_is_ht40_plus(conf)) {
-				radio_caps->radio_cfg_info =
-					RSI_CMDDESC_LOWER_20_ENABLE;
-				radio_caps->radio_info =
-					RSI_CMDDESC_LOWER_20_ENABLE;
+				radio_caps->ppe_ack_rate = LOWER_20_ENABLE |
+					(LOWER_20_ENABLE >> 12);
 			} else if (conf_is_ht40_minus(conf)) {
-				radio_caps->radio_cfg_info =
-					RSI_CMDDESC_UPPER_20_ENABLE;
-				radio_caps->radio_info =
-					RSI_CMDDESC_UPPER_20_ENABLE;
+				radio_caps->ppe_ack_rate = UPPER_20_ENABLE |
+					(UPPER_20_ENABLE >> 12);
 			} else {
-				radio_caps->radio_cfg_info =
-					RSI_CMDDESC_40MHZ;
-				radio_caps->radio_info =
-					RSI_CMDDESC_FULL_40_ENABLE;
+				radio_caps->ppe_ack_rate = (BW_40MHZ << 12) |
+							   FULL40M_ENABLE;
 			}
 		}
 	}