Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mt76: mt7925: remove the unused mt7925_mcu_set_chan_info

remove the unused function mt7925_mcu_set_chan_info

Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/0aa0abe7fc661380ae812c6bc879a7705de401b2.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>

authored by

Sean Wang and committed by
Felix Fietkau
67e9847b 0cb349d7

-74
-74
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
··· 1274 1274 &req, sizeof(req), false); 1275 1275 } 1276 1276 1277 - int mt7925_mcu_set_chan_info(struct mt792x_phy *phy, u16 tag) 1278 - { 1279 - static const u8 ch_band[] = { 1280 - [NL80211_BAND_2GHZ] = 0, 1281 - [NL80211_BAND_5GHZ] = 1, 1282 - [NL80211_BAND_6GHZ] = 2, 1283 - }; 1284 - struct mt792x_dev *dev = phy->dev; 1285 - struct cfg80211_chan_def *chandef = &phy->mt76->chandef; 1286 - int freq1 = chandef->center_freq1; 1287 - u8 band_idx = chandef->chan->band != NL80211_BAND_2GHZ; 1288 - struct { 1289 - /* fixed field */ 1290 - u8 __rsv[4]; 1291 - 1292 - __le16 tag; 1293 - __le16 len; 1294 - u8 control_ch; 1295 - u8 center_ch; 1296 - u8 bw; 1297 - u8 tx_path_num; 1298 - u8 rx_path; /* mask or num */ 1299 - u8 switch_reason; 1300 - u8 band_idx; 1301 - u8 center_ch2; /* for 80+80 only */ 1302 - __le16 cac_case; 1303 - u8 channel_band; 1304 - u8 rsv0; 1305 - __le32 outband_freq; 1306 - u8 txpower_drop; 1307 - u8 ap_bw; 1308 - u8 ap_center_ch; 1309 - u8 rsv1[53]; 1310 - } __packed req = { 1311 - .tag = cpu_to_le16(tag), 1312 - .len = cpu_to_le16(sizeof(req) - 4), 1313 - .control_ch = chandef->chan->hw_value, 1314 - .center_ch = ieee80211_frequency_to_channel(freq1), 1315 - .bw = mt76_connac_chan_bw(chandef), 1316 - .tx_path_num = hweight8(phy->mt76->antenna_mask), 1317 - .rx_path = phy->mt76->antenna_mask, 1318 - .band_idx = band_idx, 1319 - .channel_band = ch_band[chandef->chan->band], 1320 - }; 1321 - 1322 - if (chandef->chan->band == NL80211_BAND_6GHZ) 1323 - req.channel_band = 2; 1324 - else 1325 - req.channel_band = chandef->chan->band; 1326 - 1327 - if (tag == UNI_CHANNEL_RX_PATH || 1328 - dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) 1329 - req.switch_reason = CH_SWITCH_NORMAL; 1330 - else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) 1331 - req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; 1332 - else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, 1333 - NL80211_IFTYPE_AP)) 1334 - req.switch_reason = CH_SWITCH_DFS; 1335 - else 1336 - req.switch_reason = CH_SWITCH_NORMAL; 1337 - 1338 - if (tag == UNI_CHANNEL_SWITCH) 1339 - req.rx_path = hweight8(req.rx_path); 1340 - 1341 - if (chandef->width == NL80211_CHAN_WIDTH_80P80) { 1342 - int freq2 = chandef->center_freq2; 1343 - 1344 - req.center_ch2 = ieee80211_frequency_to_channel(freq2); 1345 - } 1346 - 1347 - return mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD(CHANNEL_SWITCH), 1348 - &req, sizeof(req), true); 1349 - } 1350 - 1351 1277 int mt7925_mcu_set_eeprom(struct mt792x_dev *dev) 1352 1278 { 1353 1279 struct {