[RAMEN9610-21775]wlbt: Fix to enable SoftAp when hw_mode=ACS_MODE_IEEE80211ANY
authorSushant B Butta <b.sushant@samsung.com>
Fri, 31 Jul 2020 11:40:16 +0000 (17:10 +0530)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:39 +0000 (20:23 +0300)
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 <b.sushant@samsung.com>
drivers/net/wireless/scsc/rx.c

index 3a72a56ea2249fc7ea35b7c82c84cd6d8c82575e..d3ef9e663fab1722d2f327f360a162de9a1f9f33 100755 (executable)
@@ -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;