ap: Use is_broadcast_ether_addr()
There's no need to have a separate variable and open-code a more complicated version of this, just use is_broadcast_ether_addr(). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
ac81b3948b
commit
842c5af5d3
1 changed files with 1 additions and 6 deletions
|
@ -2605,7 +2605,6 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
||||||
struct hostapd_frame_info *fi)
|
struct hostapd_frame_info *fi)
|
||||||
{
|
{
|
||||||
struct ieee80211_mgmt *mgmt;
|
struct ieee80211_mgmt *mgmt;
|
||||||
int broadcast;
|
|
||||||
u16 fc, stype;
|
u16 fc, stype;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -2621,11 +2620,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast = mgmt->bssid[0] == 0xff && mgmt->bssid[1] == 0xff &&
|
if (!is_broadcast_ether_addr(mgmt->bssid) &&
|
||||||
mgmt->bssid[2] == 0xff && mgmt->bssid[3] == 0xff &&
|
|
||||||
mgmt->bssid[4] == 0xff && mgmt->bssid[5] == 0xff;
|
|
||||||
|
|
||||||
if (!broadcast &&
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
/* Invitation responses can be sent with the peer MAC as BSSID */
|
/* Invitation responses can be sent with the peer MAC as BSSID */
|
||||||
!((hapd->conf->p2p & P2P_GROUP_OWNER) &&
|
!((hapd->conf->p2p & P2P_GROUP_OWNER) &&
|
||||||
|
|
Loading…
Reference in a new issue