aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-30 10:12:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-28 07:48:47 -0400
commitf8f551089b0ca571b8f95465b6c3e1dd7bcea28e (patch)
tree374adfb7ea93bf1d5c46b7155c55ea7e3f609ae7 /drivers
parentb59bb616636f58ea650d2800a1dfc41c114f5ef8 (diff)
[PATCH] libertas: kill wlan_scan_process_results
Fold into wlan_scan_networks() and protect with debug defines. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/scan.c51
1 files changed, 14 insertions, 37 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 606af50fa09b..c3043dcb541e 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -215,38 +215,6 @@ done:
215} 215}
216 216
217/** 217/**
218 * @brief Post process the scan table after a new scan command has completed
219 *
220 * Inspect each entry of the scan table and try to find an entry that
221 * matches our current associated/joined network from the scan. If
222 * one is found, update the stored copy of the bssdescriptor for our
223 * current network.
224 *
225 * Debug dump the current scan table contents if compiled accordingly.
226 *
227 * @param priv A pointer to wlan_private structure
228 *
229 * @return void
230 */
231static void wlan_scan_process_results(wlan_private * priv)
232{
233 wlan_adapter *adapter = priv->adapter;
234 struct bss_descriptor * iter_bss;
235 int i = 0;
236
237 if (adapter->connect_status == libertas_connected)
238 return;
239
240 mutex_lock(&adapter->lock);
241 list_for_each_entry (iter_bss, &adapter->network_list, list) {
242 lbs_deb_scan("Scan:(%02d) " MAC_FMT ", RSSI[%03d], SSID[%s]\n",
243 i++, MAC_ARG(iter_bss->bssid), (s32) iter_bss->rssi,
244 escape_essid(iter_bss->ssid, iter_bss->ssid_len));
245 }
246 mutex_unlock(&adapter->lock);
247}
248
249/**
250 * @brief Create a channel list for the driver to scan based on region info 218 * @brief Create a channel list for the driver to scan based on region info
251 * 219 *
252 * Use the driver region/band information to construct a comprehensive list 220 * Use the driver region/band information to construct a comprehensive list
@@ -791,6 +759,10 @@ int wlan_scan_networks(wlan_private * priv,
791 u8 scancurrentchanonly; 759 u8 scancurrentchanonly;
792 int maxchanperscan; 760 int maxchanperscan;
793 int ret; 761 int ret;
762#ifdef CONFIG_LIBERTAS_DEBUG
763 struct bss_descriptor * iter_bss;
764 int i = 0;
765#endif
794 766
795 lbs_deb_enter(LBS_DEB_ASSOC); 767 lbs_deb_enter(LBS_DEB_ASSOC);
796 768
@@ -832,11 +804,16 @@ int wlan_scan_networks(wlan_private * priv,
832 puserscanin, 804 puserscanin,
833 full_scan); 805 full_scan);
834 806
835 /* Process the resulting scan table: 807#ifdef CONFIG_LIBERTAS_DEBUG
836 * - Remove any bad ssids 808 /* Dump the scan table */
837 * - Update our current BSS information from scan data 809 mutex_lock(&adapter->lock);
838 */ 810 list_for_each_entry (iter_bss, &adapter->network_list, list) {
839 wlan_scan_process_results(priv); 811 lbs_deb_scan("Scan:(%02d) " MAC_FMT ", RSSI[%03d], SSID[%s]\n",
812 i++, MAC_ARG(iter_bss->bssid), (s32) iter_bss->rssi,
813 escape_essid(iter_bss->ssid, iter_bss->ssid_len));
814 }
815 mutex_unlock(&adapter->lock);
816#endif
840 817
841 if (priv->adapter->connect_status == libertas_connected) { 818 if (priv->adapter->connect_status == libertas_connected) {
842 netif_carrier_on(priv->dev); 819 netif_carrier_on(priv->dev);