Skip to content

Commit

Permalink
mt76: mt7615: add mt7615_mac_wtbl_addr routine
Browse files Browse the repository at this point in the history
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 <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Aug 20, 2019
1 parent 8e49524 commit e4f48a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mt7615/mac.c
Expand Up @@ -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;
Expand Down

0 comments on commit e4f48a8

Please sign in to comment.