]> git.itanic.dy.fi Git - linux-stable/commit
mac80211_hwsim: Use proper TX power
authorBeni Lev <beni.lev@intel.com>
Tue, 25 Jul 2017 08:25:25 +0000 (11:25 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 26 Nov 2017 13:50:31 +0000 (13:50 +0000)
commitd987f7e0044e73806b55247873724516c3150680
tree92194af5c15833329fd5d627da44dda2cb29f014
parentd554bf6ee1dc83a824a1a3521702d8af2f63eea0
mac80211_hwsim: Use proper TX power

commit 9de981f507474f326e42117858dc9a9321331ae5 upstream.

In struct ieee80211_tx_info, control.vif pointer and rate_driver_data[0]
falls on the same place, depending on the union usage.
During the whole TX process, the union is referred to as a control struct,
which holds the vif that is later used in the tx flow, especially in order
to derive the used tx power.
Referring direcly to rate_driver_data[0] and assigning a value to it,
overwrites the vif pointer, hence making all later references irrelevant.
Moreover, rate_driver_data[0] isn't used later in the flow in order to
retrieve the channel that it is pointing to.

Signed-off-by: Beni Lev <beni.lev@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/mac80211_hwsim.c