diff -urp ipw2200-1.0.7/ipw2200.c ipw2200-1.0.7-broadcast/ipw2200.c --- ipw2200-1.0.7/ipw2200.c 2005-10-14 02:11:50.000000000 +0800 +++ ipw2200-1.0.7-broadcast/ipw2200.c 2005-10-19 15:47:10.000000000 +0800 @@ -7982,6 +7982,12 @@ static void ipw_rebuild_decrypted_skb(st } } +static inline int ipw_is_broadcast_ether_addr(const u8 * addr) +{ + return (addr[0] & 0xff && addr[1] & 0xff && addr[2] & 0xff && + addr[3] & 0xff && addr[4] & 0xff && addr[5] & 0xff); +} + static void ipw_handle_data_packet(struct ipw_priv *priv, struct ipw_rx_mem_buffer *rxb, struct ieee80211_rx_stats *stats) @@ -8018,8 +8024,9 @@ static void ipw_handle_data_packet(struc /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */ hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data; if (priv->ieee->iw_mode != IW_MODE_MONITOR && - (is_multicast_ether_addr(hdr->addr1) ? - !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt)) + ((is_multicast_ether_addr(hdr->addr1) || + ipw_is_broadcast_ether_addr(hdr->addr1)) ? + !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt)) ipw_rebuild_decrypted_skb(priv, rxb->skb); if (!ieee80211_rx(priv->ieee, rxb->skb, stats)) @@ -8197,12 +8204,6 @@ static void ipw_handle_data_packet_monit } #endif -static inline int ipw_is_broadcast_ether_addr(const u8 * addr) -{ - return (addr[0] & 0xff && addr[1] & 0xff && addr[2] & 0xff && - addr[3] & 0xff && addr[4] & 0xff && addr[5] & 0xff); -} - static inline int is_network_packet(struct ipw_priv *priv, struct ieee80211_hdr_4addr *header) { @@ -10225,7 +10226,8 @@ static inline int ipw_tx_skb(struct ipw_ switch (priv->ieee->iw_mode) { case IW_MODE_ADHOC: hdr_len = IEEE80211_3ADDR_LEN; - unicast = !is_multicast_ether_addr(hdr->addr1); + unicast = !(is_multicast_ether_addr(hdr->addr1) || + ipw_is_broadcast_ether_addr(hdr->addr1)); id = ipw_find_station(priv, hdr->addr1); if (id == IPW_INVALID_STATION) { id = ipw_add_station(priv, hdr->addr1); @@ -10240,7 +10242,8 @@ static inline int ipw_tx_skb(struct ipw_ case IW_MODE_INFRA: default: - unicast = !is_multicast_ether_addr(hdr->addr3); + unicast = !(is_multicast_ether_addr(hdr->addr3) || + ipw_is_broadcast_ether_addr(hdr->addr3)); hdr_len = IEEE80211_3ADDR_LEN; id = 0; break;