diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-02-15 06:44:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:51:42 -0500 |
commit | 469002983fc90c2ff0959e2b03335c0fe2e4d5a9 (patch) | |
tree | fdcf78dcdaeadba897abd86d39d0275e236803b3 /net/mac80211/debugfs_netdev.c | |
parent | 96f5e66e8a79810e2982cdcfa28e554f3d97da21 (diff) |
mac80211: split IBSS/managed code
This patch splits out the ibss code and data from managed (station) mode.
The reason to do this is to better separate the state machines, and have
the code be contained better so it gets easier to determine what exactly
a given change will affect, that in turn makes it easier to understand.
This is quite some churn, especially because I split sdata->u.sta into
sdata->u.mgd and sdata->u.ibss, but I think it's easier to maintain that
way. I've also shuffled around some code -- null function sending is only
applicable to managed interfaces so put that into that file, some other
functions are needed from various places so put them into util, and also
rearranged the prototypes in ieee80211_i.h accordingly.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index c54219301724..e3420329f4e6 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -94,31 +94,31 @@ IEEE80211_IF_FILE(drop_unencrypted, drop_unencrypted, DEC); | |||
94 | IEEE80211_IF_FILE(force_unicast_rateidx, force_unicast_rateidx, DEC); | 94 | IEEE80211_IF_FILE(force_unicast_rateidx, force_unicast_rateidx, DEC); |
95 | IEEE80211_IF_FILE(max_ratectrl_rateidx, max_ratectrl_rateidx, DEC); | 95 | IEEE80211_IF_FILE(max_ratectrl_rateidx, max_ratectrl_rateidx, DEC); |
96 | 96 | ||
97 | /* STA/IBSS attributes */ | 97 | /* STA attributes */ |
98 | IEEE80211_IF_FILE(state, u.sta.state, DEC); | 98 | IEEE80211_IF_FILE(state, u.mgd.state, DEC); |
99 | IEEE80211_IF_FILE(bssid, u.sta.bssid, MAC); | 99 | IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC); |
100 | IEEE80211_IF_FILE(prev_bssid, u.sta.prev_bssid, MAC); | 100 | IEEE80211_IF_FILE(prev_bssid, u.mgd.prev_bssid, MAC); |
101 | IEEE80211_IF_FILE(ssid_len, u.sta.ssid_len, SIZE); | 101 | IEEE80211_IF_FILE(ssid_len, u.mgd.ssid_len, SIZE); |
102 | IEEE80211_IF_FILE(aid, u.sta.aid, DEC); | 102 | IEEE80211_IF_FILE(aid, u.mgd.aid, DEC); |
103 | IEEE80211_IF_FILE(ap_capab, u.sta.ap_capab, HEX); | 103 | IEEE80211_IF_FILE(ap_capab, u.mgd.ap_capab, HEX); |
104 | IEEE80211_IF_FILE(capab, u.sta.capab, HEX); | 104 | IEEE80211_IF_FILE(capab, u.mgd.capab, HEX); |
105 | IEEE80211_IF_FILE(extra_ie_len, u.sta.extra_ie_len, SIZE); | 105 | IEEE80211_IF_FILE(extra_ie_len, u.mgd.extra_ie_len, SIZE); |
106 | IEEE80211_IF_FILE(auth_tries, u.sta.auth_tries, DEC); | 106 | IEEE80211_IF_FILE(auth_tries, u.mgd.auth_tries, DEC); |
107 | IEEE80211_IF_FILE(assoc_tries, u.sta.assoc_tries, DEC); | 107 | IEEE80211_IF_FILE(assoc_tries, u.mgd.assoc_tries, DEC); |
108 | IEEE80211_IF_FILE(auth_algs, u.sta.auth_algs, HEX); | 108 | IEEE80211_IF_FILE(auth_algs, u.mgd.auth_algs, HEX); |
109 | IEEE80211_IF_FILE(auth_alg, u.sta.auth_alg, DEC); | 109 | IEEE80211_IF_FILE(auth_alg, u.mgd.auth_alg, DEC); |
110 | IEEE80211_IF_FILE(auth_transaction, u.sta.auth_transaction, DEC); | 110 | IEEE80211_IF_FILE(auth_transaction, u.mgd.auth_transaction, DEC); |
111 | 111 | ||
112 | static ssize_t ieee80211_if_fmt_flags( | 112 | static ssize_t ieee80211_if_fmt_flags( |
113 | const struct ieee80211_sub_if_data *sdata, char *buf, int buflen) | 113 | const struct ieee80211_sub_if_data *sdata, char *buf, int buflen) |
114 | { | 114 | { |
115 | return scnprintf(buf, buflen, "%s%s%s%s%s%s%s\n", | 115 | return scnprintf(buf, buflen, "%s%s%s%s%s%s%s\n", |
116 | sdata->u.sta.flags & IEEE80211_STA_SSID_SET ? "SSID\n" : "", | 116 | sdata->u.mgd.flags & IEEE80211_STA_SSID_SET ? "SSID\n" : "", |
117 | sdata->u.sta.flags & IEEE80211_STA_BSSID_SET ? "BSSID\n" : "", | 117 | sdata->u.mgd.flags & IEEE80211_STA_BSSID_SET ? "BSSID\n" : "", |
118 | sdata->u.sta.flags & IEEE80211_STA_PREV_BSSID_SET ? "prev BSSID\n" : "", | 118 | sdata->u.mgd.flags & IEEE80211_STA_PREV_BSSID_SET ? "prev BSSID\n" : "", |
119 | sdata->u.sta.flags & IEEE80211_STA_AUTHENTICATED ? "AUTH\n" : "", | 119 | sdata->u.mgd.flags & IEEE80211_STA_AUTHENTICATED ? "AUTH\n" : "", |
120 | sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED ? "ASSOC\n" : "", | 120 | sdata->u.mgd.flags & IEEE80211_STA_ASSOCIATED ? "ASSOC\n" : "", |
121 | sdata->u.sta.flags & IEEE80211_STA_PROBEREQ_POLL ? "PROBEREQ POLL\n" : "", | 121 | sdata->u.mgd.flags & IEEE80211_STA_PROBEREQ_POLL ? "PROBEREQ POLL\n" : "", |
122 | sdata->vif.bss_conf.use_cts_prot ? "CTS prot\n" : ""); | 122 | sdata->vif.bss_conf.use_cts_prot ? "CTS prot\n" : ""); |
123 | } | 123 | } |
124 | __IEEE80211_IF_FILE(flags); | 124 | __IEEE80211_IF_FILE(flags); |
@@ -283,9 +283,11 @@ static void add_files(struct ieee80211_sub_if_data *sdata) | |||
283 | #endif | 283 | #endif |
284 | break; | 284 | break; |
285 | case NL80211_IFTYPE_STATION: | 285 | case NL80211_IFTYPE_STATION: |
286 | case NL80211_IFTYPE_ADHOC: | ||
287 | add_sta_files(sdata); | 286 | add_sta_files(sdata); |
288 | break; | 287 | break; |
288 | case NL80211_IFTYPE_ADHOC: | ||
289 | /* XXX */ | ||
290 | break; | ||
289 | case NL80211_IFTYPE_AP: | 291 | case NL80211_IFTYPE_AP: |
290 | add_ap_files(sdata); | 292 | add_ap_files(sdata); |
291 | break; | 293 | break; |
@@ -418,9 +420,11 @@ static void del_files(struct ieee80211_sub_if_data *sdata) | |||
418 | #endif | 420 | #endif |
419 | break; | 421 | break; |
420 | case NL80211_IFTYPE_STATION: | 422 | case NL80211_IFTYPE_STATION: |
421 | case NL80211_IFTYPE_ADHOC: | ||
422 | del_sta_files(sdata); | 423 | del_sta_files(sdata); |
423 | break; | 424 | break; |
425 | case NL80211_IFTYPE_ADHOC: | ||
426 | /* XXX */ | ||
427 | break; | ||
424 | case NL80211_IFTYPE_AP: | 428 | case NL80211_IFTYPE_AP: |
425 | del_ap_files(sdata); | 429 | del_ap_files(sdata); |
426 | break; | 430 | break; |