mwifiex: fix 5GHz association issue
authorAmitkumar Karwar <[email protected]>
Thu, 22 Sep 2011 04:43:22 +0000 (21:43 -0700)
committerJohn W. Linville <[email protected]>
Tue, 27 Sep 2011 18:34:02 +0000 (14:34 -0400)
Sometimes association in 5GHz doesn't work. Dmesg log shows
"Can not find requested SSID xyz" error message. Currently
while preparing scan channel list for firmware Null entries
are created for disabled channels. The routine which retrieves
this list ignores channels after Null entry. Hence sometimes
driver doesn't scan the channel of requested AP and association
fails. The issue is fixed by avoiding those NULL entries.

Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
drivers/net/wireless/mwifiex/scan.c

index 8d8588db1cd960d71fc34c4e564768ecf40bd30b..ecebff681bbbc90bba68ff7871c7740e8b90126d 100644 (file)
@@ -532,7 +532,7 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv,
 
                sband = priv->wdev->wiphy->bands[band];
 
-               for (i = 0; (i < sband->n_channels) ; i++, chan_idx++) {
+               for (i = 0; (i < sband->n_channels) ; i++) {
                        ch = &sband->channels[i];
                        if (ch->flags & IEEE80211_CHAN_DISABLED)
                                continue;
@@ -563,6 +563,7 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv,
                                scan_chan_list[chan_idx].chan_scan_mode_bitmap
                                        |= MWIFIEX_DISABLE_CHAN_FILT;
                        }
+                       chan_idx++;
                }
 
        }