* [PATCH wireless-next] wifi: mac80211: remove ieee80211_sta_ps_transition() return value
@ 2026-08-02 21:18 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2026-08-02 21:18 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
Nothing cares, so no point calculating it. Also simplify
the "no need to do anything" check and fix some docs that
should refer to this function instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/net/mac80211.h | 18 +++++-------------
net/mac80211/rx.c | 8 +++-----
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9d1fac6e8082..638b8aa5214d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2919,8 +2919,8 @@ struct ieee80211_txq {
* autonomously manages the PS status of connected stations. When
* this flag is set mac80211 will not trigger PS mode for connected
* stations based on the PM bit of incoming frames.
- * Use ieee80211_start_ps()/ieee8021_end_ps() to manually configure
- * the PS mode of connected stations.
+ * Use ieee80211_sta_ps_transition() to manually toggle the PS mode
+ * of connected stations.
*
* @IEEE80211_HW_TX_AMPDU_SETUP_IN_HW: The device handles TX A-MPDU session
* setup strictly in HW. mac80211 should not attempt to do this in
@@ -5499,10 +5499,8 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
*
* @sta: currently connected sta
* @start: start or stop PS
- *
- * Return: 0 on success. -EINVAL when the requested PS mode is already set.
*/
-int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
+void ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
/**
* ieee80211_sta_ps_transition_ni - PS transition for connected sta
@@ -5514,19 +5512,13 @@ int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
*
* @sta: currently connected sta
* @start: start or stop PS
- *
- * Return: Like ieee80211_sta_ps_transition().
*/
-static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
+static inline void ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
bool start)
{
- int ret;
-
local_bh_disable();
- ret = ieee80211_sta_ps_transition(sta, start);
+ ieee80211_sta_ps_transition(sta, start);
local_bh_enable();
-
- return ret;
}
/**
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5e26be8e27d8..40ed03a775ba 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1744,7 +1744,7 @@ static void sta_ps_end(struct sta_info *sta)
ieee80211_sta_ps_deliver_wakeup(sta);
}
-int ieee80211_sta_ps_transition(struct ieee80211_sta *pubsta, bool start)
+void ieee80211_sta_ps_transition(struct ieee80211_sta *pubsta, bool start)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
bool in_ps;
@@ -1753,15 +1753,13 @@ int ieee80211_sta_ps_transition(struct ieee80211_sta *pubsta, bool start)
/* Don't let the same PS state be set twice */
in_ps = test_sta_flag(sta, WLAN_STA_PS_STA);
- if ((start && in_ps) || (!start && !in_ps))
- return -EINVAL;
+ if (start == in_ps)
+ return;
if (start)
sta_ps_start(sta);
else
sta_ps_end(sta);
-
- return 0;
}
EXPORT_SYMBOL(ieee80211_sta_ps_transition);
--
2.55.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-02 21:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-02 21:18 [PATCH wireless-next] wifi: mac80211: remove ieee80211_sta_ps_transition() return value Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).