From: Greg KH <gregkh@linuxfoundation.org>
To: Lucas Jeffrey <luquijeffrey@gmail.com>
Cc: johannes.berg@intel.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: handle key setup failures
Date: Tue, 1 Sep 2026 11:39:49 +0200 [thread overview]
Message-ID: <2026090132-armoire-musket-14d7@gregkh> (raw)
In-Reply-To: <20260803004919.901586-1-luquijeffrey@gmail.com>
On Sun, Aug 02, 2026 at 09:49:19PM -0300, Lucas Jeffrey wrote:
> The return values from key setup helpers were ignored in
> rtw_cfg80211_ap_set_encryption().
>
> Propagate failures from rtw_ap_set_wep_key(),
> rtw_ap_set_group_key(), and rtw_ap_set_pairwise_key() back to
> cfg80211 instead of continuing after an unsuccessful key setup.
>
> This avoids silently reporting success when the key setup command
> could not be queued or helper functions fail to allocate memory.
>
> Signed-off-by: Lucas Jeffrey <luquijeffrey@gmail.com>
> ---
> .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index 967cd1b34aed..8e5aa036d5eb 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -563,7 +563,9 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
>
> psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len;
>
> - rtw_ap_set_wep_key(padapter, param->u.crypt.key, wep_key_len, wep_key_idx, 1);
> + if (rtw_ap_set_wep_key(padapter, param->u.crypt.key, wep_key_len, wep_key_idx, 1) == _FAIL)
> + ret = -EIO;
> +
Why the extra blank line?
thanks,
greg k-h
prev parent reply other threads:[~2026-09-01 9:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 0:49 Lucas Jeffrey
2026-09-01 9:39 ` Greg KH [this message]
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=2026090132-armoire-musket-14d7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=luquijeffrey@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
all inboxes | Powered by JetHome®