diff options
| author | Lorenzo Bianconi <[email protected]> | 2019-07-13 17:09:02 +0200 |
|---|---|---|
| committer | Felix Fietkau <[email protected]> | 2019-09-05 17:42:30 +0200 |
| commit | 3d687a7fcb9772d22dded1c7f75bb52ee4b99658 (patch) | |
| tree | 499c12ae7ac17d7a03beb9038e2bcac9d918fce8 | |
| parent | 92671eb95c5935121801730293689710e3850afa (diff) | |
mt76: mt7615: add mt7615_mac_wtbl_addr routine
Introduce mt7615_mac_wtbl_addr rouinte to compute sta wtbl address.
This is a preliminary patch to update wtbl key directly from host
processor
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 53937573662f..fb28f68486fd 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -449,13 +449,18 @@ void mt7615_txp_skb_unmap(struct mt76_dev *dev, le16_to_cpu(txp->len[i]), DMA_TO_DEVICE); } +static u32 mt7615_mac_wtbl_addr(int wcid) +{ + return MT_WTBL_BASE + wcid * MT_WTBL_ENTRY_SIZE; +} + void mt7615_mac_set_rates(struct mt7615_dev *dev, struct mt7615_sta *sta, struct ieee80211_tx_rate *probe_rate, struct ieee80211_tx_rate *rates) { struct ieee80211_tx_rate *ref; int wcid = sta->wcid.idx; - u32 addr = MT_WTBL_BASE + wcid * MT_WTBL_ENTRY_SIZE; + u32 addr = mt7615_mac_wtbl_addr(wcid); bool stbc = false; int n_rates = sta->n_rates; u8 bw, bw_prev, bw_idx = 0; |