mcu.c (beed8bea8d7485c7697dcbc8d7f9cb7303b39d3a) | mcu.c (e2c93b68cb54448c2fef24bb719a244dcef3b79e) |
---|---|
1// SPDX-License-Identifier: ISC 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#include <linux/firmware.h> 5#include <linux/fs.h> 6#include "mt7915.h" 7#include "mcu.h" 8#include "mac.h" --- 68 unchanged lines hidden (view full) --- 77#define DL_MODE_NEED_RSP BIT(31) 78 79#define FW_START_OVERRIDE BIT(0) 80#define FW_START_WORKING_PDA_CR4 BIT(2) 81 82#define PATCH_SEC_TYPE_MASK GENMASK(15, 0) 83#define PATCH_SEC_TYPE_INFO 0x2 84 | 1// SPDX-License-Identifier: ISC 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#include <linux/firmware.h> 5#include <linux/fs.h> 6#include "mt7915.h" 7#include "mcu.h" 8#include "mac.h" --- 68 unchanged lines hidden (view full) --- 77#define DL_MODE_NEED_RSP BIT(31) 78 79#define FW_START_OVERRIDE BIT(0) 80#define FW_START_WORKING_PDA_CR4 BIT(2) 81 82#define PATCH_SEC_TYPE_MASK GENMASK(15, 0) 83#define PATCH_SEC_TYPE_INFO 0x2 84 |
85#define to_wcid_lo(id) FIELD_GET(GENMASK(7, 0), (u16)id) 86#define to_wcid_hi(id) FIELD_GET(GENMASK(9, 8), (u16)id) 87 | |
88#define HE_PHY(p, c) u8_get_bits(c, IEEE80211_HE_PHY_##p) 89#define HE_MAC(m, c) u8_get_bits(c, IEEE80211_HE_MAC_##m) 90 91static enum mcu_cipher_type 92mt7915_mcu_get_cipher(int cipher) 93{ 94 switch (cipher) { 95 case WLAN_CIPHER_SUITE_WEP40: --- 476 unchanged lines hidden (view full) --- 572 rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC || 573 rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY || 574 !rxd->seq) 575 mt7915_mcu_rx_unsolicited_event(dev, skb); 576 else 577 mt76_mcu_rx_event(&dev->mt76, skb); 578} 579 | 85#define HE_PHY(p, c) u8_get_bits(c, IEEE80211_HE_PHY_##p) 86#define HE_MAC(m, c) u8_get_bits(c, IEEE80211_HE_MAC_##m) 87 88static enum mcu_cipher_type 89mt7915_mcu_get_cipher(int cipher) 90{ 91 switch (cipher) { 92 case WLAN_CIPHER_SUITE_WEP40: --- 476 unchanged lines hidden (view full) --- 569 rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC || 570 rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY || 571 !rxd->seq) 572 mt7915_mcu_rx_unsolicited_event(dev, skb); 573 else 574 mt76_mcu_rx_event(&dev->mt76, skb); 575} 576 |
580static struct sk_buff * 581mt7915_mcu_alloc_sta_req(struct mt7915_dev *dev, struct mt7915_vif *mvif, 582 struct mt7915_sta *msta, int len) 583{ 584 struct sta_req_hdr hdr = { 585 .bss_idx = mvif->mt76.idx, 586 .wlan_idx_lo = msta ? to_wcid_lo(msta->wcid.idx) : 0, 587 .wlan_idx_hi = msta ? to_wcid_hi(msta->wcid.idx) : 0, 588 .muar_idx = msta && msta->wcid.sta ? mvif->mt76.omac_idx : 0xe, 589 .is_tlv_append = 1, 590 }; 591 struct sk_buff *skb; 592 593 skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, len); 594 if (!skb) 595 return ERR_PTR(-ENOMEM); 596 597 skb_put_data(skb, &hdr, sizeof(hdr)); 598 599 return skb; 600} 601 | |
602static struct wtbl_req_hdr * 603mt7915_mcu_alloc_wtbl_req(struct mt7915_dev *dev, struct mt7915_sta *msta, 604 int cmd, void *sta_wtbl, struct sk_buff **skb) 605{ 606 struct tlv *sta_hdr = sta_wtbl; 607 struct wtbl_req_hdr hdr = { 608 .wlan_idx_lo = to_wcid_lo(msta->wcid.idx), 609 .wlan_idx_hi = to_wcid_hi(msta->wcid.idx), --- 395 unchanged lines hidden (view full) --- 1005 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MUAR_UPDATE), &req, 1006 sizeof(req), true); 1007} 1008 1009int mt7915_mcu_add_bss_info(struct mt7915_phy *phy, 1010 struct ieee80211_vif *vif, int enable) 1011{ 1012 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; | 577static struct wtbl_req_hdr * 578mt7915_mcu_alloc_wtbl_req(struct mt7915_dev *dev, struct mt7915_sta *msta, 579 int cmd, void *sta_wtbl, struct sk_buff **skb) 580{ 581 struct tlv *sta_hdr = sta_wtbl; 582 struct wtbl_req_hdr hdr = { 583 .wlan_idx_lo = to_wcid_lo(msta->wcid.idx), 584 .wlan_idx_hi = to_wcid_hi(msta->wcid.idx), --- 395 unchanged lines hidden (view full) --- 980 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MUAR_UPDATE), &req, 981 sizeof(req), true); 982} 983 984int mt7915_mcu_add_bss_info(struct mt7915_phy *phy, 985 struct ieee80211_vif *vif, int enable) 986{ 987 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; |
988 struct mt7915_dev *dev = phy->dev; |
|
1013 struct sk_buff *skb; 1014 1015 if (mvif->mt76.omac_idx >= REPEATER_BSSID_START) { 1016 mt7915_mcu_muar_config(phy, vif, false, enable); 1017 mt7915_mcu_muar_config(phy, vif, true, enable); 1018 } 1019 | 989 struct sk_buff *skb; 990 991 if (mvif->mt76.omac_idx >= REPEATER_BSSID_START) { 992 mt7915_mcu_muar_config(phy, vif, false, enable); 993 mt7915_mcu_muar_config(phy, vif, true, enable); 994 } 995 |
1020 skb = mt7915_mcu_alloc_sta_req(phy->dev, mvif, NULL, 1021 MT7915_BSS_UPDATE_MAX_SIZE); | 996 skb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, NULL, 997 MT7915_BSS_UPDATE_MAX_SIZE); |
1022 if (IS_ERR(skb)) 1023 return PTR_ERR(skb); 1024 1025 /* bss_omac must be first */ 1026 if (enable) 1027 mt7915_mcu_bss_omac_tlv(skb, vif); 1028 1029 mt7915_mcu_bss_basic_tlv(skb, vif, phy, enable); --- 10 unchanged lines hidden (view full) --- 1040 if (vif->bss_conf.he_support) 1041 mt7915_mcu_bss_he_tlv(skb, vif, phy); 1042 1043 if (mvif->mt76.omac_idx >= EXT_BSSID_START && 1044 mvif->mt76.omac_idx < REPEATER_BSSID_START) 1045 mt7915_mcu_bss_ext_tlv(skb, mvif); 1046 } 1047out: | 998 if (IS_ERR(skb)) 999 return PTR_ERR(skb); 1000 1001 /* bss_omac must be first */ 1002 if (enable) 1003 mt7915_mcu_bss_omac_tlv(skb, vif); 1004 1005 mt7915_mcu_bss_basic_tlv(skb, vif, phy, enable); --- 10 unchanged lines hidden (view full) --- 1016 if (vif->bss_conf.he_support) 1017 mt7915_mcu_bss_he_tlv(skb, vif, phy); 1018 1019 if (mvif->mt76.omac_idx >= EXT_BSSID_START && 1020 mvif->mt76.omac_idx < REPEATER_BSSID_START) 1021 mt7915_mcu_bss_ext_tlv(skb, mvif); 1022 } 1023out: |
1048 return mt76_mcu_skb_send_msg(&phy->dev->mt76, skb, | 1024 return mt76_mcu_skb_send_msg(&dev->mt76, skb, |
1049 MCU_EXT_CMD(BSS_INFO_UPDATE), true); 1050} 1051 1052/** starec & wtbl **/ 1053static int 1054mt7915_mcu_sta_key_tlv(struct mt7915_sta *msta, struct sk_buff *skb, 1055 struct ieee80211_key_conf *key, enum set_key_cmd cmd) 1056{ --- 62 unchanged lines hidden (view full) --- 1119} 1120 1121int mt7915_mcu_add_key(struct mt7915_dev *dev, struct ieee80211_vif *vif, 1122 struct mt7915_sta *msta, struct ieee80211_key_conf *key, 1123 enum set_key_cmd cmd) 1124{ 1125 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 1126 struct sk_buff *skb; | 1025 MCU_EXT_CMD(BSS_INFO_UPDATE), true); 1026} 1027 1028/** starec & wtbl **/ 1029static int 1030mt7915_mcu_sta_key_tlv(struct mt7915_sta *msta, struct sk_buff *skb, 1031 struct ieee80211_key_conf *key, enum set_key_cmd cmd) 1032{ --- 62 unchanged lines hidden (view full) --- 1095} 1096 1097int mt7915_mcu_add_key(struct mt7915_dev *dev, struct ieee80211_vif *vif, 1098 struct mt7915_sta *msta, struct ieee80211_key_conf *key, 1099 enum set_key_cmd cmd) 1100{ 1101 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 1102 struct sk_buff *skb; |
1127 int len = sizeof(struct sta_req_hdr) + sizeof(struct sta_rec_sec); | |
1128 int ret; 1129 | 1103 int ret; 1104 |
1130 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, len); | 1105 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 1106 &msta->wcid); |
1131 if (IS_ERR(skb)) 1132 return PTR_ERR(skb); 1133 1134 ret = mt7915_mcu_sta_key_tlv(msta, skb, key, cmd); 1135 if (ret) 1136 return ret; 1137 1138 return mt76_mcu_skb_send_msg(&dev->mt76, skb, --- 60 unchanged lines hidden (view full) --- 1199 struct wtbl_req_hdr *wtbl_hdr; 1200 struct tlv *sta_wtbl; 1201 struct sk_buff *skb; 1202 int ret; 1203 1204 if (enable && tx && !params->amsdu) 1205 msta->wcid.amsdu = false; 1206 | 1107 if (IS_ERR(skb)) 1108 return PTR_ERR(skb); 1109 1110 ret = mt7915_mcu_sta_key_tlv(msta, skb, key, cmd); 1111 if (ret) 1112 return ret; 1113 1114 return mt76_mcu_skb_send_msg(&dev->mt76, skb, --- 60 unchanged lines hidden (view full) --- 1175 struct wtbl_req_hdr *wtbl_hdr; 1176 struct tlv *sta_wtbl; 1177 struct sk_buff *skb; 1178 int ret; 1179 1180 if (enable && tx && !params->amsdu) 1181 msta->wcid.amsdu = false; 1182 |
1207 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, 1208 MT76_CONNAC_STA_UPDATE_MAX_SIZE); | 1183 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 1184 &msta->wcid); |
1209 if (IS_ERR(skb)) 1210 return PTR_ERR(skb); 1211 1212 sta_wtbl = mt7915_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv)); 1213 1214 wtbl_hdr = mt7915_mcu_alloc_wtbl_req(dev, msta, WTBL_SET, sta_wtbl, 1215 &skb); 1216 if (IS_ERR(wtbl_hdr)) 1217 return PTR_ERR(wtbl_hdr); 1218 1219 mt7915_mcu_wtbl_ba_tlv(skb, params, enable, tx, sta_wtbl, wtbl_hdr); 1220 1221 ret = mt76_mcu_skb_send_msg(&dev->mt76, skb, 1222 MCU_EXT_CMD(STA_REC_UPDATE), true); 1223 if (ret) 1224 return ret; 1225 | 1185 if (IS_ERR(skb)) 1186 return PTR_ERR(skb); 1187 1188 sta_wtbl = mt7915_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv)); 1189 1190 wtbl_hdr = mt7915_mcu_alloc_wtbl_req(dev, msta, WTBL_SET, sta_wtbl, 1191 &skb); 1192 if (IS_ERR(wtbl_hdr)) 1193 return PTR_ERR(wtbl_hdr); 1194 1195 mt7915_mcu_wtbl_ba_tlv(skb, params, enable, tx, sta_wtbl, wtbl_hdr); 1196 1197 ret = mt76_mcu_skb_send_msg(&dev->mt76, skb, 1198 MCU_EXT_CMD(STA_REC_UPDATE), true); 1199 if (ret) 1200 return ret; 1201 |
1226 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, 1227 MT76_CONNAC_STA_UPDATE_MAX_SIZE); | 1202 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 1203 &msta->wcid); |
1228 if (IS_ERR(skb)) 1229 return PTR_ERR(skb); 1230 1231 mt7915_mcu_sta_ba_tlv(skb, params, enable, tx); 1232 1233 return mt76_mcu_skb_send_msg(&dev->mt76, skb, 1234 MCU_EXT_CMD(STA_REC_UPDATE), true); 1235} --- 809 unchanged lines hidden (view full) --- 2045 void *data, u32 field) 2046{ 2047 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2048 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; 2049 struct sta_phy *phy = data; 2050 struct sta_rec_ra_fixed *ra; 2051 struct sk_buff *skb; 2052 struct tlv *tlv; | 1204 if (IS_ERR(skb)) 1205 return PTR_ERR(skb); 1206 1207 mt7915_mcu_sta_ba_tlv(skb, params, enable, tx); 1208 1209 return mt76_mcu_skb_send_msg(&dev->mt76, skb, 1210 MCU_EXT_CMD(STA_REC_UPDATE), true); 1211} --- 809 unchanged lines hidden (view full) --- 2021 void *data, u32 field) 2022{ 2023 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2024 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; 2025 struct sta_phy *phy = data; 2026 struct sta_rec_ra_fixed *ra; 2027 struct sk_buff *skb; 2028 struct tlv *tlv; |
2053 int len = sizeof(struct sta_req_hdr) + sizeof(*ra); | |
2054 | 2029 |
2055 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, len); | 2030 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 2031 &msta->wcid); |
2056 if (IS_ERR(skb)) 2057 return PTR_ERR(skb); 2058 2059 tlv = mt7915_mcu_add_tlv(skb, STA_REC_RA_UPDATE, sizeof(*ra)); 2060 ra = (struct sta_rec_ra_fixed *)tlv; 2061 2062 switch (field) { 2063 case RATE_PARAM_AUTO: --- 22 unchanged lines hidden (view full) --- 2086{ 2087 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2088 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; 2089 struct wtbl_req_hdr *wtbl_hdr; 2090 struct tlv *sta_wtbl; 2091 struct sk_buff *skb; 2092 int ret; 2093 | 2032 if (IS_ERR(skb)) 2033 return PTR_ERR(skb); 2034 2035 tlv = mt7915_mcu_add_tlv(skb, STA_REC_RA_UPDATE, sizeof(*ra)); 2036 ra = (struct sta_rec_ra_fixed *)tlv; 2037 2038 switch (field) { 2039 case RATE_PARAM_AUTO: --- 22 unchanged lines hidden (view full) --- 2062{ 2063 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2064 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; 2065 struct wtbl_req_hdr *wtbl_hdr; 2066 struct tlv *sta_wtbl; 2067 struct sk_buff *skb; 2068 int ret; 2069 |
2094 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, 2095 MT76_CONNAC_STA_UPDATE_MAX_SIZE); | 2070 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 2071 &msta->wcid); |
2096 if (IS_ERR(skb)) 2097 return PTR_ERR(skb); 2098 2099 sta_wtbl = mt7915_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv)); 2100 2101 wtbl_hdr = mt7915_mcu_alloc_wtbl_req(dev, msta, WTBL_SET, sta_wtbl, 2102 &skb); 2103 if (IS_ERR(wtbl_hdr)) --- 195 unchanged lines hidden (view full) --- 2299int mt7915_mcu_add_rate_ctrl(struct mt7915_dev *dev, struct ieee80211_vif *vif, 2300 struct ieee80211_sta *sta, bool changed) 2301{ 2302 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2303 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; 2304 struct sk_buff *skb; 2305 int ret; 2306 | 2072 if (IS_ERR(skb)) 2073 return PTR_ERR(skb); 2074 2075 sta_wtbl = mt7915_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv)); 2076 2077 wtbl_hdr = mt7915_mcu_alloc_wtbl_req(dev, msta, WTBL_SET, sta_wtbl, 2078 &skb); 2079 if (IS_ERR(wtbl_hdr)) --- 195 unchanged lines hidden (view full) --- 2275int mt7915_mcu_add_rate_ctrl(struct mt7915_dev *dev, struct ieee80211_vif *vif, 2276 struct ieee80211_sta *sta, bool changed) 2277{ 2278 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2279 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; 2280 struct sk_buff *skb; 2281 int ret; 2282 |
2307 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, 2308 MT76_CONNAC_STA_UPDATE_MAX_SIZE); | 2283 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 2284 &msta->wcid); |
2309 if (IS_ERR(skb)) 2310 return PTR_ERR(skb); 2311 2312 /* firmware rc algorithm refers to sta_rec_he for HE control. 2313 * once dev->rc_work changes the settings driver should also 2314 * update sta_rec_he here. 2315 */ 2316 if (sta->he_cap.has_he && changed) --- 49 unchanged lines hidden (view full) --- 2366{ 2367 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2368 struct mt7915_sta *msta; 2369 struct sk_buff *skb; 2370 int ret; 2371 2372 msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta; 2373 | 2285 if (IS_ERR(skb)) 2286 return PTR_ERR(skb); 2287 2288 /* firmware rc algorithm refers to sta_rec_he for HE control. 2289 * once dev->rc_work changes the settings driver should also 2290 * update sta_rec_he here. 2291 */ 2292 if (sta->he_cap.has_he && changed) --- 49 unchanged lines hidden (view full) --- 2342{ 2343 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2344 struct mt7915_sta *msta; 2345 struct sk_buff *skb; 2346 int ret; 2347 2348 msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta; 2349 |
2374 skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta, 2375 MT76_CONNAC_STA_UPDATE_MAX_SIZE); | 2350 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 2351 &msta->wcid); |
2376 if (IS_ERR(skb)) 2377 return PTR_ERR(skb); 2378 2379 /* starec basic */ 2380 mt7915_mcu_sta_basic_tlv(skb, vif, sta, enable); 2381 if (!enable) 2382 goto out; 2383 --- 213 unchanged lines hidden (view full) --- 2597 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2598 struct ieee80211_mutable_offsets offs; 2599 struct ieee80211_tx_info *info; 2600 struct sk_buff *skb, *rskb; 2601 struct tlv *tlv; 2602 struct bss_info_bcn *bcn; 2603 int len = MT7915_BEACON_UPDATE_SIZE + MAX_BEACON_SIZE; 2604 | 2352 if (IS_ERR(skb)) 2353 return PTR_ERR(skb); 2354 2355 /* starec basic */ 2356 mt7915_mcu_sta_basic_tlv(skb, vif, sta, enable); 2357 if (!enable) 2358 goto out; 2359 --- 213 unchanged lines hidden (view full) --- 2573 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 2574 struct ieee80211_mutable_offsets offs; 2575 struct ieee80211_tx_info *info; 2576 struct sk_buff *skb, *rskb; 2577 struct tlv *tlv; 2578 struct bss_info_bcn *bcn; 2579 int len = MT7915_BEACON_UPDATE_SIZE + MAX_BEACON_SIZE; 2580 |
2605 rskb = mt7915_mcu_alloc_sta_req(dev, mvif, NULL, len); | 2581 rskb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 2582 NULL, len); |
2606 if (IS_ERR(rskb)) 2607 return PTR_ERR(rskb); 2608 2609 tlv = mt7915_mcu_add_tlv(rskb, BSS_INFO_OFFLOAD, sizeof(*bcn)); 2610 bcn = (struct bss_info_bcn *)tlv; 2611 bcn->enable = en; 2612 2613 if (!en) --- 1644 unchanged lines hidden (view full) --- 4258 struct cfg80211_he_bss_color *he_bss_color) 4259{ 4260 int len = sizeof(struct sta_req_hdr) + sizeof(struct bss_info_color); 4261 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 4262 struct bss_info_color *bss_color; 4263 struct sk_buff *skb; 4264 struct tlv *tlv; 4265 | 2583 if (IS_ERR(rskb)) 2584 return PTR_ERR(rskb); 2585 2586 tlv = mt7915_mcu_add_tlv(rskb, BSS_INFO_OFFLOAD, sizeof(*bcn)); 2587 bcn = (struct bss_info_bcn *)tlv; 2588 bcn->enable = en; 2589 2590 if (!en) --- 1644 unchanged lines hidden (view full) --- 4235 struct cfg80211_he_bss_color *he_bss_color) 4236{ 4237 int len = sizeof(struct sta_req_hdr) + sizeof(struct bss_info_color); 4238 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; 4239 struct bss_info_color *bss_color; 4240 struct sk_buff *skb; 4241 struct tlv *tlv; 4242 |
4266 skb = mt7915_mcu_alloc_sta_req(dev, mvif, NULL, len); | 4243 skb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, 4244 NULL, len); |
4267 if (IS_ERR(skb)) 4268 return PTR_ERR(skb); 4269 4270 tlv = mt7915_mcu_add_tlv(skb, BSS_INFO_BSS_COLOR, sizeof(*bss_color)); 4271 bss_color = (struct bss_info_color *)tlv; 4272 bss_color->disable = !he_bss_color->enabled; 4273 bss_color->color = he_bss_color->color; 4274 --- 53 unchanged lines hidden --- | 4245 if (IS_ERR(skb)) 4246 return PTR_ERR(skb); 4247 4248 tlv = mt7915_mcu_add_tlv(skb, BSS_INFO_BSS_COLOR, sizeof(*bss_color)); 4249 bss_color = (struct bss_info_color *)tlv; 4250 bss_color->disable = !he_bss_color->enabled; 4251 bss_color->color = he_bss_color->color; 4252 --- 53 unchanged lines hidden --- |