Commit 90c80211 authored by Johannes Berg's avatar Johannes Berg
Browse files

Merge tag 'mt76-next-2025-03-19' of https://github.com/nbd168/wireless



Felix Fietkau says:
====================
mt76 patches for 6.15

- preparation for mt7996 mlo support
- fixes
====================

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parents 3fd552b2 06cccc2e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ struct mt76_vif_link *mt76_get_vif_phy_link(struct mt76_phy *phy,
		kfree(mlink);
		return ERR_PTR(ret);
	}
	rcu_assign_pointer(mvif->offchannel_link, mlink);

	return mlink;
}
@@ -301,10 +302,12 @@ void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif,
			   struct mt76_vif_link *mlink)
{
	struct mt76_dev *dev = phy->dev;
	struct mt76_vif_data *mvif = mlink->mvif;

	if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel)
		return;

	rcu_assign_pointer(mvif->offchannel_link, NULL);
	dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink);
	kfree(mlink);
}
+4 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ int mt76_get_of_data_from_mtd(struct mt76_dev *dev, void *eep, int offset, int l

#ifdef CONFIG_NL80211_TESTMODE
	dev->test_mtd.name = devm_kstrdup(dev->dev, part, GFP_KERNEL);
	if (!dev->test_mtd.name) {
		ret = -ENOMEM;
		goto out_put_node;
	}
	dev->test_mtd.offset = offset;
#endif

+14 −2
Original line number Diff line number Diff line
@@ -816,8 +816,8 @@ void mt76_free_device(struct mt76_dev *dev)
}
EXPORT_SYMBOL_GPL(mt76_free_device);

static struct mt76_phy *
mt76_vif_phy(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
struct mt76_phy *mt76_vif_phy(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif)
{
	struct mt76_vif_link *mlink = (struct mt76_vif_link *)vif->drv_priv;
	struct mt76_chanctx *ctx;
@@ -831,6 +831,7 @@ mt76_vif_phy(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
	ctx = (struct mt76_chanctx *)mlink->ctx->drv_priv;
	return ctx->phy;
}
EXPORT_SYMBOL_GPL(mt76_vif_phy);

static void mt76_rx_release_amsdu(struct mt76_phy *phy, enum mt76_rxq_id q)
{
@@ -1697,6 +1698,17 @@ void mt76_wcid_add_poll(struct mt76_dev *dev, struct mt76_wcid *wcid)
}
EXPORT_SYMBOL_GPL(mt76_wcid_add_poll);

s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower)
{
	int n_chains = hweight16(phy->chainmask);

	txpower = mt76_get_sar_power(phy, phy->chandef.chan, txpower * 2);
	txpower -= mt76_tx_power_nss_delta(n_chains);

	return txpower;
}
EXPORT_SYMBOL_GPL(mt76_get_power_bound);

int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		     unsigned int link_id, int *dbm)
{
+8 −0
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ struct mt76_wcid {
	u8 hw_key_idx;
	u8 hw_key_idx2;

	u8 offchannel:1;
	u8 sta:1;
	u8 sta_disabled:1;
	u8 amsdu:1;
@@ -491,6 +492,7 @@ struct mt76_hw_cap {
#define MT_DRV_RX_DMA_HDR		BIT(3)
#define MT_DRV_HW_MGMT_TXQ		BIT(4)
#define MT_DRV_AMSDU_OFFLOAD		BIT(5)
#define MT_DRV_IGNORE_TXS_FAILED	BIT(6)

struct mt76_driver_ops {
	u32 drv_flags;
@@ -769,6 +771,7 @@ struct mt76_testmode_data {

struct mt76_vif_link {
	u8 idx;
	u8 link_idx;
	u8 omac_idx;
	u8 band_idx;
	u8 wmm_idx;
@@ -786,6 +789,7 @@ struct mt76_vif_link {

struct mt76_vif_data {
	struct mt76_vif_link __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS];
	struct mt76_vif_link __rcu *offchannel_link;

	struct mt76_phy *roc_phy;
	u16 valid_links;
@@ -1224,6 +1228,8 @@ struct mt76_phy *mt76_alloc_phy(struct mt76_dev *dev, unsigned int size,
				u8 band_idx);
int mt76_register_phy(struct mt76_phy *phy, bool vht,
		      struct ieee80211_rate *rates, int n_rates);
struct mt76_phy *mt76_vif_phy(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif);

struct dentry *mt76_register_debugfs_fops(struct mt76_phy *phy,
					  const struct file_operations *ops);
@@ -1482,6 +1488,8 @@ void mt76_sta_pre_rcu_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,

int mt76_get_min_avg_rssi(struct mt76_dev *dev, u8 phy_idx);

s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower);

int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		     unsigned int link_id, int *dbm);
int mt76_init_sar_power(struct ieee80211_hw *hw,
+3 −0
Original line number Diff line number Diff line
@@ -314,6 +314,9 @@ enum tx_frag_idx {
#define MT_TXFREE_INFO_COUNT		GENMASK(27, 24)
#define MT_TXFREE_INFO_STAT		GENMASK(29, 28)

#define MT_TXS_HDR_SIZE			4 /* Unit: DW */
#define MT_TXS_SIZE			12 /* Unit: DW */

#define MT_TXS0_BW			GENMASK(31, 29)
#define MT_TXS0_TID			GENMASK(28, 26)
#define MT_TXS0_AMPDU			BIT(25)
Loading