Skip to contentSkip to conversation

*** mac80211: delete duplicate code ***

PATCH In review Sergey K 1 participant 3 messages Aug 17, 2013 mac80211

lore
Share & tools
lore

Sergey K

author
#0 lore raw

cover *** mac80211: delete duplicate code ***

*** BLURB HERE ***

Sergey K (1):
Delete duplicate code. Use of the variable instead call a function

 net/mac80211/tx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
1.8.1.5
author
#1 lore raw

PATCH 1/1 Delete duplicate code. Use of the variable instead call a function

---
 net/mac80211/tx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/mac80211/tx.c +1 -3
index 098ae85..79db7f3 100644
@@ -1769,8 +1769,6 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 			memcpy(hdr.addr3, skb->data, ETH_ALEN);
 			memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN);
 			hdrlen = 30;
-			authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
-			wme_sta = test_sta_flag(sta, WLAN_STA_WME);
 		}
 		ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
 					u.ap);
@@ -1979,7 +1977,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 	 * EAPOL frames from the local station.
 	 */
 	if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) &&
-		     !is_multicast_ether_addr(hdr.addr1) && !authorized &&
+		     !multicast && !authorized &&
 		     (cpu_to_be16(ethertype) != sdata->control_port_protocol ||
 		      !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) {
 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
Signature · 1 line
1.8.1.5
author
#2 lore raw

Re: [PATCH 1/1] Delete duplicate code. Use of the variable instead call a function

net/mac80211/tx.c

Quoted 10 lines · Sergey K
---
 net/mac80211/tx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/mac80211/tx.c +0 -0
index 098ae85..79db7f3 100644
 <at>  <at>  -1769,8 +1769,6  <at>  <at>  netdev_tx_t 

ieee80211_subif_start_xmit(struct sk_buff *skb,

net/mac80211/tx.c netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,

Quoted 4 lines
net/mac80211/tx.c +0 -1
 			memcpy(hdr.addr3, skb->data, ETH_ALEN);
 			memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN);
 			hdrlen = 30;
-			authorized = test_sta_flag(sta, 

WLAN_STA_AUTHORIZED);

net/mac80211/tx.c netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,

Quoted 3 lines
net/mac80211/tx.c +0 -1
-			wme_sta = test_sta_flag(sta, WLAN_STA_WME);
 		}
 		ap_sdata = container_of(sdata->bss, struct 

ieee80211_sub_if_data,

Quoted 2 lines

u.ap);
<at> <at> -1979,7 +1977,7 <at> <at> netdev_tx_t

ieee80211_subif_start_xmit(struct sk_buff *skb,

Quoted 8 lines
net/mac80211/tx.c +1 -1
 	 * EAPOL frames from the local station.
 	 */
 	if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) &&
-		     !is_multicast_ether_addr(hdr.addr1) && !authorized &&
+		     !multicast && !authorized &&
 		     (cpu_to_be16(ethertype) != sdata-

control_port_protocol ||
!ether_addr_equal(sdata->vif.addr, skb->data +

ETH_ALEN)))) {

Quoted 1 line

#ifdef CONFIG_MAC80211_VERBOSE_DEBUG

We need to delete authorized and wme_sta flags, because these flags are set below:

1956 multicast = is_multicast_ether_addr(hdr.addr1);
1957 if (!multicast) {
1958 sta = sta_info_get(sdata, hdr.addr1);
1959 if (sta) {
1960 authorized = test_sta_flag(sta,
WLAN_STA_AUTHORIZED);
1961 wme_sta = test_sta_flag(sta, WLAN_STA_WME);
1962 }
1963 }