* [PATCH AUTOSEL 4.19 06/68] brcmutil: really fix decoding channel info for 160 MHz bandwidth
[not found] <20181129055559.159228-1-sashal@kernel.org>
@ 2018-11-29 5:54 ` Sasha Levin
2018-11-29 11:49 ` Kalle Valo
2018-11-29 5:54 ` [PATCH AUTOSEL 4.19 07/68] mt76: fix building without CONFIG_LEDS_CLASS Sasha Levin
1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2018-11-29 5:54 UTC (permalink / raw)
To: stable, linux-kernel
Cc: Rafał Miłecki, Kalle Valo, Sasha Levin, linux-wireless,
brcm80211-dev-list.pdl, brcm80211-dev-list, netdev
From: Rafał Miłecki <rafal@milecki.pl>
[ Upstream commit 3401d42c7ea2d064d15c66698ff8eb96553179ce ]
Previous commit /adding/ support for 160 MHz chanspecs was incomplete.
It didn't set bandwidth info and didn't extract control channel info. As
the result it was also using uninitialized "sb" var.
This change has been tested for two chanspecs found to be reported by
some devices/firmwares:
1) 60/160 (0xee32)
Before: chnum:50 control_ch_num:36
After: chnum:50 control_ch_num:60
2) 120/160 (0xed72)
Before: chnum:114 control_ch_num:100
After: chnum:114 control_ch_num:120
Fixes: 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
index e7584b842dce..eb5db94f5745 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
@@ -193,6 +193,9 @@ static void brcmu_d11ac_decchspec(struct brcmu_chan *ch)
}
break;
case BRCMU_CHSPEC_D11AC_BW_160:
+ ch->bw = BRCMU_CHAN_BW_160;
+ ch->sb = brcmu_maskget16(ch->chspec, BRCMU_CHSPEC_D11AC_SB_MASK,
+ BRCMU_CHSPEC_D11AC_SB_SHIFT);
switch (ch->sb) {
case BRCMU_CHAN_SB_LLL:
ch->control_ch_num -= CH_70MHZ_APART;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 4.19 07/68] mt76: fix building without CONFIG_LEDS_CLASS
[not found] <20181129055559.159228-1-sashal@kernel.org>
2018-11-29 5:54 ` [PATCH AUTOSEL 4.19 06/68] brcmutil: really fix decoding channel info for 160 MHz bandwidth Sasha Levin
@ 2018-11-29 5:54 ` Sasha Levin
1 sibling, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2018-11-29 5:54 UTC (permalink / raw)
To: stable, linux-kernel
Cc: Arnd Bergmann, Lorenzo Bianconi, Kalle Valo, Sasha Levin,
linux-wireless, netdev
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit b374e8686fc35ae124e62dc78725ea656ba1ef8a ]
When CONFIG_LEDS_CLASS is disabled, or it is a loadable module while
mt76 is built-in, we run into a link error:
drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_register_device':
mac80211.c:(.text+0xb78): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_of_led_classdev_register'
We don't really need a hard dependency here as the driver can presumably
work just fine without LEDs, so this follows the iwlwifi example and
adds a separate Kconfig option for the LED support, this will be available
whenever it will link, and otherwise the respective code gets left out from
the driver object.
Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/mediatek/mt76/Kconfig | 6 ++++++
drivers/net/wireless/mediatek/mt76/mac80211.c | 8 +++++---
drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 6 ++++--
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
index b6c5f17dca30..27826217ff76 100644
--- a/drivers/net/wireless/mediatek/mt76/Kconfig
+++ b/drivers/net/wireless/mediatek/mt76/Kconfig
@@ -1,6 +1,12 @@
config MT76_CORE
tristate
+config MT76_LEDS
+ bool
+ depends on MT76_CORE
+ depends on LEDS_CLASS=y || MT76_CORE=LEDS_CLASS
+ default y
+
config MT76_USB
tristate
depends on MT76_CORE
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 029d54bce9e8..ade4a2029a24 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -342,9 +342,11 @@ int mt76_register_device(struct mt76_dev *dev, bool vht,
mt76_check_sband(dev, NL80211_BAND_2GHZ);
mt76_check_sband(dev, NL80211_BAND_5GHZ);
- ret = mt76_led_init(dev);
- if (ret)
- return ret;
+ if (IS_ENABLED(CONFIG_MT76_LEDS)) {
+ ret = mt76_led_init(dev);
+ if (ret)
+ return ret;
+ }
return ieee80211_register_hw(hw);
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
index b814391f79ac..03b103c45d69 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
@@ -581,8 +581,10 @@ int mt76x2_register_device(struct mt76x2_dev *dev)
mt76x2_dfs_init_detector(dev);
/* init led callbacks */
- dev->mt76.led_cdev.brightness_set = mt76x2_led_set_brightness;
- dev->mt76.led_cdev.blink_set = mt76x2_led_set_blink;
+ if (IS_ENABLED(CONFIG_MT76_LEDS)) {
+ dev->mt76.led_cdev.brightness_set = mt76x2_led_set_brightness;
+ dev->mt76.led_cdev.blink_set = mt76x2_led_set_blink;
+ }
ret = mt76_register_device(&dev->mt76, true, mt76x2_rates,
ARRAY_SIZE(mt76x2_rates));
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH AUTOSEL 4.19 06/68] brcmutil: really fix decoding channel info for 160 MHz bandwidth
2018-11-29 5:54 ` [PATCH AUTOSEL 4.19 06/68] brcmutil: really fix decoding channel info for 160 MHz bandwidth Sasha Levin
@ 2018-11-29 11:49 ` Kalle Valo
2018-11-29 16:54 ` Sasha Levin
0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2018-11-29 11:49 UTC (permalink / raw)
To: Sasha Levin
Cc: stable, linux-kernel, Rafał Miłecki, linux-wireless,
brcm80211-dev-list.pdl, brcm80211-dev-list, netdev
Sasha Levin <sashal@kernel.org> writes:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> [ Upstream commit 3401d42c7ea2d064d15c66698ff8eb96553179ce ]
>
> Previous commit /adding/ support for 160 MHz chanspecs was incomplete.
> It didn't set bandwidth info and didn't extract control channel info. As
> the result it was also using uninitialized "sb" var.
>
> This change has been tested for two chanspecs found to be reported by
> some devices/firmwares:
> 1) 60/160 (0xee32)
> Before: chnum:50 control_ch_num:36
> After: chnum:50 control_ch_num:60
> 2) 120/160 (0xed72)
> Before: chnum:114 control_ch_num:100
> After: chnum:114 control_ch_num:120
>
> Fixes: 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Please mark your stable patches with:
X-Patchwork-Hint: ignore
This way patchwork ignores them and this saves my time. Thank you.
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH AUTOSEL 4.19 06/68] brcmutil: really fix decoding channel info for 160 MHz bandwidth
2018-11-29 11:49 ` Kalle Valo
@ 2018-11-29 16:54 ` Sasha Levin
0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2018-11-29 16:54 UTC (permalink / raw)
To: Kalle Valo
Cc: stable, linux-kernel, Rafał Miłecki, linux-wireless,
brcm80211-dev-list.pdl, brcm80211-dev-list, netdev
On Thu, Nov 29, 2018 at 01:49:43PM +0200, Kalle Valo wrote:
>Sasha Levin <sashal@kernel.org> writes:
>
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> [ Upstream commit 3401d42c7ea2d064d15c66698ff8eb96553179ce ]
>>
>> Previous commit /adding/ support for 160 MHz chanspecs was incomplete.
>> It didn't set bandwidth info and didn't extract control channel info. As
>> the result it was also using uninitialized "sb" var.
>>
>> This change has been tested for two chanspecs found to be reported by
>> some devices/firmwares:
>> 1) 60/160 (0xee32)
>> Before: chnum:50 control_ch_num:36
>> After: chnum:50 control_ch_num:60
>> 2) 120/160 (0xed72)
>> Before: chnum:114 control_ch_num:100
>> After: chnum:114 control_ch_num:120
>>
>> Fixes: 330994e8e8ec ("brcmfmac: fix for proper support of 160MHz bandwidth")
>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Please mark your stable patches with:
>
>X-Patchwork-Hint: ignore
>
>This way patchwork ignores them and this saves my time. Thank you.
Will do, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-29 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20181129055559.159228-1-sashal@kernel.org>
2018-11-29 5:54 ` [PATCH AUTOSEL 4.19 06/68] brcmutil: really fix decoding channel info for 160 MHz bandwidth Sasha Levin
2018-11-29 11:49 ` Kalle Valo
2018-11-29 16:54 ` Sasha Levin
2018-11-29 5:54 ` [PATCH AUTOSEL 4.19 07/68] mt76: fix building without CONFIG_LEDS_CLASS Sasha Levin
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).