]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: mt7925: remove the unused mt7925_mcu_set_chan_info
authorSean Wang <sean.wang@mediatek.com>
Sat, 6 Jul 2024 08:28:16 +0000 (01:28 -0700)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jul 2024 21:02:10 +0000 (23:02 +0200)
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>
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c

index 7bfb9c51388ccaf696287d0ff347e7d6856acde6..26f78c0a491e811476d0d806bec1e29ee364e7e9 100644 (file)
@@ -1274,80 +1274,6 @@ int mt7925_mcu_abort_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
                                 &req, sizeof(req), false);
 }
 
-int mt7925_mcu_set_chan_info(struct mt792x_phy *phy, u16 tag)
-{
-       static const u8 ch_band[] = {
-               [NL80211_BAND_2GHZ] = 0,
-               [NL80211_BAND_5GHZ] = 1,
-               [NL80211_BAND_6GHZ] = 2,
-       };
-       struct mt792x_dev *dev = phy->dev;
-       struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
-       int freq1 = chandef->center_freq1;
-       u8 band_idx = chandef->chan->band != NL80211_BAND_2GHZ;
-       struct {
-               /* fixed field */
-               u8 __rsv[4];
-
-               __le16 tag;
-               __le16 len;
-               u8 control_ch;
-               u8 center_ch;
-               u8 bw;
-               u8 tx_path_num;
-               u8 rx_path;     /* mask or num */
-               u8 switch_reason;
-               u8 band_idx;
-               u8 center_ch2;  /* for 80+80 only */
-               __le16 cac_case;
-               u8 channel_band;
-               u8 rsv0;
-               __le32 outband_freq;
-               u8 txpower_drop;
-               u8 ap_bw;
-               u8 ap_center_ch;
-               u8 rsv1[53];
-       } __packed req = {
-               .tag = cpu_to_le16(tag),
-               .len = cpu_to_le16(sizeof(req) - 4),
-               .control_ch = chandef->chan->hw_value,
-               .center_ch = ieee80211_frequency_to_channel(freq1),
-               .bw = mt76_connac_chan_bw(chandef),
-               .tx_path_num = hweight8(phy->mt76->antenna_mask),
-               .rx_path = phy->mt76->antenna_mask,
-               .band_idx = band_idx,
-               .channel_band = ch_band[chandef->chan->band],
-       };
-
-       if (chandef->chan->band == NL80211_BAND_6GHZ)
-               req.channel_band = 2;
-       else
-               req.channel_band = chandef->chan->band;
-
-       if (tag == UNI_CHANNEL_RX_PATH ||
-           dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
-               req.switch_reason = CH_SWITCH_NORMAL;
-       else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
-               req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
-       else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef,
-                                         NL80211_IFTYPE_AP))
-               req.switch_reason = CH_SWITCH_DFS;
-       else
-               req.switch_reason = CH_SWITCH_NORMAL;
-
-       if (tag == UNI_CHANNEL_SWITCH)
-               req.rx_path = hweight8(req.rx_path);
-
-       if (chandef->width == NL80211_CHAN_WIDTH_80P80) {
-               int freq2 = chandef->center_freq2;
-
-               req.center_ch2 = ieee80211_frequency_to_channel(freq2);
-       }
-
-       return mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD(CHANNEL_SWITCH),
-                                &req, sizeof(req), true);
-}
-
 int mt7925_mcu_set_eeprom(struct mt792x_dev *dev)
 {
        struct {