diff options
author | Solomon Tan <wjsota@gmail.com> | 2022-04-25 13:28:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-26 11:28:35 +0200 |
commit | 8896ac5d0d3d9c5d9e67a22b0a9d36b6117fb2f0 (patch) | |
tree | 3b70ae207e18cf65c4d520237064b7eb29966b34 /drivers/staging/r8188eu/include/ieee80211.h | |
parent | 1efba7ef1d7da5944493728c5375fef5b2130de4 (diff) | |
download | linux-8896ac5d0d3d9c5d9e67a22b0a9d36b6117fb2f0.tar.bz2 |
Revert "staging: r8188eu: use in-kernel ieee channel"
This reverts commit 0afaa121813ed602bd203759c339cb639493f8c2 as changing
rtw_ieee80211_channel to ieee80211_channel causes a memcpy bug as
reported in:
https://lore.kernel.org/linux-staging/67e2d10b-7f0f-9c5a-ce31-376b83ffba9e@gmail.com/
due to their size differences.
Fixes: 0afaa121813e ("staging: r8188eu: use in-kernel ieee channel")
Reported-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220425052802.2419-1-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/include/ieee80211.h')
-rw-r--r-- | drivers/staging/r8188eu/include/ieee80211.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h index 788c9873d7b6..fe2dc2a0a802 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -8,7 +8,6 @@ #include "drv_types.h" #include "wifi.h" #include <linux/wireless.h> -#include <net/cfg80211.h> #define MGMT_QUEUE_NUM 5 @@ -666,6 +665,39 @@ enum rtw_ieee80211_back_actioncode { #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */ +/** + * enum rtw_ieee80211_channel_flags - channel flags + * + * Channel flags set by the regulatory control code. + * + * @RTW_IEEE80211_CHAN_DISABLED: This channel is disabled. + * @RTW_IEEE80211_CHAN_PASSIVE_SCAN: Only passive scanning is permitted + * on this channel. + * @RTW_IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. + * @RTW_IEEE80211_CHAN_RADAR: Radar detection is required on this channel. + * @RTW_IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel + * is not permitted. + * @RTW_IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel + * is not permitted. + */ +enum rtw_ieee80211_channel_flags { + RTW_IEEE80211_CHAN_DISABLED = 1<<0, + RTW_IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, + RTW_IEEE80211_CHAN_NO_IBSS = 1<<2, + RTW_IEEE80211_CHAN_RADAR = 1<<3, + RTW_IEEE80211_CHAN_NO_HT40PLUS = 1<<4, + RTW_IEEE80211_CHAN_NO_HT40MINUS = 1<<5, +}; + +#define RTW_IEEE80211_CHAN_NO_HT40 \ + (RTW_IEEE80211_CHAN_NO_HT40PLUS | RTW_IEEE80211_CHAN_NO_HT40MINUS) + +/* Represent channel details, subset of ieee80211_channel */ +struct rtw_ieee80211_channel { + u16 hw_value; + u32 flags; +}; + #define CHAN_FMT \ "hw_value:%u, " \ "flags:0x%08x" \ |