mirror of
https://github.com/Heleguo/lede.git
synced 2025-12-16 19:01:32 +00:00
449 lines
13 KiB
Diff
449 lines
13 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1,5 +1,5 @@
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
-EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
|
|
+EXTRA_CFLAGS += -Werror -Wno-unused-variable -DCONFIG_MT76_LEDS
|
|
obj-m := mt76.o
|
|
obj-$(CONFIG_MT76_USB) += mt76-usb.o
|
|
obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o
|
|
--- a/mac80211.c
|
|
+++ b/mac80211.c
|
|
@@ -1660,8 +1660,8 @@
|
|
static void
|
|
__mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
|
{
|
|
- if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif, 0))
|
|
- ieee80211_csa_finish(vif, 0);
|
|
+ if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
|
|
+ ieee80211_csa_finish(vif);
|
|
}
|
|
|
|
void mt76_csa_finish(struct mt76_dev *dev)
|
|
@@ -1685,7 +1685,7 @@
|
|
if (!vif->bss_conf.csa_active)
|
|
return;
|
|
|
|
- dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif, 0);
|
|
+ dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
|
|
}
|
|
|
|
void mt76_csa_check(struct mt76_dev *dev)
|
|
--- a/mt7915/main.c
|
|
+++ b/mt7915/main.c
|
|
@@ -108,7 +108,7 @@
|
|
return ret;
|
|
}
|
|
|
|
-static void mt7915_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt7915_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt7915_dev *dev = mt7915_hw_dev(hw);
|
|
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
|
@@ -1697,10 +1697,6 @@
|
|
}
|
|
|
|
const struct ieee80211_ops mt7915_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt7915_tx,
|
|
.start = mt7915_start,
|
|
.stop = mt7915_stop,
|
|
--- a/mt7915/mcu.c
|
|
+++ b/mt7915/mcu.c
|
|
@@ -232,7 +232,7 @@
|
|
if (!vif->bss_conf.csa_active || vif->type == NL80211_IFTYPE_STATION)
|
|
return;
|
|
|
|
- ieee80211_csa_finish(vif, 0);
|
|
+ ieee80211_csa_finish(vif);
|
|
}
|
|
|
|
static void
|
|
@@ -335,7 +335,7 @@
|
|
if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
|
|
return;
|
|
|
|
- ieee80211_color_change_finish(vif, 0);
|
|
+ ieee80211_color_change_finish(vif);
|
|
}
|
|
|
|
static void
|
|
@@ -467,10 +467,10 @@
|
|
.tolerated = true,
|
|
};
|
|
|
|
- if (!(vif->bss_conf.chanreq.oper.chan->flags & IEEE80211_CHAN_RADAR))
|
|
+ if (!(vif->bss_conf.chandef.chan->flags & IEEE80211_CHAN_RADAR))
|
|
return false;
|
|
|
|
- cfg80211_bss_iter(hw->wiphy, &vif->bss_conf.chanreq.oper,
|
|
+ cfg80211_bss_iter(hw->wiphy, &vif->bss_conf.chandef,
|
|
mt7915_check_he_obss_narrow_bw_ru_iter,
|
|
&iter_data);
|
|
|
|
--- a/mt792x_core.c
|
|
+++ b/mt792x_core.c
|
|
@@ -733,10 +733,6 @@
|
|
if (!(*fw_features & MT792x_FW_CAP_CNM)) {
|
|
ops->remain_on_channel = NULL;
|
|
ops->cancel_remain_on_channel = NULL;
|
|
- ops->add_chanctx = ieee80211_emulate_add_chanctx;
|
|
- ops->remove_chanctx = ieee80211_emulate_remove_chanctx;
|
|
- ops->change_chanctx = ieee80211_emulate_change_chanctx;
|
|
- ops->switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx;
|
|
ops->assign_vif_chanctx = NULL;
|
|
ops->unassign_vif_chanctx = NULL;
|
|
ops->mgd_prepare_tx = NULL;
|
|
--- a/mt7921/main.c
|
|
+++ b/mt7921/main.c
|
|
@@ -268,7 +268,7 @@
|
|
return err;
|
|
}
|
|
|
|
-static void mt7921_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt7921_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
|
int err = 0;
|
|
@@ -281,7 +281,7 @@
|
|
return;
|
|
}
|
|
|
|
- mt792x_stop(hw, false);
|
|
+ mt792x_stop(hw);
|
|
}
|
|
|
|
static int
|
|
--- a/mt7996/main.c
|
|
+++ b/mt7996/main.c
|
|
@@ -93,7 +93,7 @@
|
|
return ret;
|
|
}
|
|
|
|
-static void mt7996_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt7996_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
|
struct mt7996_phy *phy = mt7996_hw_phy(hw);
|
|
@@ -1448,10 +1448,6 @@
|
|
#endif
|
|
|
|
const struct ieee80211_ops mt7996_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt7996_tx,
|
|
.start = mt7996_start,
|
|
.stop = mt7996_stop,
|
|
--- a/mt7996/mcu.c
|
|
+++ b/mt7996/mcu.c
|
|
@@ -353,7 +353,7 @@
|
|
if (!vif->bss_conf.csa_active || vif->type == NL80211_IFTYPE_STATION)
|
|
return;
|
|
|
|
- ieee80211_csa_finish(vif, 0);
|
|
+ ieee80211_csa_finish(vif);
|
|
}
|
|
|
|
static void
|
|
@@ -433,7 +433,7 @@
|
|
if (!vif->bss_conf.color_change_active || vif->type == NL80211_IFTYPE_STATION)
|
|
return;
|
|
|
|
- ieee80211_color_change_finish(vif, 0);
|
|
+ ieee80211_color_change_finish(vif);
|
|
}
|
|
|
|
static void
|
|
--- a/mt792x.h
|
|
+++ b/mt792x.h
|
|
@@ -337,7 +337,7 @@
|
|
#define mt792x_mutex_release(dev) \
|
|
mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm)
|
|
|
|
-void mt792x_stop(struct ieee80211_hw *hw, bool suspend);
|
|
+void mt792x_stop(struct ieee80211_hw *hw);
|
|
void mt792x_pm_wake_work(struct work_struct *work);
|
|
void mt792x_pm_power_save_work(struct work_struct *work);
|
|
void mt792x_reset(struct mt76_dev *mdev);
|
|
@@ -457,7 +457,7 @@
|
|
u32 mt792xu_rmw(struct mt76_dev *dev, u32 addr, u32 mask, u32 val);
|
|
void mt792xu_copy(struct mt76_dev *dev, u32 offset, const void *data, int len);
|
|
void mt792xu_disconnect(struct usb_interface *usb_intf);
|
|
-void mt792xu_stop(struct ieee80211_hw *hw, bool suspend);
|
|
+void mt792xu_stop(struct ieee80211_hw *hw);
|
|
|
|
static inline void
|
|
mt792x_skb_add_usb_sdio_hdr(struct mt792x_dev *dev, struct sk_buff *skb,
|
|
--- a/mt792x_core.c
|
|
+++ b/mt792x_core.c
|
|
@@ -117,7 +117,7 @@
|
|
}
|
|
EXPORT_SYMBOL_GPL(mt792x_tx);
|
|
|
|
-void mt792x_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+void mt792x_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
|
struct mt792x_phy *phy = mt792x_hw_phy(hw);
|
|
--- a/mt792x_usb.c
|
|
+++ b/mt792x_usb.c
|
|
@@ -285,12 +285,12 @@
|
|
}
|
|
EXPORT_SYMBOL_GPL(mt792xu_init_reset);
|
|
|
|
-void mt792xu_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+void mt792xu_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
|
|
|
mt76u_stop_tx(&dev->mt76);
|
|
- mt792x_stop(hw, false);
|
|
+ mt792x_stop(hw);
|
|
}
|
|
EXPORT_SYMBOL_GPL(mt792xu_stop);
|
|
|
|
--- a/mt7925/main.c
|
|
+++ b/mt7925/main.c
|
|
@@ -995,7 +995,7 @@
|
|
continue;
|
|
|
|
data[n_data].link_id = link_id;
|
|
- data[n_data].band = link_conf->chanreq.oper.chan->band;
|
|
+ data[n_data].band = link_conf->chandef.chan->band;
|
|
n_data++;
|
|
}
|
|
rcu_read_unlock();
|
|
@@ -1026,7 +1026,7 @@
|
|
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
|
struct ieee80211_bss_conf *link_conf =
|
|
mt792x_vif_to_bss_conf(vif, mvif->deflink_id);
|
|
- struct cfg80211_chan_def *chandef = &link_conf->chanreq.oper;
|
|
+ struct cfg80211_chan_def *chandef = &link_conf->chandef;
|
|
enum nl80211_band band = chandef->chan->band, secondary_band;
|
|
|
|
u16 sel_links = mt7925_mac_select_links(mdev, vif);
|
|
@@ -1036,7 +1036,7 @@
|
|
return;
|
|
|
|
link_conf = mt792x_vif_to_bss_conf(vif, secondary_link_id);
|
|
- secondary_band = link_conf->chanreq.oper.chan->band;
|
|
+ secondary_band = link_conf->chandef.chan->band;
|
|
|
|
if (band == NL80211_BAND_2GHZ ||
|
|
(band == NL80211_BAND_5GHZ && secondary_band == NL80211_BAND_6GHZ)) {
|
|
--- a/mt7925/mcu.c
|
|
+++ b/mt7925/mcu.c
|
|
@@ -1166,7 +1166,7 @@
|
|
if (WARN_ON_ONCE(!link_conf))
|
|
return -EPERM;
|
|
|
|
- links[i].chan = link_conf->chanreq.oper.chan;
|
|
+ links[i].chan = link_conf->chandef.chan;
|
|
if (WARN_ON_ONCE(!links[i].chan))
|
|
return -EPERM;
|
|
|
|
@@ -1597,7 +1597,7 @@
|
|
link_conf = mt792x_vif_to_bss_conf(vif, link_sta->link_id);
|
|
mconf = mt792x_vif_to_link(mvif, link_sta->link_id);
|
|
chandef = mconf->mt76.ctx ? &mconf->mt76.ctx->def :
|
|
- &link_conf->chanreq.oper;
|
|
+ &link_conf->chandef;
|
|
|
|
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_PHY, sizeof(*phy));
|
|
phy = (struct sta_rec_phy *)tlv;
|
|
@@ -1675,7 +1675,7 @@
|
|
link_conf = mt792x_vif_to_bss_conf(vif, link_sta->link_id);
|
|
mconf = mt792x_vif_to_link(mvif, link_sta->link_id);
|
|
chandef = mconf->mt76.ctx ? &mconf->mt76.ctx->def :
|
|
- &link_conf->chanreq.oper;
|
|
+ &link_conf->chandef;
|
|
band = chandef->chan->band;
|
|
|
|
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra_info));
|
|
@@ -2169,7 +2169,7 @@
|
|
struct ieee80211_chanctx_conf *ctx)
|
|
{
|
|
struct cfg80211_chan_def *chandef = ctx ? &ctx->def :
|
|
- &link_conf->chanreq.oper;
|
|
+ &link_conf->chandef;
|
|
int freq1 = chandef->center_freq1, freq2 = chandef->center_freq2;
|
|
enum nl80211_band band = chandef->chan->band;
|
|
struct bss_rlm_tlv *req;
|
|
@@ -2309,7 +2309,7 @@
|
|
struct ieee80211_vif *vif = link_conf->vif;
|
|
struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
|
|
struct cfg80211_chan_def *chandef = ctx ? &ctx->def :
|
|
- &link_conf->chanreq.oper;
|
|
+ &link_conf->chandef;
|
|
enum nl80211_band band = chandef->chan->band;
|
|
struct mt76_connac_bss_basic_tlv *basic_req;
|
|
struct mt792x_link_sta *mlink;
|
|
@@ -2436,7 +2436,7 @@
|
|
struct ieee80211_bss_conf *link_conf)
|
|
{
|
|
struct cfg80211_chan_def *chandef = ctx ? &ctx->def :
|
|
- &link_conf->chanreq.oper;
|
|
+ &link_conf->chandef;
|
|
struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
|
|
enum nl80211_band band = chandef->chan->band;
|
|
struct mt76_vif *mvif = &mconf->mt76;
|
|
--- a/mt76x0/pci.c
|
|
+++ b/mt76x0/pci.c
|
|
@@ -44,7 +44,7 @@
|
|
mt76_clear(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_RX_DMA_EN);
|
|
}
|
|
|
|
-static void mt76x0e_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt76x0e_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt76x02_dev *dev = hw->priv;
|
|
|
|
@@ -59,10 +59,6 @@
|
|
}
|
|
|
|
static const struct ieee80211_ops mt76x0e_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt76x02_tx,
|
|
.start = mt76x0e_start,
|
|
.stop = mt76x0e_stop,
|
|
--- a/mt76x0/usb.c
|
|
+++ b/mt76x0/usb.c
|
|
@@ -77,7 +77,7 @@
|
|
mt76u_queues_deinit(&dev->mt76);
|
|
}
|
|
|
|
-static void mt76x0u_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt76x0u_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt76x02_dev *dev = hw->priv;
|
|
|
|
@@ -118,10 +118,6 @@
|
|
}
|
|
|
|
static const struct ieee80211_ops mt76x0u_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt76x02_tx,
|
|
.start = mt76x0u_start,
|
|
.stop = mt76x0u_stop,
|
|
--- a/mt76x2/pci_main.c
|
|
+++ b/mt76x2/pci_main.c
|
|
@@ -24,7 +24,7 @@
|
|
}
|
|
|
|
static void
|
|
-mt76x2_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+mt76x2_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt76x02_dev *dev = hw->priv;
|
|
|
|
@@ -121,10 +121,6 @@
|
|
}
|
|
|
|
const struct ieee80211_ops mt76x2_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt76x02_tx,
|
|
.start = mt76x2_start,
|
|
.stop = mt76x2_stop,
|
|
--- a/mt76x2/usb_main.c
|
|
+++ b/mt76x2/usb_main.c
|
|
@@ -22,7 +22,7 @@
|
|
return 0;
|
|
}
|
|
|
|
-static void mt76x2u_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt76x2u_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt76x02_dev *dev = hw->priv;
|
|
|
|
@@ -88,10 +88,6 @@
|
|
}
|
|
|
|
const struct ieee80211_ops mt76x2u_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt76x02_tx,
|
|
.start = mt76x2u_start,
|
|
.stop = mt76x2u_stop,
|
|
--- a/mt7603/main.c
|
|
+++ b/mt7603/main.c
|
|
@@ -23,7 +23,7 @@
|
|
}
|
|
|
|
static void
|
|
-mt7603_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+mt7603_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt7603_dev *dev = hw->priv;
|
|
|
|
@@ -694,10 +694,6 @@
|
|
}
|
|
|
|
const struct ieee80211_ops mt7603_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt7603_tx,
|
|
.start = mt7603_start,
|
|
.stop = mt7603_stop,
|
|
--- a/mt7615/main.c
|
|
+++ b/mt7615/main.c
|
|
@@ -91,7 +91,7 @@
|
|
return ret;
|
|
}
|
|
|
|
-static void mt7615_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt7615_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt7615_dev *dev = mt7615_hw_dev(hw);
|
|
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
|
@@ -1313,10 +1313,6 @@
|
|
#endif /* CONFIG_PM */
|
|
|
|
const struct ieee80211_ops mt7615_ops = {
|
|
- .add_chanctx = ieee80211_emulate_add_chanctx,
|
|
- .remove_chanctx = ieee80211_emulate_remove_chanctx,
|
|
- .change_chanctx = ieee80211_emulate_change_chanctx,
|
|
- .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
|
.tx = mt7615_tx,
|
|
.start = mt7615_start,
|
|
.stop = mt7615_stop,
|
|
--- a/mt7615/mcu.c
|
|
+++ b/mt7615/mcu.c
|
|
@@ -353,7 +353,7 @@
|
|
mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
|
{
|
|
if (vif->bss_conf.csa_active)
|
|
- ieee80211_csa_finish(vif, 0);
|
|
+ ieee80211_csa_finish(vif);
|
|
}
|
|
|
|
static void
|
|
--- a/mt7615/usb.c
|
|
+++ b/mt7615/usb.c
|
|
@@ -79,7 +79,7 @@
|
|
mutex_unlock(&usb->usb_ctrl_mtx);
|
|
}
|
|
|
|
-static void mt7663u_stop(struct ieee80211_hw *hw, bool suspend)
|
|
+static void mt7663u_stop(struct ieee80211_hw *hw)
|
|
{
|
|
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
|
struct mt7615_dev *dev = hw->priv;
|