From: Pragya Gupta Date: Thu, 22 Feb 2018 13:14:40 +0000 (+0530) Subject: [7885] Driver crash on startup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d915f2a61168023888baf8d8e36778e3f93ed9f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [7885] Driver crash on startup For single band solutions, do not access the 5g channels Change-Id: Iaf7ad26129eb43795fb03bc73cae9f58ef4409ef SCSC-Bug-Id: SSB-37249 Signed-off-by: Himani Gupta --- diff --git a/drivers/net/wireless/scsc/mgt.c b/drivers/net/wireless/scsc/mgt.c index 571bc7eca4c6..03dc4f50156d 100755 --- a/drivers/net/wireless/scsc/mgt.c +++ b/drivers/net/wireless/scsc/mgt.c @@ -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; + } } } }