mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
First set of fixes for the current cycle:
* fix 80+80 bandwidth warning * fix powersave with mac80211 TXQ implementation * use correct way to free SKBs from multicast buffering * mesh: fix operation ordering to work with all drivers * mesh: end service period even when peer goes away * mesh: correct HT opmode validity checks * pass hw pointer from mac80211 to driver in TPT method, fixing a bug (in a bit the wrong way, but that's what we have right now) -----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJXpIcJAAoJEGt7eEactAAdSFUP/0zeMBnYsxm0UYFPKOYf7+rF P9s88XRpYNiTQqA5YgkaoiSaORMrdj9AeSTIDJ1MDOHVJSQ3jBbmmWUlM7h+VNQw P6YQp4xw+yxQeB2Lobb0E/7lxpG5nRKFtbPMkDasSJv+0fzGTqm68Cpjs7IMjfOw +I7ZjWZzClZdpTS4avyziEbpxAdSvJqf9SczLeDw7BjbufsSWKNT8yBPeTNa0Mfz IVzKh84eEyHBWQqWhqNclA4QMqQPoTQQ1YYqG1lmc8Jiq7/9y5pImedlNyHkiwgY t4vh7tFEL1HtWKiq9nbO7fSFkZqJHVyNSpdrQSxsx3FFYkcoOEZu0GbeWQhwXr/s a1l91GgNoH4Sv9xn3YRVPT+1RygzzGR6MUuNiU9DTSdohg+BBscSSBXm7op39H+Z z+X7z6a1mQAujfCbW1mNJ2Ajymr2RfEAXHRTUo/8/4Y86+wIbTe1vk0jqgkHOIV2 9Z1Nt/83iP12ON5s1Tnh1H619Pv+UXxujMV3plWPeaPTxG3F34Xnpsnw2AE1cAZ5 Mu0sMMfh9w2rPo5miPyMpU7dJo2mY95qC/+aosZlbeAMyEPqRtSE3sHLzEkUyuJI 5VskVEIBYukIahsRN9Qd9FldQNwcZuqFpo43qkDYkE67Q3/oNokAlMb9SWv/V6D4 FQmZbX1DcL+iYlAx8rN7 =4hWm -----END PGP SIGNATURE----- Merge tag 'mac80211-for-davem-2016-08-05' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== First set of fixes for the current cycle: * fix 80+80 bandwidth warning * fix powersave with mac80211 TXQ implementation * use correct way to free SKBs from multicast buffering * mesh: fix operation ordering to work with all drivers * mesh: end service period even when peer goes away * mesh: correct HT opmode validity checks * pass hw pointer from mac80211 to driver in TPT method, fixing a bug (in a bit the wrong way, but that's what we have right now) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
ca25ebe550
10 changed files with 56 additions and 23 deletions
|
@ -5700,10 +5700,11 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
|||
mutex_unlock(&wl->mutex);
|
||||
}
|
||||
|
||||
static u32 wlcore_op_get_expected_throughput(struct ieee80211_sta *sta)
|
||||
static u32 wlcore_op_get_expected_throughput(struct ieee80211_hw *hw,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
struct wl1271_station *wl_sta = (struct wl1271_station *)sta->drv_priv;
|
||||
struct wl1271 *wl = wl_sta->wl;
|
||||
struct wl1271 *wl = hw->priv;
|
||||
u8 hlid = wl_sta->hlid;
|
||||
|
||||
/* return in units of Kbps */
|
||||
|
|
|
@ -3620,7 +3620,8 @@ struct ieee80211_ops {
|
|||
|
||||
int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
|
||||
void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
|
||||
u32 (*get_expected_throughput)(struct ieee80211_sta *sta);
|
||||
u32 (*get_expected_throughput)(struct ieee80211_hw *hw,
|
||||
struct ieee80211_sta *sta);
|
||||
int (*get_txpower)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
int *dbm);
|
||||
|
||||
|
|
|
@ -869,7 +869,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
|
|||
|
||||
/* free all potentially still buffered bcast frames */
|
||||
local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf);
|
||||
skb_queue_purge(&sdata->u.ap.ps.bc_buf);
|
||||
ieee80211_purge_tx_queue(&local->hw, &sdata->u.ap.ps.bc_buf);
|
||||
|
||||
mutex_lock(&local->mtx);
|
||||
ieee80211_vif_copy_chanctx_to_vlans(sdata, true);
|
||||
|
|
|
@ -1094,7 +1094,7 @@ static inline u32 drv_get_expected_throughput(struct ieee80211_local *local,
|
|||
|
||||
trace_drv_get_expected_throughput(sta);
|
||||
if (local->ops->get_expected_throughput)
|
||||
ret = local->ops->get_expected_throughput(sta);
|
||||
ret = local->ops->get_expected_throughput(&local->hw, sta);
|
||||
trace_drv_return_u32(local, ret);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -881,20 +881,22 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
|
|||
|
||||
netif_carrier_off(sdata->dev);
|
||||
|
||||
/* flush STAs and mpaths on this iface */
|
||||
sta_info_flush(sdata);
|
||||
mesh_path_flush_by_iface(sdata);
|
||||
|
||||
/* stop the beacon */
|
||||
ifmsh->mesh_id_len = 0;
|
||||
sdata->vif.bss_conf.enable_beacon = false;
|
||||
clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
|
||||
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
|
||||
|
||||
/* remove beacon */
|
||||
bcn = rcu_dereference_protected(ifmsh->beacon,
|
||||
lockdep_is_held(&sdata->wdev.mtx));
|
||||
RCU_INIT_POINTER(ifmsh->beacon, NULL);
|
||||
kfree_rcu(bcn, rcu_head);
|
||||
|
||||
/* flush STAs and mpaths on this iface */
|
||||
sta_info_flush(sdata);
|
||||
mesh_path_flush_by_iface(sdata);
|
||||
|
||||
/* free all potentially still buffered group-addressed frames */
|
||||
local->total_ps_buffered -= skb_queue_len(&ifmsh->ps.bc_buf);
|
||||
skb_queue_purge(&ifmsh->ps.bc_buf);
|
||||
|
|
|
@ -1268,7 +1268,7 @@ static void sta_ps_start(struct sta_info *sta)
|
|||
for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
|
||||
struct txq_info *txqi = to_txq_info(sta->sta.txq[tid]);
|
||||
|
||||
if (!txqi->tin.backlog_packets)
|
||||
if (txqi->tin.backlog_packets)
|
||||
set_bit(tid, &sta->txq_buffered_tids);
|
||||
else
|
||||
clear_bit(tid, &sta->txq_buffered_tids);
|
||||
|
|
|
@ -771,6 +771,13 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
|
|||
clear_sta_flag(sta, WLAN_STA_SP);
|
||||
|
||||
acked = !!(info->flags & IEEE80211_TX_STAT_ACK);
|
||||
|
||||
/* mesh Peer Service Period support */
|
||||
if (ieee80211_vif_is_mesh(&sta->sdata->vif) &&
|
||||
ieee80211_is_data_qos(fc))
|
||||
ieee80211_mpsp_trigger_process(
|
||||
ieee80211_get_qos_ctl(hdr), sta, true, acked);
|
||||
|
||||
if (!acked && test_sta_flag(sta, WLAN_STA_PS_STA)) {
|
||||
/*
|
||||
* The STA is in power save mode, so assume
|
||||
|
@ -781,13 +788,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
|
|||
return;
|
||||
}
|
||||
|
||||
/* mesh Peer Service Period support */
|
||||
if (ieee80211_vif_is_mesh(&sta->sdata->vif) &&
|
||||
ieee80211_is_data_qos(fc))
|
||||
ieee80211_mpsp_trigger_process(
|
||||
ieee80211_get_qos_ctl(hdr),
|
||||
sta, true, acked);
|
||||
|
||||
if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL) &&
|
||||
(ieee80211_is_data(hdr->frame_control)) &&
|
||||
(rates_idx != -1))
|
||||
|
|
|
@ -368,7 +368,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local)
|
|||
skb = skb_dequeue(&ps->bc_buf);
|
||||
if (skb) {
|
||||
purged++;
|
||||
dev_kfree_skb(skb);
|
||||
ieee80211_free_txskb(&local->hw, skb);
|
||||
}
|
||||
total += skb_queue_len(&ps->bc_buf);
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
|
|||
if (skb_queue_len(&ps->bc_buf) >= AP_MAX_BC_BUFFER) {
|
||||
ps_dbg(tx->sdata,
|
||||
"BC TX buffer full - dropping the oldest frame\n");
|
||||
dev_kfree_skb(skb_dequeue(&ps->bc_buf));
|
||||
ieee80211_free_txskb(&tx->local->hw, skb_dequeue(&ps->bc_buf));
|
||||
} else
|
||||
tx->local->total_ps_buffered++;
|
||||
|
||||
|
@ -4275,7 +4275,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
|
|||
sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
|
||||
if (!ieee80211_tx_prepare(sdata, &tx, NULL, skb))
|
||||
break;
|
||||
dev_kfree_skb_any(skb);
|
||||
ieee80211_free_txskb(hw, skb);
|
||||
}
|
||||
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
|
|
|
@ -513,6 +513,7 @@ static bool cfg80211_chandef_dfs_available(struct wiphy *wiphy,
|
|||
r = cfg80211_get_chans_dfs_available(wiphy,
|
||||
chandef->center_freq2,
|
||||
width);
|
||||
break;
|
||||
default:
|
||||
WARN_ON(chandef->center_freq2);
|
||||
break;
|
||||
|
|
|
@ -5380,6 +5380,7 @@ static int nl80211_parse_mesh_config(struct genl_info *info,
|
|||
{
|
||||
struct nlattr *tb[NL80211_MESHCONF_ATTR_MAX + 1];
|
||||
u32 mask = 0;
|
||||
u16 ht_opmode;
|
||||
|
||||
#define FILL_IN_MESH_PARAM_IF_SET(tb, cfg, param, min, max, mask, attr, fn) \
|
||||
do { \
|
||||
|
@ -5471,9 +5472,36 @@ do { \
|
|||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, -255, 0,
|
||||
mask, NL80211_MESHCONF_RSSI_THRESHOLD,
|
||||
nl80211_check_s32);
|
||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, 0, 16,
|
||||
mask, NL80211_MESHCONF_HT_OPMODE,
|
||||
nl80211_check_u16);
|
||||
/*
|
||||
* Check HT operation mode based on
|
||||
* IEEE 802.11 2012 8.4.2.59 HT Operation element.
|
||||
*/
|
||||
if (tb[NL80211_MESHCONF_HT_OPMODE]) {
|
||||
ht_opmode = nla_get_u16(tb[NL80211_MESHCONF_HT_OPMODE]);
|
||||
|
||||
if (ht_opmode & ~(IEEE80211_HT_OP_MODE_PROTECTION |
|
||||
IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT |
|
||||
IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT))
|
||||
return -EINVAL;
|
||||
|
||||
if ((ht_opmode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) &&
|
||||
(ht_opmode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT))
|
||||
return -EINVAL;
|
||||
|
||||
switch (ht_opmode & IEEE80211_HT_OP_MODE_PROTECTION) {
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_NONE:
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_20MHZ:
|
||||
if (ht_opmode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER:
|
||||
case IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED:
|
||||
if (!(ht_opmode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT))
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
cfg->ht_opmode = ht_opmode;
|
||||
}
|
||||
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathToRootTimeout,
|
||||
1, 65535, mask,
|
||||
NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
|
||||
|
|
Loading…
Reference in a new issue