2007-05-28 16:42:27

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH 2/4] hostap: Suppress broadcast if no stations are associated

From: Pavel Roskin <[email protected]>

This may be useful in mesh setups when most stations act as repeaters only.

Signed-off-by: Pavel Roskin <[email protected]>
Signed-off-by: Jouni Malinen <[email protected]>


Index: linux-2.6/drivers/net/wireless/hostap/hostap_ap.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/hostap/hostap_ap.c
+++ linux-2.6/drivers/net/wireless/hostap/hostap_ap.c
@@ -2704,6 +2704,8 @@ ap_tx_ret hostap_handle_sta_tx(local_inf

if (hdr->addr1[0] & 0x01) {
/* broadcast/multicast frame - no AP related processing */
+ if (local->ap->num_sta <= 0)
+ ret = AP_TX_DROP;
goto out;
}


--

--
Jouni Malinen PGP id EFC895FA