staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station
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.
Signed-off-by moradi.saeed <[email protected]>
--- 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
@@ -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
Greg Kroah-Hartman
maintainerQuoted 8 lines · moradi.saeed
The cfg80211
get_stationcallback must return-ENOENTwhen station information is unavailable. The AP/Ad-Hoc path currently returns success without fillingstation_info, leading to invalid data exposure to userspace.Fix this by returning
-ENOENTfor unimplemented modes.Signed-off-by moradi.saeed <[email protected]>
Please use your name to sign off, not your email alias.
thanks,
greg k-h