forked from luck/tmp_suning_uos_patched
Two more fixes:
* sometimes, not enough tailroom was allocated for software-encrypted management frames in mac80211 * cfg80211 regulatory restore got an additional condition, needs to rerun the checks after that condition changes -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEH1e1rEeCd0AIMq6MB8qZga/fl8QFAlxUHHcACgkQB8qZga/f l8S75RAAkfsFhR1GPCiKQuwsoKc7pPHp7gkSOHaUeaALnkAne9zw7yKkSG3mGaaA RpHteYUXDgRvhYYItAbdEWsZl+xooaKVwMuPFdxyZdU+ACTTwJBSTGm3DkfiUGzY CA3KkzjdQa/Q14pLwVH100DtSZpnqUEC/tyzBUAPMF1dYhC7pTnPen/gdlnN6O6W 2JqIZAgNFHfHi0UTtWdeKZfp926vhXeEvltFuFoGNwnq6BKtUN0y845m8SwCPOOL W70uNsG2LxbhBKDp5fxFT/1+KIxvDSZtm+CpiJVQFxdQ8w65aAq+mQzoj85CCq1A GsgN8cyHOU9axoxIfnnzMKWtD1/2UtTWDqu52/qFpW/kUidV5M8kB7DOT2fiLdrD NiSODAIIUEElJvU8oWWkr/7i/CMJz+0HgagwtZJ/RqYxKy6ahefDpp90/VBJvhqg 25JaG7UbL0q415nq5cehA+QgH31+KU8XwllTTh1gidVxrifvj9Xl3w2PcOpIjz9l Oc/Q8qFwZpeaU4EYsxSI9k5ieHYsN68wBIfWO/5Z5G14wikz8gRIIK5v+dDc+/p8 kPbYqPWD+TE5wgfIFwg7Efin3D8150zhp7q6080lJpm/F1SGargN0ma9DggvdZ2K WuYGj1XXG35qXICcln4WoHy415V5shX0fdOOKMb5GjLJyv5QtiA= =KoyO -----END PGP SIGNATURE----- Merge tag 'mac80211-for-davem-2019-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two more fixes: * sometimes, not enough tailroom was allocated for software-encrypted management frames in mac80211 * cfg80211 regulatory restore got an additional condition, needs to rerun the checks after that condition changes ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
84826ac733
|
@ -1938,9 +1938,16 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
|
|||
int head_need, bool may_encrypt)
|
||||
{
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_hdr *hdr;
|
||||
bool enc_tailroom;
|
||||
int tail_need = 0;
|
||||
|
||||
if (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt) {
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
enc_tailroom = may_encrypt &&
|
||||
(sdata->crypto_tx_tailroom_needed_cnt ||
|
||||
ieee80211_is_mgmt(hdr->frame_control));
|
||||
|
||||
if (enc_tailroom) {
|
||||
tail_need = IEEE80211_ENCRYPT_TAILROOM;
|
||||
tail_need -= skb_tailroom(skb);
|
||||
tail_need = max_t(int, tail_need, 0);
|
||||
|
@ -1948,8 +1955,7 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
|
|||
|
||||
if (skb_cloned(skb) &&
|
||||
(!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) ||
|
||||
!skb_clone_writable(skb, ETH_HLEN) ||
|
||||
(may_encrypt && sdata->crypto_tx_tailroom_needed_cnt)))
|
||||
!skb_clone_writable(skb, ETH_HLEN) || enc_tailroom))
|
||||
I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
|
||||
else if (head_need || tail_need)
|
||||
I802_DEBUG_INC(local->tx_expand_skb_head);
|
||||
|
|
|
@ -41,6 +41,8 @@ int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
|
|||
cfg80211_sched_dfs_chan_update(rdev);
|
||||
}
|
||||
|
||||
schedule_work(&cfg80211_disconnect_work);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -445,6 +445,8 @@ void cfg80211_process_wdev_events(struct wireless_dev *wdev);
|
|||
bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range,
|
||||
u32 center_freq_khz, u32 bw_khz);
|
||||
|
||||
extern struct work_struct cfg80211_disconnect_work;
|
||||
|
||||
/**
|
||||
* cfg80211_chandef_dfs_usable - checks if chandef is DFS usable
|
||||
* @wiphy: the wiphy to validate against
|
||||
|
|
|
@ -667,7 +667,7 @@ static void disconnect_work(struct work_struct *work)
|
|||
rtnl_unlock();
|
||||
}
|
||||
|
||||
static DECLARE_WORK(cfg80211_disconnect_work, disconnect_work);
|
||||
DECLARE_WORK(cfg80211_disconnect_work, disconnect_work);
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user