aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2015-05-28 11:03:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-31 09:00:15 +0900
commitadf1b358a9c97b8d73dc91ade96f2a9f225921e1 (patch)
tree8443f90229a77c8fc16c972d75b1daaa4775fda4 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
parentstaging: wilc1000: remove __DRIVER_VERSION__ macro (diff)
downloadwireguard-linux-adf1b358a9c97b8d73dc91ade96f2a9f225921e1.tar.xz
wireguard-linux-adf1b358a9c97b8d73dc91ade96f2a9f225921e1.zip
staging: wilc1000: off by one in wilc_wfi_cfg80211_mgmt_types
NL80211_IFTYPE_MAX represents the largest interface type number defined, so declaring the array with that size will actually leave out the last interface. This causes invalid memory access whenever this array is used, which starts happening at boot. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.h')
-rw-r--r--drivers/staging/wilc1000/wilc_wfi_cfgoperations.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 508db6a3f6dd..829ba32ea210 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -77,7 +77,7 @@ static const u32 cipher_suites[] = {
};
static const struct ieee80211_txrx_stypes
- wilc_wfi_cfg80211_mgmt_types[NL80211_IFTYPE_MAX] = {
+ wilc_wfi_cfg80211_mgmt_types[NUM_NL80211_IFTYPES] = {
[NL80211_IFTYPE_STATION] = {
.tx = 0xffff,
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |