* [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
@ 2021-08-25 18:31 Kees Cook
2021-08-26 0:45 ` Pkshih
0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2021-08-25 18:31 UTC (permalink / raw)
To: Ping-Ke Shih
Cc: Kees Cook, Kalle Valo, David S. Miller, Jakub Kicinski,
Larry Finger, Colin Ian King, Kaixu Xia, Joe Perches,
linux-wireless, netdev, linux-kernel, linux-hardening
2G channel indexes still need "place" to be initialized, since it is
returned from this function when channel is less than 14.
Fixes: 369956ae5720 ("rtlwifi: rtl8192de: Remove redundant variable initializations")
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Kaixu Xia <kaixuxia@tencent.com>
Cc: Joe Perches <joe@perches.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
index 8ae69d914312..b32fa7a75f17 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
@@ -896,7 +896,7 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw,
static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
{
- u8 place;
+ u8 place = chnl;
if (chnl > 14) {
for (place = 14; place < sizeof(channel5g); place++) {
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
2021-08-25 18:31 [PATCH] rtlwifi: rtl8192de: Restore channel index initialization Kees Cook
@ 2021-08-26 0:45 ` Pkshih
2021-08-26 2:36 ` Kees Cook
0 siblings, 1 reply; 4+ messages in thread
From: Pkshih @ 2021-08-26 0:45 UTC (permalink / raw)
To: Kees Cook
Cc: Kalle Valo, David S. Miller, Jakub Kicinski, Larry Finger,
Colin Ian King, Kaixu Xia, Joe Perches, linux-wireless, netdev,
linux-kernel, linux-hardening
> -----Original Message-----
> From: Kees Cook [mailto:keescook@chromium.org]
> Sent: Thursday, August 26, 2021 2:31 AM
> To: Pkshih
> Cc: Kees Cook; Kalle Valo; David S. Miller; Jakub Kicinski; Larry Finger; Colin Ian King; Kaixu Xia;
> Joe Perches; linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-hardening@vger.kernel.org
> Subject: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
>
> 2G channel indexes still need "place" to be initialized, since it is
> returned from this function when channel is less than 14.
>
> Fixes: 369956ae5720 ("rtlwifi: rtl8192de: Remove redundant variable initializations")
Like the patch "rtlwifi: rtl8192de: Fix initialization of place in _rtl92c_phy_get_rightchnlplace()"
you sent before, please help to correct the removal of the commit 369956ae5720.
I think we can add following into this patch.
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
@@ -1363,7 +1363,7 @@ static void _rtl92d_phy_switch_rf_setting(struct ieee80211_hw *hw, u8 channel)
u8 rtl92d_get_rightchnlplace_for_iqk(u8 chnl)
{
- u8 place = chnl;
+ u8 place;
if (chnl > 14) {
for (place = 14; place < sizeof(channel_all); place++) {
> Cc: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Colin Ian King <colin.king@canonical.com>
> Cc: Kaixu Xia <kaixuxia@tencent.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> index 8ae69d914312..b32fa7a75f17 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> @@ -896,7 +896,7 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw,
>
> static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
> {
> - u8 place;
> + u8 place = chnl;
>
> if (chnl > 14) {
> for (place = 14; place < sizeof(channel5g); place++) {
--
Ping-Ke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
2021-08-26 0:45 ` Pkshih
@ 2021-08-26 2:36 ` Kees Cook
2021-08-26 3:48 ` Pkshih
0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2021-08-26 2:36 UTC (permalink / raw)
To: Pkshih
Cc: Kalle Valo, David S. Miller, Jakub Kicinski, Larry Finger,
Colin Ian King, Kaixu Xia, Joe Perches, linux-wireless, netdev,
linux-kernel, linux-hardening
On Thu, Aug 26, 2021 at 12:45:53AM +0000, Pkshih wrote:
>
>
> > -----Original Message-----
> > From: Kees Cook [mailto:keescook@chromium.org]
> > Sent: Thursday, August 26, 2021 2:31 AM
> > To: Pkshih
> > Cc: Kees Cook; Kalle Valo; David S. Miller; Jakub Kicinski; Larry Finger; Colin Ian King; Kaixu Xia;
> > Joe Perches; linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> > linux-hardening@vger.kernel.org
> > Subject: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
> >
> > 2G channel indexes still need "place" to be initialized, since it is
> > returned from this function when channel is less than 14.
> >
> > Fixes: 369956ae5720 ("rtlwifi: rtl8192de: Remove redundant variable initializations")
>
> Like the patch "rtlwifi: rtl8192de: Fix initialization of place in _rtl92c_phy_get_rightchnlplace()"
> you sent before, please help to correct the removal of the commit 369956ae5720.
> I think we can add following into this patch.
>
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> @@ -1363,7 +1363,7 @@ static void _rtl92d_phy_switch_rf_setting(struct ieee80211_hw *hw, u8 channel)
>
> u8 rtl92d_get_rightchnlplace_for_iqk(u8 chnl)
> {
> - u8 place = chnl;
> + u8 place;
>
> if (chnl > 14) {
> for (place = 14; place < sizeof(channel_all); place++) {
Oh, er, it looks like Nathan found this before me, yes. I think
https://lore.kernel.org/linux-wireless/20210823222014.764557-1-nathan@kernel.org/
is the complete patch.
-Kees
>
> > Cc: Ping-Ke Shih <pkshih@realtek.com>
> > Cc: Kalle Valo <kvalo@codeaurora.org>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > Cc: Larry Finger <Larry.Finger@lwfinger.net>
> > Cc: Colin Ian King <colin.king@canonical.com>
> > Cc: Kaixu Xia <kaixuxia@tencent.com>
> > Cc: Joe Perches <joe@perches.com>
> > Cc: linux-wireless@vger.kernel.org
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > ---
> > drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> > b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> > index 8ae69d914312..b32fa7a75f17 100644
> > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> > @@ -896,7 +896,7 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw,
> >
> > static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
> > {
> > - u8 place;
> > + u8 place = chnl;
> >
> > if (chnl > 14) {
> > for (place = 14; place < sizeof(channel5g); place++) {
>
> --
> Ping-Ke
>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
2021-08-26 2:36 ` Kees Cook
@ 2021-08-26 3:48 ` Pkshih
0 siblings, 0 replies; 4+ messages in thread
From: Pkshih @ 2021-08-26 3:48 UTC (permalink / raw)
To: Kees Cook
Cc: Kalle Valo, David S. Miller, Jakub Kicinski, Larry Finger,
Colin Ian King, Kaixu Xia, Joe Perches, linux-wireless, netdev,
linux-kernel, linux-hardening
> -----Original Message-----
> From: Kees Cook [mailto:keescook@chromium.org]
> Sent: Thursday, August 26, 2021 10:36 AM
> To: Pkshih
> Cc: Kalle Valo; David S. Miller; Jakub Kicinski; Larry Finger; Colin Ian King; Kaixu Xia; Joe Perches;
> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-hardening@vger.kernel.org
> Subject: Re: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
>
> On Thu, Aug 26, 2021 at 12:45:53AM +0000, Pkshih wrote:
> >
> >
> > > -----Original Message-----
> > > From: Kees Cook [mailto:keescook@chromium.org]
> > > Sent: Thursday, August 26, 2021 2:31 AM
> > > To: Pkshih
> > > Cc: Kees Cook; Kalle Valo; David S. Miller; Jakub Kicinski; Larry Finger; Colin Ian King; Kaixu
> Xia;
> > > Joe Perches; linux-wireless@vger.kernel.org; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org;
> > > linux-hardening@vger.kernel.org
> > > Subject: [PATCH] rtlwifi: rtl8192de: Restore channel index initialization
> > >
> > > 2G channel indexes still need "place" to be initialized, since it is
> > > returned from this function when channel is less than 14.
> > >
> > > Fixes: 369956ae5720 ("rtlwifi: rtl8192de: Remove redundant variable initializations")
> >
> > Like the patch "rtlwifi: rtl8192de: Fix initialization of place in _rtl92c_phy_get_rightchnlplace()"
> > you sent before, please help to correct the removal of the commit 369956ae5720.
> > I think we can add following into this patch.
> >
> > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
> > @@ -1363,7 +1363,7 @@ static void _rtl92d_phy_switch_rf_setting(struct ieee80211_hw *hw, u8 channel)
> >
> > u8 rtl92d_get_rightchnlplace_for_iqk(u8 chnl)
> > {
> > - u8 place = chnl;
> > + u8 place;
> >
> > if (chnl > 14) {
> > for (place = 14; place < sizeof(channel_all); place++) {
>
> Oh, er, it looks like Nathan found this before me, yes. I think
> https://lore.kernel.org/linux-wireless/20210823222014.764557-1-nathan@kernel.org/
> is the complete patch.
>
Oops. Sorry, I misread the author who isn't you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-26 3:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 18:31 [PATCH] rtlwifi: rtl8192de: Restore channel index initialization Kees Cook
2021-08-26 0:45 ` Pkshih
2021-08-26 2:36 ` Kees Cook
2021-08-26 3:48 ` Pkshih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).