[PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station

moradi.saeed posted 1 patch 1 month, 1 week ago
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station
Posted by moradi.saeed 1 month, 1 week ago
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
Re: [PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station
Posted by Greg Kroah-Hartman 3 weeks, 5 days ago
On Wed, Dec 31, 2025 at 10:53:41AM +0330, moradi.saeed wrote:
> 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>

Please use your name to sign off, not your email alias.

thanks,

greg k-h