mac80211: avoid kernel panic when building AMSDU from non-linear SKB
authorSara Sharon <sara.sharon@intel.com>
Wed, 29 Aug 2018 06:57:02 +0000 (08:57 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 29 Aug 2018 10:17:55 +0000 (12:17 +0200)
commit166ac9d55b0ab70b644e429be1f217fe8393cbd7
tree916dd7bd53cca820cd82c223c14df178d61c00cf
parent1f631c3201fe5491808df143d8fcba81b3197ffd
mac80211: avoid kernel panic when building AMSDU from non-linear SKB

When building building AMSDU from non-linear SKB, we hit a
kernel panic when trying to push the padding to the tail.
Instead, put the padding at the head of the next subframe.
This also fixes the A-MSDU subframes to not have the padding
accounted in the length field and not have pad at all for
the last subframe, both required by the spec.

Fixes: 6e0456b54545 ("mac80211: add A-MSDU tx support")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Reviewed-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c