[7885] Driver crash on startup
authorPragya Gupta <pragya.gupta@samsung.com>
Thu, 22 Feb 2018 13:14:40 +0000 (18:44 +0530)
committerIvan Priest <i.priest@samsung.com>
Wed, 11 Jul 2018 17:43:32 +0000 (18:43 +0100)
For single band solutions, do not access the 5g channels

Change-Id: Iaf7ad26129eb43795fb03bc73cae9f58ef4409ef
SCSC-Bug-Id: SSB-37249
Signed-off-by: Himani Gupta <himani.g2@samsung.com>
drivers/net/wireless/scsc/mgt.c

index 571bc7eca4c6ebc1d1e3200d84efffb301afe52f..03dc4f50156d5fe49751d1a70f31cc212138d0d9 100755 (executable)
@@ -4651,10 +4651,12 @@ void slsi_update_supported_channels_regd_flags(struct slsi_dev *sdev)
                        chan->flags |= IEEE80211_CHAN_DISABLED;
                }
        }
-       for (i = 0; i <  ARRAY_SIZE(sdev->supported_5g_channels); i++) {
-               if (sdev->supported_5g_channels[i] == 0) {
-                       chan = &wiphy->bands[1]->channels[i];
-                       chan->flags |= IEEE80211_CHAN_DISABLED;
+       if (sdev->band_5g_supported) {
+               for (i = 0; i <  ARRAY_SIZE(sdev->supported_5g_channels); i++) {
+                       if (sdev->supported_5g_channels[i] == 0) {
+                               chan = &wiphy->bands[1]->channels[i];
+                               chan->flags |= IEEE80211_CHAN_DISABLED;
+                       }
                }
        }
 }