aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-01-03 18:27:38 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-03 18:27:38 -0500
commit3c19065a1e2c862becc576bc65e54f2bc1cbffe6 (patch)
treeffea801487e7bb870fad3ef3dbd4605193acd5d4 /drivers
parent88df8ef59a3eb54b1e2412765ff2736d2376d1ca (diff)
[IEEE80211] ipw2200: Simplify multicast checks.
From: Stephen Hemminger <shemminger@osdl.org> is_multicast_ether_addr() accepts broadcast too, so the is_broadcast_ether_addr() calls are redundant. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ipw2200.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 5e7c7e944c9d..64f6d1f25753 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -7456,8 +7456,7 @@ static void ipw_handle_data_packet(struct ipw_priv *priv,
7456 /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */ 7456 /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */
7457 hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data; 7457 hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data;
7458 if (priv->ieee->iw_mode != IW_MODE_MONITOR && 7458 if (priv->ieee->iw_mode != IW_MODE_MONITOR &&
7459 ((is_multicast_ether_addr(hdr->addr1) || 7459 (is_multicast_ether_addr(hdr->addr1) ?
7460 is_broadcast_ether_addr(hdr->addr1)) ?
7461 !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt)) 7460 !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt))
7462 ipw_rebuild_decrypted_skb(priv, rxb->skb); 7461 ipw_rebuild_decrypted_skb(priv, rxb->skb);
7463 7462
@@ -7648,8 +7647,7 @@ static inline int is_network_packet(struct ipw_priv *priv,
7648 return 0; 7647 return 0;
7649 7648
7650 /* {broad,multi}cast packets to our BSSID go through */ 7649 /* {broad,multi}cast packets to our BSSID go through */
7651 if (is_multicast_ether_addr(header->addr1) || 7650 if (is_multicast_ether_addr(header->addr1))
7652 is_broadcast_ether_addr(header->addr1))
7653 return !memcmp(header->addr3, priv->bssid, ETH_ALEN); 7651 return !memcmp(header->addr3, priv->bssid, ETH_ALEN);
7654 7652
7655 /* packets to our adapter go through */ 7653 /* packets to our adapter go through */
@@ -7662,8 +7660,7 @@ static inline int is_network_packet(struct ipw_priv *priv,
7662 return 0; 7660 return 0;
7663 7661
7664 /* {broad,multi}cast packets to our BSS go through */ 7662 /* {broad,multi}cast packets to our BSS go through */
7665 if (is_multicast_ether_addr(header->addr1) || 7663 if (is_multicast_ether_addr(header->addr1))
7666 is_broadcast_ether_addr(header->addr1))
7667 return !memcmp(header->addr2, priv->bssid, ETH_ALEN); 7664 return !memcmp(header->addr2, priv->bssid, ETH_ALEN);
7668 7665
7669 /* packets to our adapter go through */ 7666 /* packets to our adapter go through */
@@ -9657,8 +9654,7 @@ static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
9657 switch (priv->ieee->iw_mode) { 9654 switch (priv->ieee->iw_mode) {
9658 case IW_MODE_ADHOC: 9655 case IW_MODE_ADHOC:
9659 hdr_len = IEEE80211_3ADDR_LEN; 9656 hdr_len = IEEE80211_3ADDR_LEN;
9660 unicast = !(is_multicast_ether_addr(hdr->addr1) || 9657 unicast = !is_multicast_ether_addr(hdr->addr1);
9661 is_broadcast_ether_addr(hdr->addr1));
9662 id = ipw_find_station(priv, hdr->addr1); 9658 id = ipw_find_station(priv, hdr->addr1);
9663 if (id == IPW_INVALID_STATION) { 9659 if (id == IPW_INVALID_STATION) {
9664 id = ipw_add_station(priv, hdr->addr1); 9660 id = ipw_add_station(priv, hdr->addr1);
@@ -9673,8 +9669,7 @@ static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
9673 9669
9674 case IW_MODE_INFRA: 9670 case IW_MODE_INFRA:
9675 default: 9671 default:
9676 unicast = !(is_multicast_ether_addr(hdr->addr3) || 9672 unicast = !is_multicast_ether_addr(hdr->addr3);
9677 is_broadcast_ether_addr(hdr->addr3));
9678 hdr_len = IEEE80211_3ADDR_LEN; 9673 hdr_len = IEEE80211_3ADDR_LEN;
9679 id = 0; 9674 id = 0;
9680 break; 9675 break;