Skip to content

Commit 32034e0

Browse files
committed
Merge tag 'mac80211-for-davem-2015-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== A few patches have accumulated, among them the fix for Linus's four-way-handshake problem. The others are various small fixes for problems all over, nothing really stands out. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 06615be + 9c1c98a commit 32034e0

7 files changed

Lines changed: 18 additions & 10 deletions

File tree

‎drivers/net/wireless/mac80211_hwsim.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,8 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
946946
goto nla_put_failure;
947947

948948
genlmsg_end(skb, msg_head);
949-
genlmsg_unicast(&init_net, skb, dst_portid);
949+
if (genlmsg_unicast(&init_net, skb, dst_portid))
950+
goto err_free_txskb;
950951

951952
/* Enqueue the packet */
952953
skb_queue_tail(&data->pending, my_skb);
@@ -955,6 +956,8 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
955956
return;
956957

957958
nla_put_failure:
959+
nlmsg_free(skb);
960+
err_free_txskb:
958961
printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
959962
ieee80211_free_txskb(hw, my_skb);
960963
data->tx_failed++;

‎net/mac80211/chan.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,8 @@ static void __ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata)
15081508
if (ieee80211_chanctx_refcount(local, ctx) == 0)
15091509
ieee80211_free_chanctx(local, ctx);
15101510

1511+
sdata->radar_required = false;
1512+
15111513
/* Unreserving may ready an in-place reservation. */
15121514
if (use_reserved_switch)
15131515
ieee80211_vif_use_reserved_switch(local);
@@ -1566,6 +1568,9 @@ int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
15661568
ieee80211_recalc_smps_chanctx(local, ctx);
15671569
ieee80211_recalc_radar_chanctx(local, ctx);
15681570
out:
1571+
if (ret)
1572+
sdata->radar_required = false;
1573+
15691574
mutex_unlock(&local->chanctx_mtx);
15701575
return ret;
15711576
}

‎net/mac80211/rc80211_minstrel.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
373373
rate++;
374374
mi->sample_deferred++;
375375
} else {
376-
if (!msr->sample_limit != 0)
376+
if (!msr->sample_limit)
377377
return;
378378

379379
mi->sample_packets++;

‎net/mac80211/tx.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx)
566566
if (tx->sdata->control_port_no_encrypt)
567567
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
568568
info->control.flags |= IEEE80211_TX_CTRL_PORT_CTRL_PROTO;
569+
info->flags |= IEEE80211_TX_CTL_USE_MINRATE;
569570
}
570571

571572
return TX_CONTINUE;

‎net/wireless/core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,7 @@ static int __init cfg80211_init(void)
11991199
regulatory_exit();
12001200
out_fail_reg:
12011201
debugfs_remove(ieee80211_debugfs_dir);
1202+
nl80211_exit();
12021203
out_fail_nl80211:
12031204
unregister_netdevice_notifier(&cfg80211_netdev_notifier);
12041205
out_fail_notifier:

‎net/wireless/nl80211.c‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2654,10 +2654,6 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
26542654
return err;
26552655
}
26562656

2657-
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
2658-
if (!msg)
2659-
return -ENOMEM;
2660-
26612657
err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ?
26622658
info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL,
26632659
&flags);
@@ -2666,6 +2662,10 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
26662662
!(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR))
26672663
return -EOPNOTSUPP;
26682664

2665+
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
2666+
if (!msg)
2667+
return -ENOMEM;
2668+
26692669
wdev = rdev_add_virtual_intf(rdev,
26702670
nla_data(info->attrs[NL80211_ATTR_IFNAME]),
26712671
type, err ? NULL : &flags, &params);
@@ -12528,9 +12528,7 @@ static int cfg80211_net_detect_results(struct sk_buff *msg,
1252812528
}
1252912529

1253012530
for (j = 0; j < match->n_channels; j++) {
12531-
if (nla_put_u32(msg,
12532-
NL80211_ATTR_WIPHY_FREQ,
12533-
match->channels[j])) {
12531+
if (nla_put_u32(msg, j, match->channels[j])) {
1253412532
nla_nest_cancel(msg, nl_freqs);
1253512533
nla_nest_cancel(msg, nl_match);
1253612534
goto out;

‎net/wireless/reg.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static DECLARE_DELAYED_WORK(reg_timeout, reg_timeout_work);
228228

229229
/* We keep a static world regulatory domain in case of the absence of CRDA */
230230
static const struct ieee80211_regdomain world_regdom = {
231-
.n_reg_rules = 6,
231+
.n_reg_rules = 8,
232232
.alpha2 = "00",
233233
.reg_rules = {
234234
/* IEEE 802.11b/g, channels 1..11 */

0 commit comments

Comments
 (0)