* [PATCH 1/2] wifi: rtw89: declare support bands with const
@ 2022-10-20 5:27 Ping-Ke Shih
2022-10-20 5:27 ` [PATCH 2/2] wifi: rtw89: 8852c: make table of RU mask constant Ping-Ke Shih
2022-11-01 9:25 ` [PATCH 1/2] wifi: rtw89: declare support bands with const Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2022-10-20 5:27 UTC (permalink / raw)
To: kvalo; +Cc: kevin_yang, linux-wireless
From: Zong-Zhe Yang <kevin_yang@realtek.com>
They are just default declarations and we won't modify them directly.
Instead, we actually do moification on their memdup now. So, they
should be declared with const.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index a0fa9639b5097..6d8243ee184c3 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -171,7 +171,7 @@ bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitr
return true;
}
-static struct ieee80211_supported_band rtw89_sband_2ghz = {
+static const struct ieee80211_supported_band rtw89_sband_2ghz = {
.band = NL80211_BAND_2GHZ,
.channels = rtw89_channels_2ghz,
.n_channels = ARRAY_SIZE(rtw89_channels_2ghz),
@@ -181,7 +181,7 @@ static struct ieee80211_supported_band rtw89_sband_2ghz = {
.vht_cap = {0},
};
-static struct ieee80211_supported_band rtw89_sband_5ghz = {
+static const struct ieee80211_supported_band rtw89_sband_5ghz = {
.band = NL80211_BAND_5GHZ,
.channels = rtw89_channels_5ghz,
.n_channels = ARRAY_SIZE(rtw89_channels_5ghz),
@@ -193,7 +193,7 @@ static struct ieee80211_supported_band rtw89_sband_5ghz = {
.vht_cap = {0},
};
-static struct ieee80211_supported_band rtw89_sband_6ghz = {
+static const struct ieee80211_supported_band rtw89_sband_6ghz = {
.band = NL80211_BAND_6GHZ,
.channels = rtw89_channels_6ghz,
.n_channels = ARRAY_SIZE(rtw89_channels_6ghz),
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] wifi: rtw89: 8852c: make table of RU mask constant
2022-10-20 5:27 [PATCH 1/2] wifi: rtw89: declare support bands with const Ping-Ke Shih
@ 2022-10-20 5:27 ` Ping-Ke Shih
2022-11-01 9:25 ` [PATCH 1/2] wifi: rtw89: declare support bands with const Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2022-10-20 5:27 UTC (permalink / raw)
To: kvalo; +Cc: kevin_yang, linux-wireless
This table must be constant, so change it as expectation.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/rtw8852c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
index f6bcac8268166..7e208a8fdf4bb 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
@@ -1683,12 +1683,12 @@ static void rtw8852c_set_channel_bb(struct rtw89_dev *rtwdev,
const struct rtw89_chan *chan,
enum rtw89_phy_idx phy_idx)
{
+ static const u32 ru_alloc_msk[2] = {B_P80_AT_HIGH_FREQ_RU_ALLOC_PHY0,
+ B_P80_AT_HIGH_FREQ_RU_ALLOC_PHY1};
struct rtw89_hal *hal = &rtwdev->hal;
bool cck_en = chan->band_type == RTW89_BAND_2G;
u8 pri_ch_idx = chan->pri_ch_idx;
u32 mask, reg;
- u32 ru_alloc_msk[2] = {B_P80_AT_HIGH_FREQ_RU_ALLOC_PHY0,
- B_P80_AT_HIGH_FREQ_RU_ALLOC_PHY1};
u8 ntx_path;
if (chan->band_type == RTW89_BAND_2G)
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] wifi: rtw89: declare support bands with const
2022-10-20 5:27 [PATCH 1/2] wifi: rtw89: declare support bands with const Ping-Ke Shih
2022-10-20 5:27 ` [PATCH 2/2] wifi: rtw89: 8852c: make table of RU mask constant Ping-Ke Shih
@ 2022-11-01 9:25 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-11-01 9:25 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: kevin_yang, linux-wireless
Ping-Ke Shih <pkshih@realtek.com> wrote:
> From: Zong-Zhe Yang <kevin_yang@realtek.com>
>
> They are just default declarations and we won't modify them directly.
> Instead, we actually do moification on their memdup now. So, they
> should be declared with const.
>
> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
2 patches applied to wireless-next.git, thanks.
a29dba478b6f wifi: rtw89: declare support bands with const
e69ae29e00ce wifi: rtw89: 8852c: make table of RU mask constant
--
https://patchwork.kernel.org/project/linux-wireless/patch/20221020052702.33988-1-pkshih@realtek.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-01 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 5:27 [PATCH 1/2] wifi: rtw89: declare support bands with const Ping-Ke Shih
2022-10-20 5:27 ` [PATCH 2/2] wifi: rtw89: 8852c: make table of RU mask constant Ping-Ke Shih
2022-11-01 9:25 ` [PATCH 1/2] wifi: rtw89: declare support bands with const Kalle Valo
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).