diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-04-17 18:47:28 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-04-17 18:47:28 +0000 |
commit | cd0ee3916276a1906f8a7b4223dcc98d50807cc7 (patch) | |
tree | f1aea877afdbfe194900bba418d647a8f0533bea /sys/i386/isa | |
parent | 2593bc5a6f5a1e7a71923414526e4603164d592b (diff) | |
download | FreeBSD-src-cd0ee3916276a1906f8a7b4223dcc98d50807cc7.zip FreeBSD-src-cd0ee3916276a1906f8a7b4223dcc98d50807cc7.tar.gz |
When in infrastructure mode, use address 3 from the 802.11 header as the
source address when receiving frames (and keep using address 2 when in
pseudo-IBSS mode). This is apparently necessary in order to obtain the
true MAC address of the sending station which is needed for PPPoE.
Patch supplied by: Blaz Zupan <blaz@amis.net>
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/if_wi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/i386/isa/if_wi.c b/sys/i386/isa/if_wi.c index a75353e..0cb88a4 100644 --- a/sys/i386/isa/if_wi.c +++ b/sys/i386/isa/if_wi.c @@ -391,8 +391,13 @@ static void wi_rxeof(sc) bcopy((char *)&rx_frame.wi_addr1, (char *)&eh->ether_dhost, ETHER_ADDR_LEN); - bcopy((char *)&rx_frame.wi_addr2, - (char *)&eh->ether_shost, ETHER_ADDR_LEN); + if (sc->wi_ptype == WI_PORTTYPE_ADHOC) { + bcopy((char *)&rx_frame.wi_addr2, + (char *)&eh->ether_shost, ETHER_ADDR_LEN); + } else { + bcopy((char *)&rx_frame.wi_addr3, + (char *)&eh->ether_shost, ETHER_ADDR_LEN); + } bcopy((char *)&rx_frame.wi_type, (char *)&eh->ether_type, sizeof(u_int16_t)); |