Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290368
b: refs/heads/master
c: 885bd8e
h: refs/heads/master
v: v3
  • Loading branch information
Eliad Peller authored and John W. Linville committed Feb 6, 2012
1 parent d9892f0 commit 21052e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 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: 3dc5e1751803e812806d7aa46150af92f91ef489
refs/heads/master: 885bd8eca6ac172e299750d99bd5c9fddbed89b9
5 changes: 5 additions & 0 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,10 @@ enum sta_notify_cmd {
* @IEEE80211_HW_TX_AMPDU_SETUP_IN_HW: The device handles TX A-MPDU session
* setup strictly in HW. mac80211 should not attempt to do this in
* software.
*
* @IEEE80211_HW_SCAN_WHILE_IDLE: The device can do hw scan while
* being idle (i.e. mac80211 doesn't have to go idle-off during the
* the scan).
*/
enum ieee80211_hw_flags {
IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
Expand All @@ -1190,6 +1194,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21,
IEEE80211_HW_AP_LINK_PS = 1<<22,
IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23,
IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24,
};

/**
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/mac80211/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
sf += snprintf(buf + sf, mxln - sf, "AP_LINK_PS\n");
if (local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW)
sf += snprintf(buf + sf, mxln - sf, "TX_AMPDU_SETUP_IN_HW\n");
if (local->hw.flags & IEEE80211_HW_SCAN_WHILE_IDLE)
sf += snprintf(buf + sf, mxln - sf, "SCAN_WHILE_IDLE\n");

rv = simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
kfree(buf);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,8 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
wk->sdata->vif.bss_conf.idle = false;
}

if (local->scan_sdata) {
if (local->scan_sdata &&
!(local->hw.flags & IEEE80211_HW_SCAN_WHILE_IDLE)) {
scanning = true;
local->scan_sdata->vif.bss_conf.idle = false;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
)
return -EINVAL;

if ((hw->flags & IEEE80211_HW_SCAN_WHILE_IDLE) && !local->ops->hw_scan)
return -EINVAL;

if (hw->max_report_rates == 0)
hw->max_report_rates = hw->max_rates;

Expand Down

0 comments on commit 21052e8

Please sign in to comment.