diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-09-29 10:04:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-30 15:57:19 -0400 |
commit | c2c98fdeb5c897499644eb247285c8e3dacc6450 (patch) | |
tree | aaa9c0f8dd16ab896308470e21a0813041094670 /net/mac80211/debugfs_sta.c | |
parent | deeaee197b0fa694ba6c8f02cdb57b3be7115b4f (diff) |
mac80211: optimise station flags
The flaglock in struct sta_info has long been
something that I wanted to get rid of, this
finally does the conversion to atomic bitops.
The conversion itself is straight-forward in
most places, a few things needed to change a
bit since we can no longer use multiple bits
at the same time.
On x86-64, this is a fairly significant code
size reduction:
text data bss dec hex
427861 23648 1008 452517 6e7a5 before
425383 23648 976 450007 6ddd7 after
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r-- | net/mac80211/debugfs_sta.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 20ec2b0cb3c1..56bb68b9c42d 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -58,17 +58,17 @@ static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | |||
58 | { | 58 | { |
59 | char buf[100]; | 59 | char buf[100]; |
60 | struct sta_info *sta = file->private_data; | 60 | struct sta_info *sta = file->private_data; |
61 | u32 staflags = get_sta_flags(sta); | 61 | |
62 | int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s", | 62 | int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s", |
63 | staflags & WLAN_STA_AUTH ? "AUTH\n" : "", | 63 | test_sta_flag(sta, WLAN_STA_AUTH) ? "AUTH\n" : "", |
64 | staflags & WLAN_STA_ASSOC ? "ASSOC\n" : "", | 64 | test_sta_flag(sta, WLAN_STA_ASSOC) ? "ASSOC\n" : "", |
65 | staflags & WLAN_STA_PS_STA ? "PS (sta)\n" : "", | 65 | test_sta_flag(sta, WLAN_STA_PS_STA) ? "PS (sta)\n" : "", |
66 | staflags & WLAN_STA_PS_DRIVER ? "PS (driver)\n" : "", | 66 | test_sta_flag(sta, WLAN_STA_PS_DRIVER) ? "PS (driver)\n" : "", |
67 | staflags & WLAN_STA_AUTHORIZED ? "AUTHORIZED\n" : "", | 67 | test_sta_flag(sta, WLAN_STA_AUTHORIZED) ? "AUTHORIZED\n" : "", |
68 | staflags & WLAN_STA_SHORT_PREAMBLE ? "SHORT PREAMBLE\n" : "", | 68 | test_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE) ? "SHORT PREAMBLE\n" : "", |
69 | staflags & WLAN_STA_WME ? "WME\n" : "", | 69 | test_sta_flag(sta, WLAN_STA_WME) ? "WME\n" : "", |
70 | staflags & WLAN_STA_WDS ? "WDS\n" : "", | 70 | test_sta_flag(sta, WLAN_STA_WDS) ? "WDS\n" : "", |
71 | staflags & WLAN_STA_MFP ? "MFP\n" : ""); | 71 | test_sta_flag(sta, WLAN_STA_MFP) ? "MFP\n" : ""); |
72 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); | 72 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); |
73 | } | 73 | } |
74 | STA_OPS(flags); | 74 | STA_OPS(flags); |