[PATCH] hostap: Suppress broadcast if no stations are associated
authorPavel Roskin <proski@gnu.org>
Mon, 28 May 2007 16:38:47 +0000 (09:38 -0700)
committerJeff Garzik <jeff@garzik.org>
Mon, 9 Jul 2007 02:16:37 +0000 (22:16 -0400)
This may be useful in mesh setups when most stations act as repeaters only.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/hostap/hostap_ap.c

index 5b3abd5..d169529 100644 (file)
@@ -2704,6 +2704,8 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
 
        if (hdr->addr1[0] & 0x01) {
                /* broadcast/multicast frame - no AP related processing */
+               if (local->ap->num_sta <= 0)
+                       ret = AP_TX_DROP;
                goto out;
        }