scan.c (9d066a252786e1a18484a6283f82614d42a9f4ac) scan.c (7947d3e075cde1a18e538f2dafbc850aa356ff79)
1/*
2 * Scan implementation for ST-Ericsson CW1200 mac80211 drivers
3 *
4 * Copyright (c) 2010, ST-Ericsson
5 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 153 unchanged lines hidden (view full) ---

162 /* FW bug: driver has to restart p2p-dev mode
163 * after scan
164 */
165 cw1200_disable_listening(priv);
166 }
167 }
168
169 if (!priv->scan.req || (priv->scan.curr == priv->scan.end)) {
1/*
2 * Scan implementation for ST-Ericsson CW1200 mac80211 drivers
3 *
4 * Copyright (c) 2010, ST-Ericsson
5 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 153 unchanged lines hidden (view full) ---

162 /* FW bug: driver has to restart p2p-dev mode
163 * after scan
164 */
165 cw1200_disable_listening(priv);
166 }
167 }
168
169 if (!priv->scan.req || (priv->scan.curr == priv->scan.end)) {
170 struct cfg80211_scan_info info = {
171 .aborted = priv->scan.status ? 1 : 0,
172 };
173
170 if (priv->scan.output_power != priv->output_power)
171 wsm_set_output_power(priv, priv->output_power * 10);
172 if (priv->join_status == CW1200_JOIN_STATUS_STA &&
173 !(priv->powersave_mode.mode & WSM_PSM_PS))
174 cw1200_set_pm(priv, &priv->powersave_mode);
175
176 if (priv->scan.status < 0)
177 wiphy_warn(priv->hw->wiphy,

--- 5 unchanged lines hidden (view full) ---

183 else
184 wiphy_dbg(priv->hw->wiphy,
185 "[SCAN] Scan canceled.\n");
186
187 priv->scan.req = NULL;
188 cw1200_scan_restart_delayed(priv);
189 wsm_unlock_tx(priv);
190 mutex_unlock(&priv->conf_mutex);
174 if (priv->scan.output_power != priv->output_power)
175 wsm_set_output_power(priv, priv->output_power * 10);
176 if (priv->join_status == CW1200_JOIN_STATUS_STA &&
177 !(priv->powersave_mode.mode & WSM_PSM_PS))
178 cw1200_set_pm(priv, &priv->powersave_mode);
179
180 if (priv->scan.status < 0)
181 wiphy_warn(priv->hw->wiphy,

--- 5 unchanged lines hidden (view full) ---

187 else
188 wiphy_dbg(priv->hw->wiphy,
189 "[SCAN] Scan canceled.\n");
190
191 priv->scan.req = NULL;
192 cw1200_scan_restart_delayed(priv);
193 wsm_unlock_tx(priv);
194 mutex_unlock(&priv->conf_mutex);
191 ieee80211_scan_completed(priv->hw, priv->scan.status ? 1 : 0);
195 ieee80211_scan_completed(priv->hw, &info);
192 up(&priv->scan.lock);
193 return;
194 } else {
195 struct ieee80211_channel *first = *priv->scan.curr;
196 for (it = priv->scan.curr + 1, i = 1;
197 it != priv->scan.end && i < WSM_SCAN_MAX_NUM_OF_CHANNELS;
198 ++it, ++i) {
199 if ((*it)->band != first->band)

--- 264 unchanged lines hidden ---
196 up(&priv->scan.lock);
197 return;
198 } else {
199 struct ieee80211_channel *first = *priv->scan.curr;
200 for (it = priv->scan.curr + 1, i = 1;
201 it != priv->scan.end && i < WSM_SCAN_MAX_NUM_OF_CHANNELS;
202 ++it, ++i) {
203 if ((*it)->band != first->band)

--- 264 unchanged lines hidden ---