Skip to contentSkip to conversation

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

PATCH In review moradi.saeed 2 participants 2 messages Dec 31, 2025 – Jan 11 Staging

lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +3 -1
index 60edeae1cffe..c6562b8a59a6 100644
@@ -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:
Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · 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.

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

thanks,

greg k-h