Commit 1afe4a64 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Johannes Berg says:

====================
Various fixes:
 * cfg80211: wext scan
 * mac80211: monitor regression, scan counted_by, offload
 * iwlwifi: locking, 6 GHz scan, remain-on-channel

* tag 'wireless-2024-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless:
  wifi: mac80211: fix monitor channel with chanctx emulation
  wifi: mac80211: Avoid address calculations via out of bounds array indexing
  wifi: mac80211: Recalc offload when monitor stop
  wifi: iwlwifi: scan: correctly check if PSC listen period is needed
  wifi: iwlwifi: mvm: fix ROC version check
  wifi: iwlwifi: mvm: unlock mvm mutex
  wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
  wifi: cfg80211: wext: set ssids=NULL for passive scans
====================

Link: https://lore.kernel.org/r/20240614085710.24103-3-johannes@sipsolutions.net


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 89aa3619 0d9c2bee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4795,7 +4795,7 @@ static int iwl_mvm_roc_station(struct iwl_mvm *mvm,

	if (fw_ver == IWL_FW_CMD_VER_UNKNOWN) {
		ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, vif, duration);
	} else if (fw_ver == 3) {
	} else if (fw_ver >= 3) {
		ret = iwl_mvm_roc_add_cmd(mvm, channel, vif, duration,
					  ROC_ACTIVITY_HOTSPOT);
	} else {
+1 −1
Original line number Diff line number Diff line
@@ -1830,7 +1830,7 @@ iwl_mvm_umac_scan_cfg_channels_v7_6g(struct iwl_mvm *mvm,
		 */
		if (!iwl_mvm_is_scan_fragmented(params->type)) {
			if (!cfg80211_channel_is_psc(params->channels[i]) ||
			    flags & IWL_UHB_CHAN_CFG_FLAG_PSC_CHAN_NO_LISTEN) {
			    psc_no_listen) {
				if (unsolicited_probe_on_chan) {
					max_s_ssids = 2;
					max_bssids = 6;
+2 −0
Original line number Diff line number Diff line
@@ -1238,6 +1238,7 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
			if (te_data->id >= SESSION_PROTECT_CONF_MAX_ID) {
				IWL_DEBUG_TE(mvm,
					     "No remain on channel event\n");
				mutex_unlock(&mvm->mutex);
				return;
			}

@@ -1253,6 +1254,7 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
	te_data = iwl_mvm_get_roc_te(mvm);
	if (!te_data) {
		IWL_WARN(mvm, "No remain on channel event\n");
		mutex_unlock(&mvm->mutex);
		return;
	}

+17 −0
Original line number Diff line number Diff line
@@ -311,6 +311,18 @@ int drv_assign_vif_chanctx(struct ieee80211_local *local,
	might_sleep();
	lockdep_assert_wiphy(local->hw.wiphy);

	/*
	 * We should perhaps push emulate chanctx down and only
	 * make it call ->config() when the chanctx is actually
	 * assigned here (and unassigned below), but that's yet
	 * another change to all drivers to add assign/unassign
	 * emulation callbacks. Maybe later.
	 */
	if (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
	    local->emulate_chanctx &&
	    !ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
		return 0;

	if (!check_sdata_in_driver(sdata))
		return -EIO;

@@ -338,6 +350,11 @@ void drv_unassign_vif_chanctx(struct ieee80211_local *local,
	might_sleep();
	lockdep_assert_wiphy(local->hw.wiphy);

	if (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
	    local->emulate_chanctx &&
	    !ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
		return;

	if (!check_sdata_in_driver(sdata))
		return;

+10 −12
Original line number Diff line number Diff line
@@ -686,6 +686,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
			ieee80211_del_virtual_monitor(local);

		ieee80211_recalc_idle(local);
		ieee80211_recalc_offload(local);

		if (!(sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE))
			break;
@@ -1121,9 +1122,6 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local)
	struct ieee80211_sub_if_data *sdata;
	int ret;

	if (!ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
		return 0;

	ASSERT_RTNL();
	lockdep_assert_wiphy(local->hw.wiphy);

@@ -1145,12 +1143,14 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local)

	ieee80211_set_default_queues(sdata);

	if (ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
		ret = drv_add_interface(local, sdata);
		if (WARN_ON(ret)) {
			/* ok .. stupid driver, it asked for this! */
			kfree(sdata);
			return ret;
		}
	}

	set_bit(SDATA_STATE_RUNNING, &sdata->state);

@@ -1187,9 +1187,6 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local)
{
	struct ieee80211_sub_if_data *sdata;

	if (!ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
		return;

	ASSERT_RTNL();
	lockdep_assert_wiphy(local->hw.wiphy);

@@ -1209,6 +1206,7 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local)

	ieee80211_link_release_channel(&sdata->deflink);

	if (ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
		drv_remove_interface(local, sdata);

	kfree(sdata);
Loading