mac80211: only alloc mem if a station doesn't exist yet

This speeds up the function in case a station already exists by avoiding
calling an expensive kzalloc just to free it again after the next check.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Koen Vandeputte 2016-12-14 17:28:59 +01:00 • committed by Johannes Berg
commit 0c2e384267