Commit ab01f251 authored by David S. Miller's avatar David S. Miller

Merge tag 'mac80211-for-davem-2019-02-22' of...

Merge tag 'mac80211-for-davem-2019-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
Three more fixes:
 * mac80211 mesh code wasn't allocating SKB tailroom properly
   in some cases
 * tx_sk_pacing_shift should be 7 for better performance
 * mac80211_hwsim wasn't propagating genlmsg_reply() errors
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 80d79ad2 51d0af22
...@@ -3554,7 +3554,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info) ...@@ -3554,7 +3554,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info)
goto out_err; goto out_err;
} }
genlmsg_reply(skb, info); res = genlmsg_reply(skb, info);
break; break;
} }
......
...@@ -615,13 +615,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, ...@@ -615,13 +615,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
* We need a bit of data queued to build aggregates properly, so * We need a bit of data queued to build aggregates properly, so
* instruct the TCP stack to allow more than a single ms of data * instruct the TCP stack to allow more than a single ms of data
* to be queued in the stack. The value is a bit-shift of 1 * to be queued in the stack. The value is a bit-shift of 1
* second, so 8 is ~4ms of queued data. Only affects local TCP * second, so 7 is ~8ms of queued data. Only affects local TCP
* sockets. * sockets.
* This is the default, anyhow - drivers may need to override it * This is the default, anyhow - drivers may need to override it
* for local reasons (longer buffers, longer completion time, or * for local reasons (longer buffers, longer completion time, or
* similar). * similar).
*/ */
local->hw.tx_sk_pacing_shift = 8; local->hw.tx_sk_pacing_shift = 7;
/* set up some defaults */ /* set up some defaults */
local->hw.queues = 1; local->hw.queues = 1;
......
...@@ -2644,6 +2644,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) ...@@ -2644,6 +2644,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
struct ieee80211_sub_if_data *sdata = rx->sdata; struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
u16 ac, q, hdrlen; u16 ac, q, hdrlen;
int tailroom = 0;
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) skb->data;
hdrlen = ieee80211_hdrlen(hdr->frame_control); hdrlen = ieee80211_hdrlen(hdr->frame_control);
...@@ -2732,8 +2733,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) ...@@ -2732,8 +2733,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
if (!ifmsh->mshcfg.dot11MeshForwarding) if (!ifmsh->mshcfg.dot11MeshForwarding)
goto out; goto out;
if (sdata->crypto_tx_tailroom_needed_cnt)
tailroom = IEEE80211_ENCRYPT_TAILROOM;
fwd_skb = skb_copy_expand(skb, local->tx_headroom + fwd_skb = skb_copy_expand(skb, local->tx_headroom +
sdata->encrypt_headroom, 0, GFP_ATOMIC); sdata->encrypt_headroom,
tailroom, GFP_ATOMIC);
if (!fwd_skb) if (!fwd_skb)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment