diff options
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index a4225ae69681..a7078fdba8ca 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -320,64 +320,6 @@ mesh_add_rsn_ie(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata) | |||
320 | return 0; | 320 | return 0; |
321 | } | 321 | } |
322 | 322 | ||
323 | int | ||
324 | mesh_add_srates_ie(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata) | ||
325 | { | ||
326 | struct ieee80211_local *local = sdata->local; | ||
327 | struct ieee80211_supported_band *sband; | ||
328 | int rate; | ||
329 | u8 i, rates, *pos; | ||
330 | |||
331 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | ||
332 | rates = sband->n_bitrates; | ||
333 | if (rates > 8) | ||
334 | rates = 8; | ||
335 | |||
336 | if (skb_tailroom(skb) < rates + 2) | ||
337 | return -ENOMEM; | ||
338 | |||
339 | pos = skb_put(skb, rates + 2); | ||
340 | *pos++ = WLAN_EID_SUPP_RATES; | ||
341 | *pos++ = rates; | ||
342 | for (i = 0; i < rates; i++) { | ||
343 | rate = sband->bitrates[i].bitrate; | ||
344 | *pos++ = (u8) (rate / 5); | ||
345 | } | ||
346 | |||
347 | return 0; | ||
348 | } | ||
349 | |||
350 | int | ||
351 | mesh_add_ext_srates_ie(struct sk_buff *skb, | ||
352 | struct ieee80211_sub_if_data *sdata) | ||
353 | { | ||
354 | struct ieee80211_local *local = sdata->local; | ||
355 | struct ieee80211_supported_band *sband; | ||
356 | int rate; | ||
357 | u8 i, exrates, *pos; | ||
358 | |||
359 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | ||
360 | exrates = sband->n_bitrates; | ||
361 | if (exrates > 8) | ||
362 | exrates -= 8; | ||
363 | else | ||
364 | exrates = 0; | ||
365 | |||
366 | if (skb_tailroom(skb) < exrates + 2) | ||
367 | return -ENOMEM; | ||
368 | |||
369 | if (exrates) { | ||
370 | pos = skb_put(skb, exrates + 2); | ||
371 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | ||
372 | *pos++ = exrates; | ||
373 | for (i = 8; i < sband->n_bitrates; i++) { | ||
374 | rate = sband->bitrates[i].bitrate; | ||
375 | *pos++ = (u8) (rate / 5); | ||
376 | } | ||
377 | } | ||
378 | return 0; | ||
379 | } | ||
380 | |||
381 | int mesh_add_ds_params_ie(struct sk_buff *skb, | 323 | int mesh_add_ds_params_ie(struct sk_buff *skb, |
382 | struct ieee80211_sub_if_data *sdata) | 324 | struct ieee80211_sub_if_data *sdata) |
383 | { | 325 | { |