From 04d2fd5396aea84f986d38a1bfe5f2d90ce08262 Mon Sep 17 00:00:00 2001 From: Sushant B Butta Date: Fri, 31 Jul 2020 17:10:16 +0530 Subject: [PATCH] [RAMEN9610-21775]wlbt: Fix to enable SoftAp when hw_mode=ACS_MODE_IEEE80211ANY Chages are done to enable SoftAp if hw_mode is passed as ACS_MODE_IEEE80211ANY. Change-Id: I5098d88f67f2337fc4d59079c91245a2167ac4b7 SCSC-Bug-Id: HOST-13279 Signed-off-by: Sushant B Butta --- drivers/net/wireless/scsc/rx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/scsc/rx.c b/drivers/net/wireless/scsc/rx.c index 3a72a56ea224..d3ef9e663fab 100755 --- a/drivers/net/wireless/scsc/rx.c +++ b/drivers/net/wireless/scsc/rx.c @@ -935,6 +935,7 @@ int slsi_set_band_any_auto_channel(struct slsi_dev *sdev, struct netdev_vif *nd if (best_channel_5g_num_ap < MAX_AP_THRESHOLD) { *acs_selected_channels = acs_selected_channels_5g; + acs_selected_channels->hw_mode = SLSI_ACS_MODE_IEEE80211A; return ret; } } @@ -958,14 +959,19 @@ int slsi_set_band_any_auto_channel(struct slsi_dev *sdev, struct netdev_vif *nd best_channel_2g_num_ap); if (best_channel_5g == -1) { *acs_selected_channels = acs_selected_channels_2g; + acs_selected_channels->hw_mode = SLSI_ACS_MODE_IEEE80211G; return ret; } else { /* Based on min no of APs selecting channel from that band */ /* If no. of APs are equal, selecting the 5G channel */ - if (best_channel_5g_num_ap > best_channel_2g_num_ap) + if (best_channel_5g_num_ap > best_channel_2g_num_ap) { *acs_selected_channels = acs_selected_channels_2g; - else + acs_selected_channels->hw_mode = SLSI_ACS_MODE_IEEE80211G; + } + else { *acs_selected_channels = acs_selected_channels_5g; + acs_selected_channels->hw_mode = SLSI_ACS_MODE_IEEE80211A; + } } } return ret; -- 2.20.1