diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-09-02 04:00:22 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-09-02 09:19:01 -0400 |
commit | 2b37c2955204066d32566a50372da95ab734fc7e (patch) | |
tree | cf769b8c7c8a4aad4c58655de7d62cc0297e1181 /drivers/net/wireless/ath/ath10k/mac.c | |
parent | d35a6c18cb70be7961127f179a3394fe29a4ffe4 (diff) |
ath10k: don't access tx_info while overwriting it
Nothing important was being overwritten so it
didn't yield any bugs yet.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 100ed4f0cabd..f80eeed16cb6 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -1857,11 +1857,10 @@ static u8 ath10k_tx_h_get_tid(struct ieee80211_hdr *hdr) | |||
1857 | return ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK; | 1857 | return ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK; |
1858 | } | 1858 | } |
1859 | 1859 | ||
1860 | static u8 ath10k_tx_h_get_vdev_id(struct ath10k *ar, | 1860 | static u8 ath10k_tx_h_get_vdev_id(struct ath10k *ar, struct ieee80211_vif *vif) |
1861 | struct ieee80211_tx_info *info) | ||
1862 | { | 1861 | { |
1863 | if (info->control.vif) | 1862 | if (vif) |
1864 | return ath10k_vif_to_arvif(info->control.vif)->vdev_id; | 1863 | return ath10k_vif_to_arvif(vif)->vdev_id; |
1865 | 1864 | ||
1866 | if (ar->monitor_started) | 1865 | if (ar->monitor_started) |
1867 | return ar->monitor_vdev_id; | 1866 | return ar->monitor_vdev_id; |
@@ -2317,7 +2316,7 @@ static void ath10k_tx(struct ieee80211_hw *hw, | |||
2317 | 2316 | ||
2318 | ATH10K_SKB_CB(skb)->htt.is_offchan = false; | 2317 | ATH10K_SKB_CB(skb)->htt.is_offchan = false; |
2319 | ATH10K_SKB_CB(skb)->htt.tid = ath10k_tx_h_get_tid(hdr); | 2318 | ATH10K_SKB_CB(skb)->htt.tid = ath10k_tx_h_get_tid(hdr); |
2320 | ATH10K_SKB_CB(skb)->vdev_id = ath10k_tx_h_get_vdev_id(ar, info); | 2319 | ATH10K_SKB_CB(skb)->vdev_id = ath10k_tx_h_get_vdev_id(ar, vif); |
2321 | 2320 | ||
2322 | /* it makes no sense to process injected frames like that */ | 2321 | /* it makes no sense to process injected frames like that */ |
2323 | if (vif && vif->type != NL80211_IFTYPE_MONITOR) { | 2322 | if (vif && vif->type != NL80211_IFTYPE_MONITOR) { |