Commit 56d2f48e authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Kalle Valo says:

====================
wireless fixes for v6.9-rc2

The first fixes for v6.9. Ping-Ke Shih now maintains a separate tree
for Realtek drivers, document that in the MAINTAINERS. Plenty of fixes
for both to stack and iwlwifi. Our kunit tests were working only on um
architecture but that's fixed now.

* tag 'wireless-2024-03-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (21 commits)
  MAINTAINERS: wifi: mwifiex: add Francesco as reviewer
  kunit: fix wireless test dependencies
  wifi: iwlwifi: mvm: include link ID when releasing frames
  wifi: iwlwifi: mvm: handle debugfs names more carefully
  wifi: iwlwifi: mvm: guard against invalid STA ID on removal
  wifi: iwlwifi: read txq->read_ptr under lock
  wifi: iwlwifi: fw: don't always use FW dump trig
  wifi: iwlwifi: mvm: rfi: fix potential response leaks
  wifi: mac80211: correctly set active links upon TTLM
  wifi: iwlwifi: mvm: Configure the link mapping for non-MLD FW
  wifi: iwlwifi: mvm: consider having one active link
  wifi: iwlwifi: mvm: pick the version of SESSION_PROTECTION_NOTIF
  wifi: mac80211: fix prep_connection error path
  wifi: cfg80211: fix rdev_dump_mpp() arguments order
  wifi: iwlwifi: mvm: disable MLO for the time being
  wifi: cfg80211: add a flag to disable wireless extensions
  wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
  wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes
  wifi: mac80211: fix mlme_link_id_dbg()
  MAINTAINERS: wifi: add git tree for Realtek WiFi drivers
  ...
====================

Link: https://lore.kernel.org/r/20240327191346.1A1EAC433C7@smtp.kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents afbf75e8 8ea3f4f1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -13133,6 +13133,7 @@ F: drivers/net/ethernet/marvell/mvpp2/
MARVELL MWIFIEX WIRELESS DRIVER
M:	Brian Norris <briannorris@chromium.org>
R:	Francesco Dolcini <francesco@dolcini.it>
L:	linux-wireless@vger.kernel.org
S:	Odd Fixes
F:	drivers/net/wireless/marvell/mwifiex/
@@ -18642,18 +18643,21 @@ REALTEK WIRELESS DRIVER (rtlwifi family)
M:	Ping-Ke Shih <pkshih@realtek.com>
L:	linux-wireless@vger.kernel.org
S:	Maintained
T:	git https://github.com/pkshih/rtw.git
F:	drivers/net/wireless/realtek/rtlwifi/
REALTEK WIRELESS DRIVER (rtw88)
M:	Ping-Ke Shih <pkshih@realtek.com>
L:	linux-wireless@vger.kernel.org
S:	Maintained
T:	git https://github.com/pkshih/rtw.git
F:	drivers/net/wireless/realtek/rtw88/
REALTEK WIRELESS DRIVER (rtw89)
M:	Ping-Ke Shih <pkshih@realtek.com>
L:	linux-wireless@vger.kernel.org
S:	Maintained
T:	git https://github.com/pkshih/rtw.git
F:	drivers/net/wireless/realtek/rtw89/
REDPINE WIRELESS DRIVER
@@ -19197,12 +19201,14 @@ M: Hin-Tak Leung <hintak.leung@gmail.com>
M:	Larry Finger <Larry.Finger@lwfinger.net>
L:	linux-wireless@vger.kernel.org
S:	Maintained
T:	git https://github.com/pkshih/rtw.git
F:	drivers/net/wireless/realtek/rtl818x/rtl8187/
RTL8XXXU WIRELESS DRIVER (rtl8xxxu)
M:	Jes Sorensen <Jes.Sorensen@gmail.com>
L:	linux-wireless@vger.kernel.org
S:	Maintained
T:	git https://github.com/pkshih/rtw.git
F:	drivers/net/wireless/realtek/rtl8xxxu/
RTRS TRANSPORT DRIVERS
+8 −7
Original line number Diff line number Diff line
@@ -3081,8 +3081,6 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
	struct iwl_fw_dbg_params params = {0};
	struct iwl_fwrt_dump_data *dump_data =
		&fwrt->dump.wks[wk_idx].dump_data;
	u32 policy;
	u32 time_point;
	if (!test_bit(wk_idx, &fwrt->dump.active_wks))
		return;

@@ -3113,13 +3111,16 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)

	iwl_fw_dbg_stop_restart_recording(fwrt, &params, false);

	policy = le32_to_cpu(dump_data->trig->apply_policy);
	time_point = le32_to_cpu(dump_data->trig->time_point);
	if (iwl_trans_dbg_ini_valid(fwrt->trans)) {
		u32 policy = le32_to_cpu(dump_data->trig->apply_policy);
		u32 time_point = le32_to_cpu(dump_data->trig->time_point);

		if (policy & IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD) {
			IWL_DEBUG_FW_INFO(fwrt, "WRT: sending dump complete\n");
			iwl_send_dbg_dump_complete_cmd(fwrt, time_point, 0);
		}
	}

	if (fwrt->trans->dbg.last_tp_resetfw == IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY)
		iwl_force_nmi(fwrt->trans);

