Commit be2a2872 authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: always use WTBL_MAX_SIZE for tlv allocation

Simplify WTBL defines.
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 00ac71ff
...@@ -362,30 +362,6 @@ enum { ...@@ -362,30 +362,6 @@ enum {
BSS_INFO_MAX_NUM BSS_INFO_MAX_NUM
}; };
#define MT7615_WTBL_UPDATE_MAX_SIZE (sizeof(struct wtbl_req_hdr) + \
sizeof(struct wtbl_generic) + \
sizeof(struct wtbl_rx) + \
sizeof(struct wtbl_ht) + \
sizeof(struct wtbl_vht) + \
sizeof(struct wtbl_tx_ps) + \
sizeof(struct wtbl_hdr_trans) +\
sizeof(struct wtbl_ba) + \
sizeof(struct wtbl_bf) + \
sizeof(struct wtbl_smps) + \
sizeof(struct wtbl_pn) + \
sizeof(struct wtbl_spe))
#define MT7615_STA_UPDATE_MAX_SIZE (sizeof(struct sta_req_hdr) + \
sizeof(struct sta_rec_basic) + \
sizeof(struct sta_rec_ht) + \
sizeof(struct sta_rec_vht) + \
sizeof(struct sta_rec_uapsd) + \
sizeof(struct tlv) + \
MT7615_WTBL_UPDATE_MAX_SIZE)
#define MT7615_WTBL_UPDATE_BA_SIZE (sizeof(struct wtbl_req_hdr) + \
sizeof(struct wtbl_ba))
enum { enum {
CH_SWITCH_NORMAL = 0, CH_SWITCH_NORMAL = 0,
CH_SWITCH_SCAN = 3, CH_SWITCH_SCAN = 3,
......
...@@ -287,7 +287,7 @@ mt76_connac_mcu_alloc_wtbl_req(struct mt76_dev *dev, struct mt76_wcid *wcid, ...@@ -287,7 +287,7 @@ mt76_connac_mcu_alloc_wtbl_req(struct mt76_dev *dev, struct mt76_wcid *wcid,
&hdr.wlan_idx_hi); &hdr.wlan_idx_hi);
if (!nskb) { if (!nskb) {
nskb = mt76_mcu_msg_alloc(dev, NULL, nskb = mt76_mcu_msg_alloc(dev, NULL,
MT76_CONNAC_WTBL_UPDATE_BA_SIZE); MT76_CONNAC_WTBL_UPDATE_MAX_SIZE);
if (!nskb) if (!nskb)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
...@@ -304,9 +304,6 @@ struct wtbl_raw { ...@@ -304,9 +304,6 @@ struct wtbl_raw {
sizeof(struct tlv) + \ sizeof(struct tlv) + \
MT76_CONNAC_WTBL_UPDATE_MAX_SIZE) MT76_CONNAC_WTBL_UPDATE_MAX_SIZE)
#define MT76_CONNAC_WTBL_UPDATE_BA_SIZE (sizeof(struct wtbl_req_hdr) + \
sizeof(struct wtbl_ba))
enum { enum {
STA_REC_BASIC, STA_REC_BASIC,
STA_REC_RA, STA_REC_RA,
......
...@@ -592,7 +592,7 @@ mt7915_mcu_alloc_wtbl_req(struct mt7915_dev *dev, struct mt7915_sta *msta, ...@@ -592,7 +592,7 @@ mt7915_mcu_alloc_wtbl_req(struct mt7915_dev *dev, struct mt7915_sta *msta,
if (!nskb) { if (!nskb) {
nskb = mt76_mcu_msg_alloc(&dev->mt76, NULL, nskb = mt76_mcu_msg_alloc(&dev->mt76, NULL,
MT7915_WTBL_UPDATE_BA_SIZE); MT7915_WTBL_UPDATE_MAX_SIZE);
if (!nskb) if (!nskb)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
...@@ -1080,9 +1080,6 @@ enum { ...@@ -1080,9 +1080,6 @@ enum {
sizeof(struct tlv) + \ sizeof(struct tlv) + \
MT7915_WTBL_UPDATE_MAX_SIZE) MT7915_WTBL_UPDATE_MAX_SIZE)
#define MT7915_WTBL_UPDATE_BA_SIZE (sizeof(struct wtbl_req_hdr) + \
sizeof(struct wtbl_ba))
#define MT7915_BSS_UPDATE_MAX_SIZE (sizeof(struct sta_req_hdr) + \ #define MT7915_BSS_UPDATE_MAX_SIZE (sizeof(struct sta_req_hdr) + \
sizeof(struct bss_info_omac) + \ sizeof(struct bss_info_omac) + \
sizeof(struct bss_info_basic) +\ sizeof(struct bss_info_basic) +\
......
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