Commit 8327cd82 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt7615: get rid of sta_rec_wtbl data structure

Sobstitute sta_rec_wtbl data structure with tlv one
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c686a35c
...@@ -486,7 +486,7 @@ static struct wtbl_req_hdr * ...@@ -486,7 +486,7 @@ static struct wtbl_req_hdr *
mt7615_mcu_alloc_wtbl_req(struct mt7615_sta *msta, int cmd, mt7615_mcu_alloc_wtbl_req(struct mt7615_sta *msta, int cmd,
void *sta_wtbl, struct sk_buff **skb) void *sta_wtbl, struct sk_buff **skb)
{ {
struct sta_rec_wtbl *sta_hdr = sta_wtbl; struct tlv *sta_hdr = sta_wtbl;
struct wtbl_req_hdr hdr = { struct wtbl_req_hdr hdr = {
.wlan_idx = msta->wcid.idx, .wlan_idx = msta->wcid.idx,
.operation = cmd, .operation = cmd,
...@@ -512,7 +512,7 @@ mt7615_mcu_add_nested_tlv(struct sk_buff *skb, int tag, int len, ...@@ -512,7 +512,7 @@ mt7615_mcu_add_nested_tlv(struct sk_buff *skb, int tag, int len,
void *sta_ntlv, void *sta_wtbl) void *sta_ntlv, void *sta_wtbl)
{ {
struct sta_ntlv_hdr *ntlv_hdr = sta_ntlv; struct sta_ntlv_hdr *ntlv_hdr = sta_ntlv;
struct sta_rec_wtbl *sta_hdr = sta_wtbl; struct tlv *sta_hdr = sta_wtbl;
struct tlv *ptlv, tlv = { struct tlv *ptlv, tlv = {
.tag = cpu_to_le16(tag), .tag = cpu_to_le16(tag),
.len = cpu_to_le16(len), .len = cpu_to_le16(len),
...@@ -1035,8 +1035,8 @@ mt7615_mcu_sta_ba(struct mt7615_dev *dev, ...@@ -1035,8 +1035,8 @@ mt7615_mcu_sta_ba(struct mt7615_dev *dev,
return PTR_ERR(skb); return PTR_ERR(skb);
mt7615_mcu_sta_ba_tlv(skb, params, enable, tx); mt7615_mcu_sta_ba_tlv(skb, params, enable, tx);
sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL,
sizeof(struct sta_rec_wtbl)); sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv));
wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_SET, sta_wtbl, &skb); wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_SET, sta_wtbl, &skb);
mt7615_mcu_wtbl_ba_tlv(skb, params, enable, tx, sta_wtbl, wtbl_hdr); mt7615_mcu_wtbl_ba_tlv(skb, params, enable, tx, sta_wtbl, wtbl_hdr);
...@@ -1081,8 +1081,7 @@ mt7615_mcu_add_sta_cmd(struct mt7615_dev *dev, struct ieee80211_vif *vif, ...@@ -1081,8 +1081,7 @@ mt7615_mcu_add_sta_cmd(struct mt7615_dev *dev, struct ieee80211_vif *vif,
if (enable && sta) if (enable && sta)
mt7615_mcu_sta_ht_tlv(skb, sta); mt7615_mcu_sta_ht_tlv(skb, sta);
sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv));
sizeof(struct sta_rec_wtbl));
wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_RESET_AND_SET, wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_RESET_AND_SET,
sta_wtbl, &skb); sta_wtbl, &skb);
...@@ -1330,8 +1329,7 @@ mt7615_mcu_uni_tx_ba(struct mt7615_dev *dev, ...@@ -1330,8 +1329,7 @@ mt7615_mcu_uni_tx_ba(struct mt7615_dev *dev,
if (IS_ERR(skb)) if (IS_ERR(skb))
return PTR_ERR(skb); return PTR_ERR(skb);
sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv));
sizeof(struct sta_rec_wtbl));
wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_SET, sta_wtbl, &skb); wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_SET, sta_wtbl, &skb);
if (IS_ERR(wtbl_hdr)) if (IS_ERR(wtbl_hdr))
...@@ -1382,8 +1380,7 @@ mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev, ...@@ -1382,8 +1380,7 @@ mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev,
if (IS_ERR(skb)) if (IS_ERR(skb))
return PTR_ERR(skb); return PTR_ERR(skb);
sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sta_wtbl = mt7615_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv));
sizeof(struct sta_rec_wtbl));
wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_SET, sta_wtbl, &skb); wtbl_hdr = mt7615_mcu_alloc_wtbl_req(msta, WTBL_SET, sta_wtbl, &skb);
if (IS_ERR(wtbl_hdr)) if (IS_ERR(wtbl_hdr))
......
...@@ -577,7 +577,7 @@ struct wtbl_raw { ...@@ -577,7 +577,7 @@ struct wtbl_raw {
sizeof(struct sta_rec_basic) + \ sizeof(struct sta_rec_basic) + \
sizeof(struct sta_rec_ht) + \ sizeof(struct sta_rec_ht) + \
sizeof(struct sta_rec_vht) + \ sizeof(struct sta_rec_vht) + \
sizeof(struct sta_rec_wtbl) + \ sizeof(struct tlv) + \
MT7615_WTBL_UPDATE_MAX_SIZE) MT7615_WTBL_UPDATE_MAX_SIZE)
#define MT7615_WTBL_UPDATE_BA_SIZE (sizeof(struct wtbl_req_hdr) + \ #define MT7615_WTBL_UPDATE_BA_SIZE (sizeof(struct wtbl_req_hdr) + \
...@@ -666,11 +666,6 @@ struct sta_rec_ba { ...@@ -666,11 +666,6 @@ struct sta_rec_ba {
__le16 winsize; __le16 winsize;
} __packed; } __packed;
struct sta_rec_wtbl {
__le16 tag;
__le16 len;
} __packed;
enum { enum {
STA_REC_BASIC, STA_REC_BASIC,
STA_REC_RA, STA_REC_RA,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment