Skip to content

Commit

Permalink
wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_…
Browse files Browse the repository at this point in the history
…mci_update_wlan_channels()

This partially reverts commit e161d4b.

Turns out the channelmap variable is not actually read-only, it's modified
through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
so making it read-only causes page faults when that code is hit.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
Link: https://lore.kernel.org/r/[email protected]
Fixes: e161d4b ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
Cc: [email protected]
Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
tohojo authored and torvalds committed Apr 20, 2023
1 parent 6a66fdd commit 0f2a4af
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wireless/ath/ath9k/mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,7 @@ void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all)
struct ath_hw *ah = sc->sc_ah;
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
struct ath9k_channel *chan = ah->curchan;
static const u32 channelmap[] = {
0x00000000, 0xffff0000, 0xffffffff, 0x7fffffff
};
u32 channelmap[] = {0x00000000, 0xffff0000, 0xffffffff, 0x7fffffff};
int i;
s16 chan_start, chan_end;
u16 wlan_chan;
Expand Down

0 comments on commit 0f2a4af

Please sign in to comment.