diff options
author | Assaf Krauss <assaf.krauss@intel.com> | 2008-06-15 11:23:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-26 16:49:14 -0400 |
commit | f2df38596a81b6c24f4586b0b4befeaebf3e02db (patch) | |
tree | 3906ec28e75cb84b9644b94a8cec202c61f4f0f6 /net | |
parent | b99a017c01bb19b58fd0826e36a1bdacf581c545 (diff) |
mac80211: 11h Infrastructure - Parsing
This patch introduces parsing of 11h and 11d related elements from incoming
management frames.
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 9 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 19 |
2 files changed, 28 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 80a9e7c07b47..af352c05c983 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -791,6 +791,10 @@ struct ieee802_11_elems { | |||
791 | u8 *preq; | 791 | u8 *preq; |
792 | u8 *prep; | 792 | u8 *prep; |
793 | u8 *perr; | 793 | u8 *perr; |
794 | u8 *ch_switch_elem; | ||
795 | u8 *country_elem; | ||
796 | u8 *pwr_constr_elem; | ||
797 | u8 *quiet_elem; /* first quite element */ | ||
794 | 798 | ||
795 | /* length of them, respectively */ | 799 | /* length of them, respectively */ |
796 | u8 ssid_len; | 800 | u8 ssid_len; |
@@ -815,6 +819,11 @@ struct ieee802_11_elems { | |||
815 | u8 preq_len; | 819 | u8 preq_len; |
816 | u8 prep_len; | 820 | u8 prep_len; |
817 | u8 perr_len; | 821 | u8 perr_len; |
822 | u8 ch_switch_elem_len; | ||
823 | u8 country_elem_len; | ||
824 | u8 pwr_constr_elem_len; | ||
825 | u8 quiet_elem_len; | ||
826 | u8 num_of_quiet_elem; /* can be more the one */ | ||
818 | }; | 827 | }; |
819 | 828 | ||
820 | static inline struct ieee80211_local *hw_to_local( | 829 | static inline struct ieee80211_local *hw_to_local( |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e06d6450f215..32453561fe32 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -204,6 +204,25 @@ void ieee802_11_parse_elems(u8 *start, size_t len, | |||
204 | elems->perr = pos; | 204 | elems->perr = pos; |
205 | elems->perr_len = elen; | 205 | elems->perr_len = elen; |
206 | break; | 206 | break; |
207 | case WLAN_EID_CHANNEL_SWITCH: | ||
208 | elems->ch_switch_elem = pos; | ||
209 | elems->ch_switch_elem_len = elen; | ||
210 | break; | ||
211 | case WLAN_EID_QUIET: | ||
212 | if (!elems->quiet_elem) { | ||
213 | elems->quiet_elem = pos; | ||
214 | elems->quiet_elem_len = elen; | ||
215 | } | ||
216 | elems->num_of_quiet_elem++; | ||
217 | break; | ||
218 | case WLAN_EID_COUNTRY: | ||
219 | elems->country_elem = pos; | ||
220 | elems->country_elem_len = elen; | ||
221 | break; | ||
222 | case WLAN_EID_PWR_CONSTRAINT: | ||
223 | elems->pwr_constr_elem = pos; | ||
224 | elems->pwr_constr_elem_len = elen; | ||
225 | break; | ||
207 | default: | 226 | default: |
208 | break; | 227 | break; |
209 | } | 228 | } |