Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266585
b: refs/heads/master
c: 11869be
h: refs/heads/master
i:
  266583: c2f50fe
v: v3
  • Loading branch information
Jouni Malinen authored and Kalle Valo committed Sep 5, 2011
1 parent 4c435c3 commit df79eb1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 252c068b9fba57493940af344b6d92ee3c278941
refs/heads/master: 11869befc7285be712623536daa30791aec1682f
14 changes: 10 additions & 4 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,10 +793,16 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
}
}

if (request->n_channels > 0) {
/*
* Scan only the requested channels if the request specifies a set of
* channels. If the list is longer than the target supports, do not
* configure the list and instead, scan all available channels.
*/
if (request->n_channels > 0 &&
request->n_channels <= WMI_MAX_CHANNELS) {
u8 i;

n_channels = min(127U, request->n_channels);
n_channels = request->n_channels;

channels = kzalloc(n_channels * sizeof(u16), GFP_KERNEL);
if (channels == NULL) {
Expand All @@ -813,8 +819,8 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
false, 0, 0, n_channels, channels);
if (ret)
ath6kl_err("wmi_startscan_cmd failed\n");

ar->scan_req = request;
else
ar->scan_req = request;

kfree(channels);

Expand Down

0 comments on commit df79eb1

Please sign in to comment.