+9 −7
Original line number Diff line number Diff line
@@ -1260,14 +1260,14 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
	if (IS_ERR_OR_NULL(vif))
		return 1;

	if (ieee80211_vif_is_mld(vif) && vif->cfg.assoc) {
	if (hweight16(vif->active_links) > 1) {
		/*
		 * Select the 'best' link. May need to revisit, it seems
		 * better to not optimize for throughput but rather range,
		 * reliability and power here - and select 2.4 GHz ...
		 * Select the 'best' link.
		 * May need to revisit, it seems better to not optimize
		 * for throughput but rather range, reliability and
		 * power here - and select 2.4 GHz ...
		 */
		primary_link =
			iwl_mvm_mld_get_primary_link(mvm, vif,
		primary_link = iwl_mvm_mld_get_primary_link(mvm, vif,
							    vif->active_links);

		if (WARN_ONCE(primary_link < 0, "no primary link in 0x%x\n",
@@ -1277,6 +1277,8 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
		ret = ieee80211_set_active_links(vif, BIT(primary_link));
		if (ret)
			return ret;
	} else if (vif->active_links) {
		primary_link = __ffs(vif->active_links);
	} else {
		primary_link = 0;
	}
+7 −4
Original line number Diff line number Diff line
@@ -748,7 +748,9 @@ void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
{
	struct dentry *dbgfs_dir = vif->debugfs_dir;
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	char buf[100];
	char buf[3 * 3 + 11 + (NL80211_WIPHY_NAME_MAXLEN + 1) +
		 (7 + IFNAMSIZ + 1) + 6 + 1];
	char name[7 + IFNAMSIZ + 1];

	/* this will happen in monitor mode */
	if (!dbgfs_dir)
@@ -761,10 +763,11 @@ void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
	 * find
	 * netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/
	 */
	snprintf(buf, 100, "../../../%pd3/iwlmvm", dbgfs_dir);
	snprintf(name, sizeof(name), "%pd", dbgfs_dir);
	snprintf(buf, sizeof(buf), "../../../%pd3/iwlmvm", dbgfs_dir);

	mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name,
						     mvm->debugfs_dir, buf);
	mvmvif->dbgfs_slink =
		debugfs_create_symlink(name, mvm->debugfs_dir, buf);
}

void iwl_mvm_vif_dbgfs_rm_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
+45 −14
Original line number Diff line number Diff line
@@ -46,6 +46,27 @@ static int iwl_mvm_link_cmd_send(struct iwl_mvm *mvm,
	return ret;
}

int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
			     struct ieee80211_bss_conf *link_conf)
{
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	struct iwl_mvm_vif_link_info *link_info =
		mvmvif->link[link_conf->link_id];

	if (link_info->fw_link_id == IWL_MVM_FW_LINK_ID_INVALID) {
		link_info->fw_link_id = iwl_mvm_get_free_fw_link_id(mvm,
								    mvmvif);
		if (link_info->fw_link_id >=
		    ARRAY_SIZE(mvm->link_id_to_link_conf))
			return -EINVAL;

		rcu_assign_pointer(mvm->link_id_to_link_conf[link_info->fw_link_id],
				   link_conf);
	}

	return 0;
}

int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
		     struct ieee80211_bss_conf *link_conf)
{
@@ -55,19 +76,14 @@ int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
	struct iwl_link_config_cmd cmd = {};
	unsigned int cmd_id = WIDE_ID(MAC_CONF_GROUP, LINK_CONFIG_CMD);
	u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 1);
	int ret;

	if (WARN_ON_ONCE(!link_info))
		return -EINVAL;

	if (link_info->fw_link_id == IWL_MVM_FW_LINK_ID_INVALID) {
		link_info->fw_link_id = iwl_mvm_get_free_fw_link_id(mvm,
								    mvmvif);
		if (link_info->fw_link_id >= ARRAY_SIZE(mvm->link_id_to_link_conf))
			return -EINVAL;

		rcu_assign_pointer(mvm->link_id_to_link_conf[link_info->fw_link_id],
				   link_conf);
	}
	ret = iwl_mvm_set_link_mapping(mvm, vif, link_conf);
	if (ret)
		return ret;

	/* Update SF - Disable if needed. if this fails, SF might still be on
	 * while many macs are bound, which is forbidden - so fail the binding.
@@ -248,6 +264,24 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
	return ret;
}

int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
			       struct ieee80211_bss_conf *link_conf)
{
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	struct iwl_mvm_vif_link_info *link_info =
		mvmvif->link[link_conf->link_id];

	/* mac80211 thought we have the link, but it was never configured */
	if (WARN_ON(!link_info ||
		    link_info->fw_link_id >=
		    ARRAY_SIZE(mvm->link_id_to_link_conf)))
		return -EINVAL;

	RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id],
			 NULL);
	return 0;
}

int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
			struct ieee80211_bss_conf *link_conf)
{
@@ -257,13 +291,10 @@ int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
	struct iwl_link_config_cmd cmd = {};
	int ret;

	/* mac80211 thought we have the link, but it was never configured */
	if (WARN_ON(!link_info ||
		    link_info->fw_link_id >= ARRAY_SIZE(mvm->link_id_to_link_conf)))
	ret = iwl_mvm_unset_link_mapping(mvm, vif, link_conf);
	if (ret)
		return 0;

	RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id],
			 NULL);
	cmd.link_id = cpu_to_le32(link_info->fw_link_id);
	iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id);
	link_info->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
Loading