Three fixes:
* avoid a WARN_ON() when trying to use WEP with AP_VLANs * ensure enough headroom on mesh forwarding packets * don't report unknown/invalid rates to userspace -----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJYU+BMAAoJEGt7eEactAAdtnkP/1/Rftp3Ll2m+EqJn1yNUCiQ K/XC5xT1khSavb/+Tdv4W8Fy40y008Ljrn5a4erB1g0YhXQXbtp43hxmHrWa9Q8q pDngQspUUI14hX9JBaWsvMnvXNjy5KK2DsEHxdmjEYy8+eSzqwefc0VqBFvQoEhT X3WWTm4rgn2dtI9QhfSKp4eyStNRjavqAtUhPI1TqCYZRyLrICQ2nQ6yrTjbEN9Z Wtwgo3VUTv30MuSuijklgi7mXnY+yjj35qBYMqlnKtArSrMIVRExwN9LybWOVCOx k9o+aDJCNX21V1l2TC5IlRksQBbjhjcMP71v/SFTYJlmph8eS4ZtrApoZyr0v5TD 1IBfgyHDl4jcsFi1v+PtgpGhh0OV+KHeh1k2lK2YTq2UfPdiuevv1OhAp3H0ZyPj ZpSEKpdKqOV/R8G3g6K0YTnf/Jvd5F6aVZcrgeQGNUD8QNDavUrdcfl1sqwCMrl6 LVZmVh8bYPKEqGzpsG8Xa//4eu6Xbgz9ny49CXwLcpVnUbhOXZLawGoYd4g9Tb0/ j3HbM5KNNCp5U9EY9jQ22ih2xgt3ntiBkZUNPUczroqZ1U1v/rdusOb7oiF520jo iWQeE2+XUYHIAokVE4iMP2SS55LI1BkDr5cGtysw5PSneVzpnLSMi3qIa2nZV1jA Z6w0fDb5gvYVpt0viXQE =QHRs -----END PGP SIGNATURE----- Merge tag 'mac80211-for-davem-2016-12-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Three fixes: * avoid a WARN_ON() when trying to use WEP with AP_VLANs * ensure enough headroom on mesh forwarding packets * don't report unknown/invalid rates to userspace ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Коммит
67a72a5891
|
@ -265,7 +265,8 @@ static void __ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata,
|
|||
if (uni) {
|
||||
rcu_assign_pointer(sdata->default_unicast_key, key);
|
||||
ieee80211_check_fast_xmit_iface(sdata);
|
||||
drv_set_default_unicast_key(sdata->local, sdata, idx);
|
||||
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
|
||||
drv_set_default_unicast_key(sdata->local, sdata, idx);
|
||||
}
|
||||
|
||||
if (multi)
|
||||
|
|
|
@ -2472,7 +2472,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
|||
if (!ifmsh->mshcfg.dot11MeshForwarding)
|
||||
goto out;
|
||||
|
||||
fwd_skb = skb_copy(skb, GFP_ATOMIC);
|
||||
fwd_skb = skb_copy_expand(skb, local->tx_headroom, 0, GFP_ATOMIC);
|
||||
if (!fwd_skb) {
|
||||
net_info_ratelimited("%s: failed to clone mesh frame\n",
|
||||
sdata->name);
|
||||
|
|
|
@ -1972,6 +1972,7 @@ static void sta_stats_decode_rate(struct ieee80211_local *local, u16 rate,
|
|||
u16 brate;
|
||||
unsigned int shift;
|
||||
|
||||
rinfo->flags = 0;
|
||||
sband = local->hw.wiphy->bands[(rate >> 4) & 0xf];
|
||||
brate = sband->bitrates[rate & 0xf].bitrate;
|
||||
if (rinfo->bw == RATE_INFO_BW_5)
|
||||
|
@ -1987,14 +1988,15 @@ static void sta_stats_decode_rate(struct ieee80211_local *local, u16 rate,
|
|||
rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
}
|
||||
|
||||
static void sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
|
||||
static int sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
|
||||
{
|
||||
u16 rate = ACCESS_ONCE(sta_get_last_rx_stats(sta)->last_rate);
|
||||
|
||||
if (rate == STA_STATS_RATE_INVALID)
|
||||
rinfo->flags = 0;
|
||||
else
|
||||
sta_stats_decode_rate(sta->local, rate, rinfo);
|
||||
return -EINVAL;
|
||||
|
||||
sta_stats_decode_rate(sta->local, rate, rinfo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sta_set_tidstats(struct sta_info *sta,
|
||||
|
@ -2199,8 +2201,8 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
|
|||
}
|
||||
|
||||
if (!(sinfo->filled & BIT(NL80211_STA_INFO_RX_BITRATE))) {
|
||||
sta_set_rate_info_rx(sta, &sinfo->rxrate);
|
||||
sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE);
|
||||
if (sta_set_rate_info_rx(sta, &sinfo->rxrate) == 0)
|
||||
sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE);
|
||||
}
|
||||
|
||||
sinfo->filled |= BIT(NL80211_STA_INFO_TID_STATS);
|
||||
|
|
Загрузка…
Ссылка в новой задаче