mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
mt7603: fix wcid for frames sent via drv_tx
pspoll responses can be sent via drv_tx, which may need to be encrypted Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -568,9 +568,28 @@ static void mt7603_set_coverage_class(struct ieee80211_hw *hw,
|
||||
static void mt7603_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
struct mt76_wcid *wcid = &dev->global_sta.wcid;
|
||||
|
||||
if (control->sta) {
|
||||
struct mt7603_sta *msta;
|
||||
|
||||
msta = (struct mt7603_sta *)control->sta->drv_priv;
|
||||
wcid = &msta->wcid;
|
||||
/* sw encrypted frames */
|
||||
if (!info->control.hw_key && wcid->hw_key_idx != 0xff)
|
||||
control->sta = NULL;
|
||||
}
|
||||
|
||||
if (vif && !control->sta) {
|
||||
struct mt7603_vif *mvif;
|
||||
|
||||
mvif = (struct mt7603_vif *)vif->drv_priv;
|
||||
wcid = &mvif->sta.wcid;
|
||||
}
|
||||
|
||||
mt76_tx(&dev->mt76, control->sta, wcid, skb);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user