mesh_plink.c (e7d9facf0bab6d919342fea17c8cc0f65f8a0fe9) | mesh_plink.c (55de908ab292c03f1eb280f51170ddb9c6b57e31) |
---|---|
1/* 2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Author: Luis Carlos Cobo <luisca@cozybit.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 */ --- 238 unchanged lines hidden (view full) --- 247 IEEE80211_STYPE_ACTION); 248 memcpy(mgmt->da, da, ETH_ALEN); 249 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 250 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); 251 mgmt->u.action.category = WLAN_CATEGORY_SELF_PROTECTED; 252 mgmt->u.action.u.self_prot.action_code = action; 253 254 if (action != WLAN_SP_MESH_PEERING_CLOSE) { | 1/* 2 * Copyright (c) 2008, 2009 open80211s Ltd. 3 * Author: Luis Carlos Cobo <luisca@cozybit.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 */ --- 238 unchanged lines hidden (view full) --- 247 IEEE80211_STYPE_ACTION); 248 memcpy(mgmt->da, da, ETH_ALEN); 249 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 250 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); 251 mgmt->u.action.category = WLAN_CATEGORY_SELF_PROTECTED; 252 mgmt->u.action.u.self_prot.action_code = action; 253 254 if (action != WLAN_SP_MESH_PEERING_CLOSE) { |
255 enum ieee80211_band band = ieee80211_get_sdata_band(sdata); 256 |
|
255 /* capability info */ 256 pos = skb_put(skb, 2); 257 memset(pos, 0, 2); 258 if (action == WLAN_SP_MESH_PEERING_CONFIRM) { 259 /* AID */ 260 pos = skb_put(skb, 2); 261 memcpy(pos + 2, &plid, 2); 262 } | 257 /* capability info */ 258 pos = skb_put(skb, 2); 259 memset(pos, 0, 2); 260 if (action == WLAN_SP_MESH_PEERING_CONFIRM) { 261 /* AID */ 262 pos = skb_put(skb, 2); 263 memcpy(pos + 2, &plid, 2); 264 } |
263 if (ieee80211_add_srates_ie(sdata, skb, true, 264 local->oper_channel->band) || 265 ieee80211_add_ext_srates_ie(sdata, skb, true, 266 local->oper_channel->band) || | 265 if (ieee80211_add_srates_ie(sdata, skb, true, band) || 266 ieee80211_add_ext_srates_ie(sdata, skb, true, band) || |
267 mesh_add_rsn_ie(skb, sdata) || 268 mesh_add_meshid_ie(skb, sdata) || 269 mesh_add_meshconf_ie(skb, sdata)) 270 goto free; 271 } else { /* WLAN_SP_MESH_PEERING_CLOSE */ 272 info->flags |= IEEE80211_TX_CTL_NO_ACK; 273 if (mesh_add_meshid_ie(skb, sdata)) 274 goto free; --- 63 unchanged lines hidden (view full) --- 338 * 339 * call under RCU 340 */ 341static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata, 342 u8 *addr, 343 struct ieee802_11_elems *elems) 344{ 345 struct ieee80211_local *local = sdata->local; | 267 mesh_add_rsn_ie(skb, sdata) || 268 mesh_add_meshid_ie(skb, sdata) || 269 mesh_add_meshconf_ie(skb, sdata)) 270 goto free; 271 } else { /* WLAN_SP_MESH_PEERING_CLOSE */ 272 info->flags |= IEEE80211_TX_CTL_NO_ACK; 273 if (mesh_add_meshid_ie(skb, sdata)) 274 goto free; --- 63 unchanged lines hidden (view full) --- 338 * 339 * call under RCU 340 */ 341static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata, 342 u8 *addr, 343 struct ieee802_11_elems *elems) 344{ 345 struct ieee80211_local *local = sdata->local; |
346 enum ieee80211_band band = local->oper_channel->band; | 346 enum ieee80211_band band = ieee80211_get_sdata_band(sdata); |
347 struct ieee80211_supported_band *sband; 348 u32 rates, basic_rates = 0; 349 struct sta_info *sta; 350 bool insert = false; 351 352 sband = local->hw.wiphy->bands[band]; 353 rates = ieee80211_sta_get_rates(local, elems, band, &basic_rates); 354 --- 624 unchanged lines hidden --- | 347 struct ieee80211_supported_band *sband; 348 u32 rates, basic_rates = 0; 349 struct sta_info *sta; 350 bool insert = false; 351 352 sband = local->hw.wiphy->bands[band]; 353 rates = ieee80211_sta_get_rates(local, elems, band, &basic_rates); 354 --- 624 unchanged lines hidden --- |