CHROMIUM: mwifiex: Send individual channel TLVs
authorPaul Stewart <pstew@chromium.org>
Fri, 12 Oct 2012 18:47:05 +0000 (11:47 -0700)
committerGerrit <chrome-bot@google.com>
Fri, 12 Oct 2012 21:24:37 +0000 (14:24 -0700)
This is a workaround for possible buffering issues for scans
in environments where BSSes are plentiful.  This improves
reliability of scanning by breaking up the scan commands.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:14655
TEST=Testbed runs.

Change-Id: If2f8a6558561efbf36998a8ebdf2ce9ebec3dcdd
Reviewed-on: https://gerrit.chromium.org/gerrit/35435
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
drivers/net/wireless/mwifiex/ioctl.h
drivers/net/wireless/mwifiex/scan.c

index f0f9552..e5ad345 100644 (file)
@@ -237,7 +237,7 @@ struct mwifiex_ds_11n_amsdu_aggr_ctrl {
        u16 curr_buf_size;
 };
 
-#define MWIFIEX_NUM_OF_CMD_BUFFER      20
+#define MWIFIEX_NUM_OF_CMD_BUFFER      50
 #define MWIFIEX_SIZE_OF_CMD_BUFFER     2048
 
 enum {
index 88fdf50..63d5381 100644 (file)
@@ -557,7 +557,6 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv,
 
        u32 tlv_idx;
        u32 total_scan_time;
-       u32 done_early;
 
        if (!scan_cfg_out || !chan_tlv_out || !scan_chan_list) {
                dev_dbg(priv->adapter->dev,
@@ -581,7 +580,6 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv,
                total_scan_time = 0;
                chan_tlv_out->header.len = 0;
                start_chan = tmp_chan_list;
-               done_early = false;
 
                /*
                 * Construct the Channel TLV for the scan command.  Continue to
@@ -592,9 +590,7 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv,
                 *   - done_early is set (controlling individual scanning of
                 *     1,6,11)
                 */
-               while (tlv_idx < max_chan_per_scan &&
-                      tmp_chan_list->chan_number && !done_early) {
-
+               if (tlv_idx < max_chan_per_scan) {
                        dev_dbg(priv->adapter->dev,
                                "info: Scan: Chan(%3d), Radio(%d),"
                                " Mode(%d, %d), Dur(%d)\n",
@@ -641,29 +637,9 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv,
                        total_scan_time +=
                                le16_to_cpu(tmp_chan_list->max_scan_time);
 
-                       done_early = false;
-
-                       /* Stop the loop if the *current* channel is in the
-                          1,6,11 set and we are not filtering on a BSSID
-                          or SSID. */
-                       if (!filtered_scan &&
-                           (tmp_chan_list->chan_number == 1 ||
-                            tmp_chan_list->chan_number == 6 ||
-                            tmp_chan_list->chan_number == 11))
-                               done_early = true;
-
                        /* Increment the tmp pointer to the next channel to
                           be scanned */
                        tmp_chan_list++;
-
-                       /* Stop the loop if the *next* channel is in the 1,6,11
-                          set.  This will cause it to be the only channel
-                          scanned on the next interation */
-                       if (!filtered_scan &&
-                           (tmp_chan_list->chan_number == 1 ||
-                            tmp_chan_list->chan_number == 6 ||
-                            tmp_chan_list->chan_number == 11))
-                               done_early = true;
                }
 
                /* The total scan time should be less than scan command timeout