diff options
| author | Takashi Iwai <tiwai@suse.de> | 2024-11-18 14:34:54 +0100 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2024-11-18 14:34:54 +0100 | 
| commit | 1a7585c3a4504705a97c1560ff67d589b693115d (patch) | |
| tree | 8938dbb5a270dddae76e2075c2a42e31008c4714 /net/mac80211 | |
| parent | 9b4662d0df9f4433f1828904ba5e8733c1ad5158 (diff) | |
| parent | 82ff5abc2edcfba0c0f1a1be807795e2876f46e9 (diff) | |
Merge tag 'asoc-v6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.13
This release was mainly about new drivers, there's a very large batch of
new drivers and devices including quite a few from newer vendors which
is great to see.  Other than the new drivers and the usual routine fixes
and enhancements the bulk of the work has been Morimoto-san's continuing
work on simplifiying APIs, plus a few other bits:
 - More API simplifications from Morimoto-san.
 - Renaming of the sh directory to Renesas to reflect the focus on other
   architectures.
 - Factoring out of some of the common code for Realtek devices.
 - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081,
   Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307, Longsoon
   I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342, Qualcomm
   SM8750, RealTek RT721, and ST Microelectronics STM32MP25.
Diffstat (limited to 'net/mac80211')
| -rw-r--r-- | net/mac80211/Kconfig | 2 | ||||
| -rw-r--r-- | net/mac80211/cfg.c | 25 | ||||
| -rw-r--r-- | net/mac80211/ieee80211_i.h | 10 | ||||
| -rw-r--r-- | net/mac80211/key.c | 42 | ||||
| -rw-r--r-- | net/mac80211/link.c | 7 | ||||
| -rw-r--r-- | net/mac80211/main.c | 2 | 
6 files changed, 54 insertions, 34 deletions
| diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 13438cc0a6b1..cf0f7780fb10 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig @@ -96,7 +96,7 @@ config MAC80211_DEBUGFS  config MAC80211_MESSAGE_TRACING  	bool "Trace all mac80211 debug messages" -	depends on MAC80211 +	depends on MAC80211 && TRACING  	help  	  Select this option to have mac80211 register the  	  mac80211_msg trace subsystem with tracepoints to diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 847304a3a29a..6dfc61a9acd4 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3046,6 +3046,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,  	enum nl80211_tx_power_setting txp_type = type;  	bool update_txp_type = false;  	bool has_monitor = false; +	int old_power = local->user_power_level;  	lockdep_assert_wiphy(local->hw.wiphy); @@ -3128,6 +3129,10 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,  		}  	} +	if (local->emulate_chanctx && +	    (old_power != local->user_power_level)) +		ieee80211_hw_conf_chan(local); +  	return 0;  } @@ -3138,7 +3143,8 @@ static int ieee80211_get_tx_power(struct wiphy *wiphy,  	struct ieee80211_local *local = wiphy_priv(wiphy);  	struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); -	if (local->ops->get_txpower) +	if (local->ops->get_txpower && +	    (sdata->flags & IEEE80211_SDATA_IN_DRIVER))  		return drv_get_txpower(local, sdata, dbm);  	if (local->emulate_chanctx) @@ -4826,12 +4832,12 @@ void ieee80211_color_change_finalize_work(struct wiphy *wiphy,  	ieee80211_color_change_finalize(link);  } -void ieee80211_color_collision_detection_work(struct work_struct *work) +void ieee80211_color_collision_detection_work(struct wiphy *wiphy, +					      struct wiphy_work *work)  { -	struct delayed_work *delayed_work = to_delayed_work(work);  	struct ieee80211_link_data *link = -		container_of(delayed_work, struct ieee80211_link_data, -			     color_collision_detect_work); +		container_of(work, struct ieee80211_link_data, +			     color_collision_detect_work.work);  	struct ieee80211_sub_if_data *sdata = link->sdata;  	cfg80211_obss_color_collision_notify(sdata->dev, link->color_bitmap, @@ -4884,7 +4890,8 @@ ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,  		return;  	} -	if (delayed_work_pending(&link->color_collision_detect_work)) { +	if (wiphy_delayed_work_pending(sdata->local->hw.wiphy, +				       &link->color_collision_detect_work)) {  		rcu_read_unlock();  		return;  	} @@ -4893,9 +4900,9 @@ ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif,  	/* queue the color collision detection event every 500 ms in order to  	 * avoid sending too much netlink messages to userspace.  	 */ -	ieee80211_queue_delayed_work(&sdata->local->hw, -				     &link->color_collision_detect_work, -				     msecs_to_jiffies(500)); +	wiphy_delayed_work_queue(sdata->local->hw.wiphy, +				 &link->color_collision_detect_work, +				 msecs_to_jiffies(500));  	rcu_read_unlock();  } diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4f0390918b60..3d3c9139ff5e 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -892,9 +892,10 @@ struct ieee80211_chanctx {  	/* temporary data for search algorithm etc. */  	struct ieee80211_chan_req req; -	struct ieee80211_chanctx_conf conf; -  	bool radar_detected; + +	/* MUST be last - ends in a flexible-array member. */ +	struct ieee80211_chanctx_conf conf;  };  struct mac80211_qos_map { @@ -1053,7 +1054,7 @@ struct ieee80211_link_data {  	} csa;  	struct wiphy_work color_change_finalize_work; -	struct delayed_work color_collision_detect_work; +	struct wiphy_delayed_work color_collision_detect_work;  	u64 color_bitmap;  	/* context reservation -- protected with wiphy mutex */ @@ -2005,7 +2006,8 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,  /* color change handling */  void ieee80211_color_change_finalize_work(struct wiphy *wiphy,  					  struct wiphy_work *work); -void ieee80211_color_collision_detection_work(struct work_struct *work); +void ieee80211_color_collision_detection_work(struct wiphy *wiphy, +					      struct wiphy_work *work);  /* interface handling */  #define MAC80211_SUPPORTED_FEATURES_TX	(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \ diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 6fac3ba00d88..67ecfea22982 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -987,6 +987,26 @@ void ieee80211_reenable_keys(struct ieee80211_sub_if_data *sdata)  	}  } +static void +ieee80211_key_iter(struct ieee80211_hw *hw, +		   struct ieee80211_vif *vif, +		   struct ieee80211_key *key, +		   void (*iter)(struct ieee80211_hw *hw, +				struct ieee80211_vif *vif, +				struct ieee80211_sta *sta, +				struct ieee80211_key_conf *key, +				void *data), +		   void *iter_data) +{ +	/* skip keys of station in removal process */ +	if (key->sta && key->sta->removed) +		return; +	if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) +		return; +	iter(hw, vif, key->sta ? &key->sta->sta : NULL, +	     &key->conf, iter_data); +} +  void ieee80211_iter_keys(struct ieee80211_hw *hw,  			 struct ieee80211_vif *vif,  			 void (*iter)(struct ieee80211_hw *hw, @@ -1005,16 +1025,13 @@ void ieee80211_iter_keys(struct ieee80211_hw *hw,  	if (vif) {  		sdata = vif_to_sdata(vif);  		list_for_each_entry_safe(key, tmp, &sdata->key_list, list) -			iter(hw, &sdata->vif, -			     key->sta ? &key->sta->sta : NULL, -			     &key->conf, iter_data); +			ieee80211_key_iter(hw, vif, key, iter, iter_data);  	} else {  		list_for_each_entry(sdata, &local->interfaces, list)  			list_for_each_entry_safe(key, tmp,  						 &sdata->key_list, list) -				iter(hw, &sdata->vif, -				     key->sta ? &key->sta->sta : NULL, -				     &key->conf, iter_data); +				ieee80211_key_iter(hw, &sdata->vif, key, +						   iter, iter_data);  	}  }  EXPORT_SYMBOL(ieee80211_iter_keys); @@ -1031,17 +1048,8 @@ _ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,  {  	struct ieee80211_key *key; -	list_for_each_entry_rcu(key, &sdata->key_list, list) { -		/* skip keys of station in removal process */ -		if (key->sta && key->sta->removed) -			continue; -		if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) -			continue; - -		iter(hw, &sdata->vif, -		     key->sta ? &key->sta->sta : NULL, -		     &key->conf, iter_data); -	} +	list_for_each_entry_rcu(key, &sdata->key_list, list) +		ieee80211_key_iter(hw, &sdata->vif, key, iter, iter_data);  }  void ieee80211_iter_keys_rcu(struct ieee80211_hw *hw, diff --git a/net/mac80211/link.c b/net/mac80211/link.c index 0bbac64d5fa0..46092fbcde90 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -41,8 +41,8 @@ void ieee80211_link_init(struct ieee80211_sub_if_data *sdata,  			ieee80211_csa_finalize_work);  	wiphy_work_init(&link->color_change_finalize_work,  			ieee80211_color_change_finalize_work); -	INIT_DELAYED_WORK(&link->color_collision_detect_work, -			  ieee80211_color_collision_detection_work); +	wiphy_delayed_work_init(&link->color_collision_detect_work, +				ieee80211_color_collision_detection_work);  	INIT_LIST_HEAD(&link->assigned_chanctx_list);  	INIT_LIST_HEAD(&link->reserved_chanctx_list);  	wiphy_delayed_work_init(&link->dfs_cac_timer_work, @@ -72,7 +72,8 @@ void ieee80211_link_stop(struct ieee80211_link_data *link)  	if (link->sdata->vif.type == NL80211_IFTYPE_STATION)  		ieee80211_mgd_stop_link(link); -	cancel_delayed_work_sync(&link->color_collision_detect_work); +	wiphy_delayed_work_cancel(link->sdata->local->hw.wiphy, +				  &link->color_collision_detect_work);  	wiphy_work_cancel(link->sdata->local->hw.wiphy,  			  &link->color_change_finalize_work);  	wiphy_work_cancel(link->sdata->local->hw.wiphy, diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 89084690350f..ee1211a213d7 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -167,6 +167,8 @@ static u32 ieee80211_calc_hw_conf_chan(struct ieee80211_local *local,  	}  	power = ieee80211_chandef_max_power(&chandef); +	if (local->user_power_level != IEEE80211_UNSET_POWER_LEVEL) +		power = min(local->user_power_level, power);  	rcu_read_lock();  	list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 
