forked from Minki/linux
iwlwifi: fix bug to show hidden APs during scan
Indirect scanning ('iwlist scan') should report information about hidden APs. When an AP is hidden it does not respond to active scanning, we thus have to use passive scanning to locate these APs. This fixes http://bughost.org/bugzilla/show_bug.cgi?id=1499 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Bill Moss <bmoss@clemson.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
35cdeaf410
commit
26c0f03f6b
@ -6309,18 +6309,23 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||||
if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR)
|
||||
scan->filter_flags = RXON_FILTER_PROMISC_MSK;
|
||||
|
||||
if (direct_mask)
|
||||
if (direct_mask) {
|
||||
IWL_DEBUG_SCAN
|
||||
("Initiating direct scan for %s.\n",
|
||||
iwl3945_escape_essid(priv->essid, priv->essid_len));
|
||||
else
|
||||
scan->channel_count =
|
||||
iwl3945_get_channels_for_scan(
|
||||
priv, band, 1, /* active */
|
||||
direct_mask,
|
||||
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
} else {
|
||||
IWL_DEBUG_SCAN("Initiating indirect scan.\n");
|
||||
|
||||
scan->channel_count =
|
||||
iwl3945_get_channels_for_scan(
|
||||
priv, band, 1, /* active */
|
||||
direct_mask,
|
||||
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
scan->channel_count =
|
||||
iwl3945_get_channels_for_scan(
|
||||
priv, band, 0, /* passive */
|
||||
direct_mask,
|
||||
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
}
|
||||
|
||||
cmd.len += le16_to_cpu(scan->tx_cmd.len) +
|
||||
scan->channel_count * sizeof(struct iwl3945_scan_channel);
|
||||
|
@ -6744,18 +6744,23 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
|
||||
if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR)
|
||||
scan->filter_flags = RXON_FILTER_PROMISC_MSK;
|
||||
|
||||
if (direct_mask)
|
||||
if (direct_mask) {
|
||||
IWL_DEBUG_SCAN
|
||||
("Initiating direct scan for %s.\n",
|
||||
iwl4965_escape_essid(priv->essid, priv->essid_len));
|
||||
else
|
||||
scan->channel_count =
|
||||
iwl4965_get_channels_for_scan(
|
||||
priv, band, 1, /* active */
|
||||
direct_mask,
|
||||
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
} else {
|
||||
IWL_DEBUG_SCAN("Initiating indirect scan.\n");
|
||||
|
||||
scan->channel_count =
|
||||
iwl4965_get_channels_for_scan(
|
||||
priv, band, 1, /* active */
|
||||
direct_mask,
|
||||
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
scan->channel_count =
|
||||
iwl4965_get_channels_for_scan(
|
||||
priv, band, 0, /* passive */
|
||||
direct_mask,
|
||||
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
|
||||
}
|
||||
|
||||
cmd.len += le16_to_cpu(scan->tx_cmd.len) +
|
||||
scan->channel_count * sizeof(struct iwl4965_scan_channel);
|
||||
|
Loading…
Reference in New Issue
Block a user