diff options
author | Bill Moss <bmoss@clemson.edu> | 2008-04-17 19:03:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-01 17:38:24 -0400 |
commit | 786b4557075ae0d8a23e73c316dc4204b41ccb4d (patch) | |
tree | b6b5db2d24e4cf643954a564f70da39df7b7a075 /drivers/net/wireless | |
parent | f52764886540b16e7962bd1d150bd939aec9248c (diff) |
iwlwifi: fix debug messages during scanning
direct_mask will be set when we are not associated and requesting a
direct scan. The second debug print will be confusing as priv->essid
is not set at that time and it will thus print "<hidden>" while it is
known to which AP a direct scan is requested - as previous debug message
also indicates.
Now make all debugging consistent.
Signed-off-by: Bill Moss <bmoss@clemson.edu>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 13 |
2 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d723c474f810..13925b627e3b 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6292,12 +6292,17 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6292 | priv->direct_ssid, priv->direct_ssid_len); | 6292 | priv->direct_ssid, priv->direct_ssid_len); |
6293 | direct_mask = 1; | 6293 | direct_mask = 1; |
6294 | } else if (!iwl3945_is_associated(priv) && priv->essid_len) { | 6294 | } else if (!iwl3945_is_associated(priv) && priv->essid_len) { |
6295 | IWL_DEBUG_SCAN | ||
6296 | ("Kicking off one direct scan for '%s' when not associated\n", | ||
6297 | iwl3945_escape_essid(priv->essid, priv->essid_len)); | ||
6295 | scan->direct_scan[0].id = WLAN_EID_SSID; | 6298 | scan->direct_scan[0].id = WLAN_EID_SSID; |
6296 | scan->direct_scan[0].len = priv->essid_len; | 6299 | scan->direct_scan[0].len = priv->essid_len; |
6297 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 6300 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
6298 | direct_mask = 1; | 6301 | direct_mask = 1; |
6299 | } else | 6302 | } else { |
6303 | IWL_DEBUG_SCAN("Kicking off one indirect scan.\n"); | ||
6300 | direct_mask = 0; | 6304 | direct_mask = 0; |
6305 | } | ||
6301 | 6306 | ||
6302 | /* We don't build a direct scan probe request; the uCode will do | 6307 | /* We don't build a direct scan probe request; the uCode will do |
6303 | * that based on the direct_mask added to each channel entry */ | 6308 | * that based on the direct_mask added to each channel entry */ |
@@ -6335,23 +6340,18 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6335 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) | 6340 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) |
6336 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; | 6341 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; |
6337 | 6342 | ||
6338 | if (direct_mask) { | 6343 | if (direct_mask) |
6339 | IWL_DEBUG_SCAN | ||
6340 | ("Initiating direct scan for %s.\n", | ||
6341 | iwl3945_escape_essid(priv->essid, priv->essid_len)); | ||
6342 | scan->channel_count = | 6344 | scan->channel_count = |
6343 | iwl3945_get_channels_for_scan( | 6345 | iwl3945_get_channels_for_scan( |
6344 | priv, band, 1, /* active */ | 6346 | priv, band, 1, /* active */ |
6345 | direct_mask, | 6347 | direct_mask, |
6346 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 6348 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
6347 | } else { | 6349 | else |
6348 | IWL_DEBUG_SCAN("Initiating indirect scan.\n"); | ||
6349 | scan->channel_count = | 6350 | scan->channel_count = |
6350 | iwl3945_get_channels_for_scan( | 6351 | iwl3945_get_channels_for_scan( |
6351 | priv, band, 0, /* passive */ | 6352 | priv, band, 0, /* passive */ |
6352 | direct_mask, | 6353 | direct_mask, |
6353 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 6354 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
6354 | } | ||
6355 | 6355 | ||
6356 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + | 6356 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + |
6357 | scan->channel_count * sizeof(struct iwl3945_scan_channel); | 6357 | scan->channel_count * sizeof(struct iwl3945_scan_channel); |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 6d077aff9cb6..883b42f7e998 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -5813,11 +5813,15 @@ static void iwl4965_bg_request_scan(struct work_struct *data) | |||
5813 | priv->direct_ssid, priv->direct_ssid_len); | 5813 | priv->direct_ssid, priv->direct_ssid_len); |
5814 | direct_mask = 1; | 5814 | direct_mask = 1; |
5815 | } else if (!iwl_is_associated(priv) && priv->essid_len) { | 5815 | } else if (!iwl_is_associated(priv) && priv->essid_len) { |
5816 | IWL_DEBUG_SCAN | ||
5817 | ("Kicking off one direct scan for '%s' when not associated\n", | ||
5818 | iwl4965_escape_essid(priv->essid, priv->essid_len)); | ||
5816 | scan->direct_scan[0].id = WLAN_EID_SSID; | 5819 | scan->direct_scan[0].id = WLAN_EID_SSID; |
5817 | scan->direct_scan[0].len = priv->essid_len; | 5820 | scan->direct_scan[0].len = priv->essid_len; |
5818 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 5821 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
5819 | direct_mask = 1; | 5822 | direct_mask = 1; |
5820 | } else { | 5823 | } else { |
5824 | IWL_DEBUG_SCAN("Kicking off one indirect scan.\n"); | ||
5821 | direct_mask = 0; | 5825 | direct_mask = 0; |
5822 | } | 5826 | } |
5823 | 5827 | ||
@@ -5870,23 +5874,18 @@ static void iwl4965_bg_request_scan(struct work_struct *data) | |||
5870 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) | 5874 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) |
5871 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; | 5875 | scan->filter_flags = RXON_FILTER_PROMISC_MSK; |
5872 | 5876 | ||
5873 | if (direct_mask) { | 5877 | if (direct_mask) |
5874 | IWL_DEBUG_SCAN | ||
5875 | ("Initiating direct scan for %s.\n", | ||
5876 | iwl4965_escape_essid(priv->essid, priv->essid_len)); | ||
5877 | scan->channel_count = | 5878 | scan->channel_count = |
5878 | iwl4965_get_channels_for_scan( | 5879 | iwl4965_get_channels_for_scan( |
5879 | priv, band, 1, /* active */ | 5880 | priv, band, 1, /* active */ |
5880 | direct_mask, | 5881 | direct_mask, |
5881 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 5882 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
5882 | } else { | 5883 | else |
5883 | IWL_DEBUG_SCAN("Initiating indirect scan.\n"); | ||
5884 | scan->channel_count = | 5884 | scan->channel_count = |
5885 | iwl4965_get_channels_for_scan( | 5885 | iwl4965_get_channels_for_scan( |
5886 | priv, band, 0, /* passive */ | 5886 | priv, band, 0, /* passive */ |
5887 | direct_mask, | 5887 | direct_mask, |
5888 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 5888 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
5889 | } | ||
5890 | 5889 | ||
5891 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + | 5890 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + |
5892 | scan->channel_count * sizeof(struct iwl4965_scan_channel); | 5891 | scan->channel_count * sizeof(struct iwl4965_scan_channel); |