diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2013-07-31 04:55:14 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-08-02 02:37:29 -0400 |
commit | 0dbd09e6284dc7c3de1470e2f1a3c83e0a0fc591 (patch) | |
tree | ccb6cc6c068ba091e8566a6fb425a79df58fa1ea /drivers/net/wireless/ath/ath10k/mac.c | |
parent | d531cb85d538d4a445e3bb3c669af794ea32e558 (diff) |
ath10k: zero arvif memory on add_interface()
The private memory area in vif provided by
mac80211 isn't guaranteed to be zeroed.
This patch should fix issues when switching
between STA and AP interface types.
The tim_bitmap could become polluted by STA bssid
field (since it's a union), wep_keys array
could also become polluted with invalid pointers
and probably much more.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 47c11632e15d..cf2ba4d850c9 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -1925,6 +1925,8 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, | |||
1925 | 1925 | ||
1926 | mutex_lock(&ar->conf_mutex); | 1926 | mutex_lock(&ar->conf_mutex); |
1927 | 1927 | ||
1928 | memset(arvif, 0, sizeof(*arvif)); | ||
1929 | |||
1928 | arvif->ar = ar; | 1930 | arvif->ar = ar; |
1929 | arvif->vif = vif; | 1931 | arvif->vif = vif; |
1930 | 1932 | ||