Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/dev/ic Pull up revision 1.73 (requested by mycroft ...



details:   https://anonhg.NetBSD.org/src/rev/4c1fb4450baf
branches:  netbsd-1-6
changeset: 527671:4c1fb4450baf
user:      tv <tv%NetBSD.org@localhost>
date:      Sat Jun 01 22:33:23 2002 +0000

description:
Pull up revision 1.73 (requested by mycroft in ticket #109):
Makes some cards with Symbol firmware work in ad-hoc mode.

diffstat:

 sys/dev/ic/wi.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (46 lines):

diff -r 891c8589c116 -r 4c1fb4450baf sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c   Fri May 31 16:42:05 2002 +0000
+++ b/sys/dev/ic/wi.c   Sat Jun 01 22:33:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wi.c,v 1.72 2002/04/18 05:24:28 onoe Exp $     */
+/*     $NetBSD: wi.c,v 1.72.4.1 2002/06/01 22:33:23 tv Exp $   */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.72 2002/04/18 05:24:28 onoe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.72.4.1 2002/06/01 22:33:23 tv Exp $");
 
 #define WI_HERMES_AUTOINC_WAR  /* Work around data write autoinc bug. */
 #define WI_HERMES_STATS_WAR    /* Work around stats counter bug. */
@@ -363,9 +363,9 @@
        eh = mtod(m, struct ether_header *);
        m->m_pkthdr.rcvif = ifp;
 
-       if (le16toh(rx_frame.wi_status) == WI_STAT_1042 ||
-           le16toh(rx_frame.wi_status) == WI_STAT_TUNNEL ||
-           le16toh(rx_frame.wi_status) == WI_STAT_WMP_MSG) {
+       if ((le16toh(rx_frame.wi_status) & WI_RXSTAT_MSG_TYPE) == WI_STAT_1042 ||
+           (le16toh(rx_frame.wi_status) & WI_RXSTAT_MSG_TYPE) == WI_STAT_TUNNEL ||
+           (le16toh(rx_frame.wi_status) & WI_RXSTAT_MSG_TYPE) == WI_STAT_WMP_MSG) {
                if ((le16toh(rx_frame.wi_dat_len) + WI_SNAPHDR_LEN) > MCLBYTES) {
                        printf("%s: oversized packet received "
                            "(wi_dat_len=%d, wi_status=0x%x)\n",
@@ -1844,10 +1844,10 @@
         * Use RFC1042 encoding for IP and ARP datagrams,
         * 802.3 for anything else.
         */
-       if (ntohs(eh->ether_type) == ETHERTYPE_IP ||
-           ntohs(eh->ether_type) == ETHERTYPE_ARP ||
-           ntohs(eh->ether_type) == ETHERTYPE_REVARP ||
-           ntohs(eh->ether_type) == ETHERTYPE_IPV6) {
+       if (eh->ether_type == htons(ETHERTYPE_IP) ||
+           eh->ether_type == htons(ETHERTYPE_ARP) ||
+           eh->ether_type == htons(ETHERTYPE_REVARP) ||
+           eh->ether_type == htons(ETHERTYPE_IPV6)) {
                memcpy((char *)&tx_frame.wi_addr1, (char *)&eh->ether_dhost,
                    ETHER_ADDR_LEN);
                memcpy((char *)&tx_frame.wi_addr2, (char *)&eh->ether_shost,



Home | Main Index | Thread Index | Old Index