]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix MU-MIMO follow-MAC mode
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Apr 2017 12:23:49 +0000 (14:23 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 13 Apr 2017 12:35:53 +0000 (14:35 +0200)
commit593630a928e911e217df12813265f8cc2290c93c
tree47259e207d75594269f8bc4ace531ba250875abc
parent605b881cf006eb285269f9f7aa276eaa083ca335
mac80211: fix MU-MIMO follow-MAC mode

There are two bugs in the follow-MAC code:
 * it treats the radiotap header as the 802.11 header
   (therefore it can't possibly work)
 * it doesn't verify that the skb data it accesses is actually
   present in the header, which is mitigated by the first point

Fix this by moving all of this out into a separate function.
This function copies the data it needs using skb_copy_bits()
to make sure it can be accessed if it's paged, and offsets
that by the possibly present vendor radiotap header.

This also makes all those conditions more readable.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c