diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:36:10 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:36:10 -0400 |
commit | f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3 (patch) | |
tree | 9ff4b7efdb2ca1e83c2a413f06268b268098b3ca /net/ieee80211/softmac/ieee80211softmac_wx.c | |
parent | 17c281ab3e33be63693687d3db7ac9cf2bbdfd66 (diff) | |
parent | 848ef8555296f25d9226d3bc43ce4028835ed633 (diff) | |
download | kernel_samsung_smdk4412-f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3.tar.gz kernel_samsung_smdk4412-f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3.tar.bz2 kernel_samsung_smdk4412-f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3.zip |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/ieee80211/softmac/ieee80211softmac_wx.c')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_wx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c index b559aa9b550..00f0d4f7189 100644 --- a/net/ieee80211/softmac/ieee80211softmac_wx.c +++ b/net/ieee80211/softmac/ieee80211softmac_wx.c @@ -41,13 +41,23 @@ ieee80211softmac_wx_trigger_scan(struct net_device *net_dev, EXPORT_SYMBOL_GPL(ieee80211softmac_wx_trigger_scan); +/* if we're still scanning, return -EAGAIN so that userspace tools + * can get the complete scan results, otherwise return 0. */ int ieee80211softmac_wx_get_scan_results(struct net_device *net_dev, struct iw_request_info *info, union iwreq_data *data, char *extra) { + unsigned long flags; struct ieee80211softmac_device *sm = ieee80211_priv(net_dev); + + spin_lock_irqsave(&sm->lock, flags); + if (sm->scanning) { + spin_unlock_irqrestore(&sm->lock, flags); + return -EAGAIN; + } + spin_unlock_irqrestore(&sm->lock, flags); return ieee80211_wx_get_scan(sm->ieee, info, data, extra); } EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_scan_results); |