* [PATCH AUTOSEL 6.1 05/17] wifi: cfg80211: lock wiphy mutex for rfkill poll
[not found] <20231204203514.2093855-1-sashal@kernel.org>
@ 2023-12-04 20:34 ` Sasha Levin
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 06/17] wifi: avoid offset calculation on NULL pointer Sasha Levin
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 07/17] wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap Sasha Levin
2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2023-12-04 20:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Johannes Berg, syzbot+7e59a5bfc7a897247e18, Sasha Levin, johannes,
davem, edumazet, kuba, pabeni, linux-wireless, netdev
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit 8e2f6f2366219b3304b227bdd2f04b64c92e3e12 ]
We want to guarantee the mutex is held for pretty much
all operations, so ensure that here as well.
Reported-by: syzbot+7e59a5bfc7a897247e18@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 63d75fecc2c53..8809e668ed912 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -216,7 +216,9 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
{
struct cfg80211_registered_device *rdev = data;
+ wiphy_lock(&rdev->wiphy);
rdev_rfkill_poll(rdev);
+ wiphy_unlock(&rdev->wiphy);
}
void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev,
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH AUTOSEL 6.1 06/17] wifi: avoid offset calculation on NULL pointer
[not found] <20231204203514.2093855-1-sashal@kernel.org>
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 05/17] wifi: cfg80211: lock wiphy mutex for rfkill poll Sasha Levin
@ 2023-12-04 20:34 ` Sasha Levin
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 07/17] wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap Sasha Levin
2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2023-12-04 20:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Michael-CY Lee, Johannes Berg, Sasha Levin, johannes,
matthias.bgg, angelogioacchino.delregno, linux-wireless,
linux-arm-kernel, linux-mediatek
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
[ Upstream commit ef5828805842204dd0259ecfc132b5916c8a77ae ]
ieee80211_he_6ghz_oper() can be passed a NULL pointer
and checks for that, but already did the calculation
to inside of it before. Move it after the check.
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
Link: https://lore.kernel.org/r/20231122030237.31276-1-michael-cy.lee@mediatek.com
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/ieee80211.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 870ae4cd82029..dce105f67b4d8 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2658,12 +2658,14 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)
static inline const struct ieee80211_he_6ghz_oper *
ieee80211_he_6ghz_oper(const struct ieee80211_he_operation *he_oper)
{
- const u8 *ret = (const void *)&he_oper->optional;
+ const u8 *ret;
u32 he_oper_params;
if (!he_oper)
return NULL;
+ ret = (const void *)&he_oper->optional;
+
he_oper_params = le32_to_cpu(he_oper->he_oper_params);
if (!(he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO))
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH AUTOSEL 6.1 07/17] wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap
[not found] <20231204203514.2093855-1-sashal@kernel.org>
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 05/17] wifi: cfg80211: lock wiphy mutex for rfkill poll Sasha Levin
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 06/17] wifi: avoid offset calculation on NULL pointer Sasha Levin
@ 2023-12-04 20:34 ` Sasha Levin
2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2023-12-04 20:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ben Greear, Johannes Berg, Sasha Levin, johannes, davem, edumazet,
kuba, pabeni, linux-wireless, netdev
From: Ben Greear <greearb@candelatech.com>
[ Upstream commit 00f7d153f3358a7c7e35aef66fcd9ceb95d90430 ]
The new 320 MHz channel width wasn't handled, so connecting
a station to a 320 MHz AP would limit the station to 20 MHz
(on HT) after a warning, handle 320 MHz to fix that.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/20231109182201.495381-1-greearb@candelatech.com
[write a proper commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/ht.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index ae42e956eff5a..9bfe128ada47d 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -271,6 +271,7 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,
case NL80211_CHAN_WIDTH_80:
case NL80211_CHAN_WIDTH_80P80:
case NL80211_CHAN_WIDTH_160:
+ case NL80211_CHAN_WIDTH_320:
bw = ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 ?
IEEE80211_STA_RX_BW_40 : IEEE80211_STA_RX_BW_20;
break;
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-04 20:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231204203514.2093855-1-sashal@kernel.org>
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 05/17] wifi: cfg80211: lock wiphy mutex for rfkill poll Sasha Levin
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 06/17] wifi: avoid offset calculation on NULL pointer Sasha Levin
2023-12-04 20:34 ` [PATCH AUTOSEL 6.1 07/17] wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap 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).