Skip to content

Commit ab01f25

Browse files
committed
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: David S. Miller <davem@davemloft.net>
2 parents 80d79ad + 51d0af2 commit ab01f25

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3554,7 +3554,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info)
35543554
goto out_err;
35553555
}
35563556

3557-
genlmsg_reply(skb, info);
3557+
res = genlmsg_reply(skb, info);
35583558
break;
35593559
}
35603560

net/mac80211/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,13 +615,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
615615
* We need a bit of data queued to build aggregates properly, so
616616
* instruct the TCP stack to allow more than a single ms of data
617617
* to be queued in the stack. The value is a bit-shift of 1
618-
* second, so 8 is ~4ms of queued data. Only affects local TCP
618+
* second, so 7 is ~8ms of queued data. Only affects local TCP
619619
* sockets.
620620
* This is the default, anyhow - drivers may need to override it
621621
* for local reasons (longer buffers, longer completion time, or
622622
* similar).
623623
*/
624-
local->hw.tx_sk_pacing_shift = 8;
624+
local->hw.tx_sk_pacing_shift = 7;
625625

626626
/* set up some defaults */
627627
local->hw.queues = 1;

net/mac80211/rx.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2644,6 +2644,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
26442644
struct ieee80211_sub_if_data *sdata = rx->sdata;
26452645
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
26462646
u16 ac, q, hdrlen;
2647+
int tailroom = 0;
26472648

26482649
hdr = (struct ieee80211_hdr *) skb->data;
26492650
hdrlen = ieee80211_hdrlen(hdr->frame_control);
@@ -2732,8 +2733,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
27322733
if (!ifmsh->mshcfg.dot11MeshForwarding)
27332734
goto out;
27342735

2736+
if (sdata->crypto_tx_tailroom_needed_cnt)
2737+
tailroom = IEEE80211_ENCRYPT_TAILROOM;
2738+
27352739
fwd_skb = skb_copy_expand(skb, local->tx_headroom +
2736-
sdata->encrypt_headroom, 0, GFP_ATOMIC);
2740+
sdata->encrypt_headroom,
2741+
tailroom, GFP_ATOMIC);
27372742
if (!fwd_skb)
27382743
goto out;
27392744

0 commit comments

Comments
 (0)