From: "moradi.saeed" <saeed.b.67@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johannes Berg <johannes.berg@intel.com>,
Michael Straube <straube.linux@gmail.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
"moradi.saeed" <saeed.b.67@gmail.com>
Subject: [PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station
Date: Wed, 31 Dec 2025 10:53:41 +0330 [thread overview]
Message-ID: <20251231072341.61195-1-saeed.b.67@gmail.com> (raw)
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
next reply other threads:[~2025-12-31 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-31 7:23 moradi.saeed [this message]
2026-01-11 12:47 ` [PATCH] staging: rtl8723bs: return -ENOENT for AP/Ad-Hoc get_station Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251231072341.61195-1-saeed.b.67@gmail.com \
--to=saeed.b.67@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox