aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-07-27 02:56:56 (GMT)
committerJouni Malinen <j@w1.fi>2003-07-27 02:56:56 (GMT)
commit27340ca1f3dd17b9038c113cb622d62ca5fdbecf (patch)
tree50ae07c413a85d1805af6fe6f775709dc2bb1816
parentaf1b7558d25e28f4c71af7031c4e2d80025bebb2 (diff)
downloadhostap-history-27340ca1f3dd17b9038c113cb622d62ca5fdbecf.zip
hostap-history-27340ca1f3dd17b9038c113cb622d62ca5fdbecf.tar.gz
hostap-history-27340ca1f3dd17b9038c113cb622d62ca5fdbecf.tar.bz2
Fixed Ethernet src_addr in TX descriptor when sending out WDS frames
using standard compliant 4-addr frames.
-rw-r--r--driver/modules/hostap_hw.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/driver/modules/hostap_hw.c b/driver/modules/hostap_hw.c
index 900992e..1a72f6c 100644
--- a/driver/modules/hostap_hw.c
+++ b/driver/modules/hostap_hw.c
@@ -1720,6 +1720,8 @@ static int prism2_tx(struct sk_buff *skb, struct net_device *dev)
}
fc = (WLAN_FC_TYPE_DATA << 2) | (WLAN_FC_STYPE_DATA << 4);
+ memcpy(&txdesc.dst_addr, skb->data, 2 * ETH_ALEN);
+
if (use_wds != WDS_NO) {
/* Note! Prism2 station firmware has problems with sending real
* 802.11 frames with four addresses; until these problems can
@@ -1745,6 +1747,8 @@ static int prism2_tx(struct sk_buff *skb, struct net_device *dev)
/* SA from skb->data + ETH_ALEN will be added after
* frame payload */
data_len += ETH_ALEN;
+
+ memcpy(&txdesc.src_addr, dev->dev_addr, ETH_ALEN);
}
/* send broadcast and multicast frames to broadcast RA, if
@@ -1758,9 +1762,6 @@ static int prism2_tx(struct sk_buff *skb, struct net_device *dev)
memcpy(&txdesc.addr1, local->bssid, ETH_ALEN);
memcpy(&txdesc.addr2, dev->dev_addr, ETH_ALEN);
memcpy(&txdesc.addr3, skb->data, ETH_ALEN);
-
- memcpy(&txdesc.dst_addr, &txdesc.addr3, ETH_ALEN);
- memcpy(&txdesc.src_addr, &txdesc.addr2, ETH_ALEN);
} else if (local->iw_mode == IW_MODE_MASTER && !to_assoc_ap) {
fc |= WLAN_FC_FROMDS;
/* From DS: Addr1 = DA, Addr2 = BSSID, Addr3 = SA */
@@ -1785,8 +1786,6 @@ static int prism2_tx(struct sk_buff *skb, struct net_device *dev)
txdesc.frame_control = __cpu_to_le16(fc);
txdesc.data_len = __cpu_to_le16(data_len);
txdesc.len = __cpu_to_be16(data_len);
- if (use_wds == WDS_NO)
- memcpy(&txdesc.dst_addr, skb->data, 2 * ETH_ALEN);
skb->dev = dev;