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>
};
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) |