public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station
@ 2025-12-31  7:23 moradi.saeed
  2026-01-11 12:47 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: moradi.saeed @ 2025-12-31  7:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Johannes Berg, Michael Straube, Dan Carpenter, linux-staging,
	linux-kernel, moradi.saeed

The cfg80211 get_station callback must return -ENOENT when
station information is unavailable. The AP/Ad-Hoc path
currently returns success without filling station_info,
leading to invalid data exposure to userspace.

Fix this by returning -ENOENT for unimplemented modes.

Signed-off-by: moradi.saeed <saeed.b.67@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 60edeae1cffe..c6562b8a59a6 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1011,7 +1011,9 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
 	     check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
 	     check_fwstate(pmlmepriv, WIFI_AP_STATE)) &&
 	    check_fwstate(pmlmepriv, _FW_LINKED)) {
-		/* TODO: should acquire station info... */
+		ret = -ENOENT;
+		goto exit;
+
 	}
 
 exit:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-11 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31  7:23 [PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station moradi.saeed
2026-01-11 12:47 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox