From 339dabccd7928ea4573fdec0e15032468cf4d8dd Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Mon, 17 Apr 2000 18:47:28 +0000 Subject: 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 --- sys/dev/wi/if_wi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index a75353ebae3b..0cb88a464ed8 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/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)); -- cgit v1.3