aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
authorLuis Carlos Cobo <luisca@cozybit.com>2008-02-23 09:17:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 15:30:41 -0500
commitee3858551ae6d044578f598f8001db5f1a9fd52e (patch)
tree5a9b61aecccb65210e29850c34801f3cfe6259a9 /net/mac80211/ieee80211_sta.c
parent33b64eb2b1b1759cbdafbe5c59df652f1e7c746e (diff)
mac80211: mesh data structures and first mesh changes
Includes integration in struct sta_info of mesh peer link elements, previously on their own mesh peer link table. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c70
1 files changed, 28 insertions, 42 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index ddb5832f37c..b4b498ae60f 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -87,46 +87,8 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
87 struct ieee80211_if_sta *ifsta); 87 struct ieee80211_if_sta *ifsta);
88 88
89 89
90/* Parsed Information Elements */ 90void ieee802_11_parse_elems(u8 *start, size_t len,
91struct ieee802_11_elems { 91 struct ieee802_11_elems *elems)
92 /* pointers to IEs */
93 u8 *ssid;
94 u8 *supp_rates;
95 u8 *fh_params;
96 u8 *ds_params;
97 u8 *cf_params;
98 u8 *tim;
99 u8 *ibss_params;
100 u8 *challenge;
101 u8 *wpa;
102 u8 *rsn;
103 u8 *erp_info;
104 u8 *ext_supp_rates;
105 u8 *wmm_info;
106 u8 *wmm_param;
107 u8 *ht_cap_elem;
108 u8 *ht_info_elem;
109 /* length of them, respectively */
110 u8 ssid_len;
111 u8 supp_rates_len;
112 u8 fh_params_len;
113 u8 ds_params_len;
114 u8 cf_params_len;
115 u8 tim_len;
116 u8 ibss_params_len;
117 u8 challenge_len;
118 u8 wpa_len;
119 u8 rsn_len;
120 u8 erp_info_len;
121 u8 ext_supp_rates_len;
122 u8 wmm_info_len;
123 u8 wmm_param_len;
124 u8 ht_cap_elem_len;
125 u8 ht_info_elem_len;
126};
127
128static void ieee802_11_parse_elems(u8 *start, size_t len,
129 struct ieee802_11_elems *elems)
130{ 92{
131 size_t left = len; 93 size_t left = len;
132 u8 *pos = start; 94 u8 *pos = start;
@@ -215,6 +177,30 @@ static void ieee802_11_parse_elems(u8 *start, size_t len,
215 elems->ht_info_elem = pos; 177 elems->ht_info_elem = pos;
216 elems->ht_info_elem_len = elen; 178 elems->ht_info_elem_len = elen;
217 break; 179 break;
180 case WLAN_EID_MESH_ID:
181 elems->mesh_id = pos;
182 elems->mesh_id_len = elen;
183 break;
184 case WLAN_EID_MESH_CONFIG:
185 elems->mesh_config = pos;
186 elems->mesh_config_len = elen;
187 break;
188 case WLAN_EID_PEER_LINK:
189 elems->peer_link = pos;
190 elems->peer_link_len = elen;
191 break;
192 case WLAN_EID_PREQ:
193 elems->preq = pos;
194 elems->preq_len = elen;
195 break;
196 case WLAN_EID_PREP:
197 elems->prep = pos;
198 elems->prep_len = elen;
199 break;
200 case WLAN_EID_PERR:
201 elems->perr = pos;
202 elems->perr_len = elen;
203 break;
218 default: 204 default:
219 break; 205 break;
220 } 206 }
@@ -501,8 +487,8 @@ static void ieee80211_set_disassoc(struct net_device *dev,
501 ieee80211_set_associated(dev, ifsta, 0); 487 ieee80211_set_associated(dev, ifsta, 0);
502} 488}
503 489
504static void ieee80211_sta_tx(struct net_device *dev, struct sk_buff *skb, 490void ieee80211_sta_tx(struct net_device *dev, struct sk_buff *skb,
505 int encrypt) 491 int encrypt)
506{ 492{
507 struct ieee80211_sub_if_data *sdata; 493 struct ieee80211_sub_if_data *sdata;
508 struct ieee80211_tx_packet_data *pkt_data; 494 struct ieee80211_tx_packet_data *pkt_data;