aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-10-29 16:05:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-29 16:05:51 -0400
commitab3d59d265e772e734c36fe738809cb1a910f566 (patch)
treeb6d29908d3d45b078d025341b1cc272ba4c0a6d0 /net/wireless
parent42d36074e53eadfd79e6db518b5caf8fba914f8b (diff)
parent8c6e30936a7893a85f6222084f0f26aceb81137a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/mwifiex/cfg80211.c
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/core.c3
-rw-r--r--net/wireless/reg.c5
-rw-r--r--net/wireless/util.c14
3 files changed, 12 insertions, 10 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index ce1ad776dfb5..26711f46a3be 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -529,8 +529,7 @@ int wiphy_register(struct wiphy *wiphy)
529 for (i = 0; i < sband->n_channels; i++) { 529 for (i = 0; i < sband->n_channels; i++) {
530 sband->channels[i].orig_flags = 530 sband->channels[i].orig_flags =
531 sband->channels[i].flags; 531 sband->channels[i].flags;
532 sband->channels[i].orig_mag = 532 sband->channels[i].orig_mag = INT_MAX;
533 sband->channels[i].max_antenna_gain;
534 sband->channels[i].orig_mpwr = 533 sband->channels[i].orig_mpwr =
535 sband->channels[i].max_power; 534 sband->channels[i].max_power;
536 sband->channels[i].band = band; 535 sband->channels[i].band = band;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 3b8cbbc214db..bcc7d7ee5a51 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -908,7 +908,7 @@ static void handle_channel(struct wiphy *wiphy,
908 map_regdom_flags(reg_rule->flags) | bw_flags; 908 map_regdom_flags(reg_rule->flags) | bw_flags;
909 chan->max_antenna_gain = chan->orig_mag = 909 chan->max_antenna_gain = chan->orig_mag =
910 (int) MBI_TO_DBI(power_rule->max_antenna_gain); 910 (int) MBI_TO_DBI(power_rule->max_antenna_gain);
911 chan->max_power = chan->orig_mpwr = 911 chan->max_reg_power = chan->max_power = chan->orig_mpwr =
912 (int) MBM_TO_DBM(power_rule->max_eirp); 912 (int) MBM_TO_DBM(power_rule->max_eirp);
913 return; 913 return;
914 } 914 }
@@ -1331,7 +1331,8 @@ static void handle_channel_custom(struct wiphy *wiphy,
1331 1331
1332 chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; 1332 chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
1333 chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); 1333 chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
1334 chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp); 1334 chan->max_reg_power = chan->max_power =
1335 (int) MBM_TO_DBM(power_rule->max_eirp);
1335} 1336}
1336 1337
1337static void handle_band_custom(struct wiphy *wiphy, enum ieee80211_band band, 1338static void handle_band_custom(struct wiphy *wiphy, enum ieee80211_band band,
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 343f13c1d31d..5b6c1df72f31 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -311,23 +311,21 @@ unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb)
311} 311}
312EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); 312EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb);
313 313
314static int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) 314unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
315{ 315{
316 int ae = meshhdr->flags & MESH_FLAGS_AE; 316 int ae = meshhdr->flags & MESH_FLAGS_AE;
317 /* 7.1.3.5a.2 */ 317 /* 802.11-2012, 8.2.4.7.3 */
318 switch (ae) { 318 switch (ae) {
319 default:
319 case 0: 320 case 0:
320 return 6; 321 return 6;
321 case MESH_FLAGS_AE_A4: 322 case MESH_FLAGS_AE_A4:
322 return 12; 323 return 12;
323 case MESH_FLAGS_AE_A5_A6: 324 case MESH_FLAGS_AE_A5_A6:
324 return 18; 325 return 18;
325 case (MESH_FLAGS_AE_A4 | MESH_FLAGS_AE_A5_A6):
326 return 24;
327 default:
328 return 6;
329 } 326 }
330} 327}
328EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);
331 329
332int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, 330int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
333 enum nl80211_iftype iftype) 331 enum nl80211_iftype iftype)
@@ -375,6 +373,8 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
375 /* make sure meshdr->flags is on the linear part */ 373 /* make sure meshdr->flags is on the linear part */
376 if (!pskb_may_pull(skb, hdrlen + 1)) 374 if (!pskb_may_pull(skb, hdrlen + 1))
377 return -1; 375 return -1;
376 if (meshdr->flags & MESH_FLAGS_AE_A4)
377 return -1;
378 if (meshdr->flags & MESH_FLAGS_AE_A5_A6) { 378 if (meshdr->flags & MESH_FLAGS_AE_A5_A6) {
379 skb_copy_bits(skb, hdrlen + 379 skb_copy_bits(skb, hdrlen +
380 offsetof(struct ieee80211s_hdr, eaddr1), 380 offsetof(struct ieee80211s_hdr, eaddr1),
@@ -399,6 +399,8 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
399 /* make sure meshdr->flags is on the linear part */ 399 /* make sure meshdr->flags is on the linear part */
400 if (!pskb_may_pull(skb, hdrlen + 1)) 400 if (!pskb_may_pull(skb, hdrlen + 1))
401 return -1; 401 return -1;
402 if (meshdr->flags & MESH_FLAGS_AE_A5_A6)
403 return -1;
402 if (meshdr->flags & MESH_FLAGS_AE_A4) 404 if (meshdr->flags & MESH_FLAGS_AE_A4)
403 skb_copy_bits(skb, hdrlen + 405 skb_copy_bits(skb, hdrlen +
404 offsetof(struct ieee80211s_hdr, eaddr1), 406 offsetof(struct ieee80211s_hdr, eaddr1),