Commit 20249e1a authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

wifi: mt76: mt7921: move mt792x_hw_dev in mt792x.h

This is a preliminary patch to introduce WiFi7 chipset support
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c605d0ce
......@@ -110,7 +110,7 @@ mt7921_regd_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct mt792x_dev *dev = mt7921_hw_dev(hw);
struct mt792x_dev *dev = mt792x_hw_dev(hw);
memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2));
dev->mt76.region = request->dfs_region;
......
......@@ -216,14 +216,6 @@ mt7921_hw_phy(struct ieee80211_hw *hw)
return phy->priv;
}
static inline struct mt792x_dev *
mt7921_hw_dev(struct ieee80211_hw *hw)
{
struct mt76_phy *phy = hw->priv;
return container_of(phy->dev, struct mt792x_dev, mt76);
}
extern const struct ieee80211_ops mt7921_ops;
u32 mt7921_reg_map(struct mt792x_dev *dev, u32 addr);
......
......@@ -157,7 +157,7 @@ static int mt7921u_mcu_init(struct mt792x_dev *dev)
static void mt7921u_stop(struct ieee80211_hw *hw)
{
struct mt792x_dev *dev = mt7921_hw_dev(hw);
struct mt792x_dev *dev = mt792x_hw_dev(hw);
mt76u_stop_tx(&dev->mt76);
mt7921_stop(hw);
......
......@@ -126,6 +126,14 @@ struct mt792x_dev {
u32 backup_l2;
};
static inline struct mt792x_dev *
mt792x_hw_dev(struct ieee80211_hw *hw)
{
struct mt76_phy *phy = hw->priv;
return container_of(phy->dev, struct mt792x_dev, mt76);
}
#define mt792x_mutex_acquire(dev) \
mt76_connac_mutex_acquire(&(dev)->mt76, &(dev)->pm)
#define mt792x_mutex_release(dev) \
......
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