nl80211: Clean up if_add() for hostapd use
authorJouni Malinen <j@w1.fi>
Sat, 26 Oct 2013 09:14:03 +0000 (12:14 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 26 Oct 2013 12:55:30 +0000 (15:55 +0300)
commitf5eb9da3043f66e56fab1905b8ab29ecf37233a2
treea6dd166b2daf0d1dff1b15d71961fd428bd3fa3f
parenta288da61b634a979462402c1988be74ccdae21d4
nl80211: Clean up if_add() for hostapd use

The allocation of new_bss and its use was separated by a lot of code in
this function. This can be cleaned up by moving the allocation next to
the use, so that this all can be within a single #ifdef HOSTAPD block.
The i802_check_bridge() call was outside type == WPA_IF_AP_BSS case, but
in practice, it is only used for WPA_IF_AP_BSS (and if used for
something else, this would have resulted in NULL pointer dereference
anyway).

Signed-hostap: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c