Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215049
b: refs/heads/master
c: c454f1d
h: refs/heads/master
i:
  215047: 5df3f4a
v: v3
  • Loading branch information
Juuso Oikarinen authored and Luciano Coelho committed Sep 28, 2010
1 parent 202b34e commit b7e88f7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9987a9da3eda093ceeff14ad4926adb130a0d0ea
refs/heads/master: c454f1d9a896d3519c756355b37bb39941093233
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ struct wl1271 {

/* Are we currently scanning */
struct wl1271_scan scan;
struct work_struct scan_complete_work;

/* Our association ID */
u16 aid;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ static int wl1271_setup(struct wl1271 *wl)

INIT_WORK(&wl->irq_work, wl1271_irq_work);
INIT_WORK(&wl->tx_work, wl1271_tx_work);
INIT_WORK(&wl->scan_complete_work, wl1271_scan_complete_work);

return 0;
}

Expand Down Expand Up @@ -962,6 +964,8 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
struct wl1271 *wl = hw->priv;
int i;

cancel_work_sync(&wl->scan_complete_work);

mutex_lock(&wl->mutex);
wl1271_debug(DEBUG_MAC80211, "mac80211 remove interface");

Expand Down
23 changes: 18 additions & 5 deletions trunk/drivers/net/wireless/wl12xx/wl1271_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@
#include "wl1271_scan.h"
#include "wl1271_acx.h"

void wl1271_scan_complete_work(struct work_struct *work)
{
struct wl1271 *wl =
container_of(work, struct wl1271, scan_complete_work);

wl1271_debug(DEBUG_SCAN, "Scanning complete");

mutex_lock(&wl->mutex);
wl->scan.state = WL1271_SCAN_STATE_IDLE;
kfree(wl->scan.scanned_ch);
wl->scan.scanned_ch = NULL;
mutex_unlock(&wl->mutex);

ieee80211_scan_completed(wl->hw, false);
}


static int wl1271_get_scan_channels(struct wl1271 *wl,
struct cfg80211_scan_request *req,
struct basic_scan_channel_params *channels,
Expand Down Expand Up @@ -218,11 +235,7 @@ void wl1271_scan_stm(struct wl1271 *wl)
break;

case WL1271_SCAN_STATE_DONE:
kfree(wl->scan.scanned_ch);
wl->scan.scanned_ch = NULL;

wl->scan.state = WL1271_SCAN_STATE_IDLE;
ieee80211_scan_completed(wl->hw, false);
ieee80211_queue_work(wl->hw, &wl->scan_complete_work);
break;

default:
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ int wl1271_scan_build_probe_req(struct wl1271 *wl,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len, u8 band);
void wl1271_scan_stm(struct wl1271 *wl);
void wl1271_scan_complete_work(struct work_struct *work);

#define WL1271_SCAN_MAX_CHANNELS 24
#define WL1271_SCAN_DEFAULT_TAG 1
Expand Down

0 comments on commit b7e88f7

Please sign in to comment.