diff options
author | Peter Jones <pjones@redhat.com> | 2005-08-26 17:51:06 -0400 |
---|---|---|
committer | James Ketrenos <jketreno@linux.intel.com> | 2005-11-07 18:51:25 -0500 |
commit | 90700fd982022f0519e7bd7595adb8084f36d1c6 (patch) | |
tree | 297461b8ec67e914f0518be5ddb21831bb179b45 /drivers/net/wireless/ipw2200.c | |
parent | 24a47dbd89a2738bc149de4685ae5a2a97193ae1 (diff) |
Fixed is_network_packet() to include checking for broadcast packets.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 86a4c2358f9d..d417ed7af7c1 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -8096,21 +8096,23 @@ static inline int is_network_packet(struct ipw_priv *priv, | |||
8096 | if (!memcmp(header->addr2, priv->net_dev->dev_addr, ETH_ALEN)) | 8096 | if (!memcmp(header->addr2, priv->net_dev->dev_addr, ETH_ALEN)) |
8097 | return 0; | 8097 | return 0; |
8098 | 8098 | ||
8099 | /* multicast packets to our IBSS go through */ | 8099 | /* {broad,multi}cast packets to our BSSID go through */ |
8100 | if (is_multicast_ether_addr(header->addr1)) | 8100 | if (is_multicast_ether_addr(header->addr1) || |
8101 | is_broadcast_ether_addr(header->addr1)) | ||
8101 | return !memcmp(header->addr3, priv->bssid, ETH_ALEN); | 8102 | return !memcmp(header->addr3, priv->bssid, ETH_ALEN); |
8102 | 8103 | ||
8103 | /* packets to our adapter go through */ | 8104 | /* packets to our adapter go through */ |
8104 | return !memcmp(header->addr1, priv->net_dev->dev_addr, | 8105 | return !memcmp(header->addr1, priv->net_dev->dev_addr, |
8105 | ETH_ALEN); | 8106 | ETH_ALEN); |
8106 | 8107 | ||
8107 | case IW_MODE_INFRA: /* Header: Dest. | AP{BSSID} | Source */ | 8108 | case IW_MODE_INFRA: /* Header: Dest. | BSSID | Source */ |
8108 | /* packets from our adapter are dropped (echo) */ | 8109 | /* packets from our adapter are dropped (echo) */ |
8109 | if (!memcmp(header->addr3, priv->net_dev->dev_addr, ETH_ALEN)) | 8110 | if (!memcmp(header->addr3, priv->net_dev->dev_addr, ETH_ALEN)) |
8110 | return 0; | 8111 | return 0; |
8111 | 8112 | ||
8112 | /* {broad,multi}cast packets to our IBSS go through */ | 8113 | /* {broad,multi}cast packets to our BSS go through */ |
8113 | if (is_multicast_ether_addr(header->addr1)) | 8114 | if (is_multicast_ether_addr(header->addr1) || |
8115 | is_broadcast_ether_addr(header->addr1)) | ||
8114 | return !memcmp(header->addr2, priv->bssid, ETH_ALEN); | 8116 | return !memcmp(header->addr2, priv->bssid, ETH_ALEN); |
8115 | 8117 | ||
8116 | /* packets to our adapter go through */ | 8118 | /* packets to our adapter go through */ |