summaryrefslogtreecommitdiffstats
path: root/sys/dev/an/if_anreg.h
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2001-12-31 22:01:44 +0000
committerambrisko <ambrisko@FreeBSD.org>2001-12-31 22:01:44 +0000
commit508de04e82ba1f0e7980cac1a0be35273fa34c8a (patch)
tree26932daacce7480f16007714fc886d711f073176 /sys/dev/an/if_anreg.h
parent85fc04400d2760738010ae522bfd792cf6c17b1d (diff)
downloadFreeBSD-src-508de04e82ba1f0e7980cac1a0be35273fa34c8a.zip
FreeBSD-src-508de04e82ba1f0e7980cac1a0be35273fa34c8a.tar.gz
Fix bugs in the structure for rx_frame by making gap length one byte and
a packed array so sizeof work. This broke RFMON mode and passing up 802.11 packets. The Linux emulation code was derived from the open source Linux driver to maintain compatibility. LEAP support is added, hints from Richard Johnson. I've verified this locally with PC350v42510.img firmware. More bug fixing from Marco to fix long passwords. Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep so it doesn't look like your system died during a flash update. Install header files in /usr/include/dev/an Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol. This way you can manage 2 keys a little easier. Map the home mode into key 5. Enhance ifconfig to dump the various configured SSIDs. I use a bunch of different ones and roam between them. Use the syntax similar to the WEP keys to deal with setting difference SSIDs. Bump up up the Card capabilities RID since they added 2 bytes to it in the latest firmware. Thankfully we changed it from a terminal failure so the card still worked but the driver whined. Some cleanup patches from Marco Molteni. Submitted by: Richard Johnson <raj@cisco.com> Marco Molteni <molter@tin.it> and myself Various checks: David Wolfskill <david@catwhisker.org> Reviewed by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Approved by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Obtained from: Linux emulation API's from Aironet driver.
Diffstat (limited to 'sys/dev/an/if_anreg.h')
-rw-r--r--sys/dev/an/if_anreg.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/sys/dev/an/if_anreg.h b/sys/dev/an/if_anreg.h
index 0113d93..9d56314 100644
--- a/sys/dev/an/if_anreg.h
+++ b/sys/dev/an/if_anreg.h
@@ -217,30 +217,6 @@ struct an_ltv_gen {
#define AN_DEF_SSID_LEN 7
#define AN_DEF_SSID "tsunami"
-/*
- * Receive frame structure.
- */
-struct an_rxframe {
- u_int32_t an_rx_time; /* 0x00 */
- u_int16_t an_rx_status; /* 0x04 */
- u_int16_t an_rx_payload_len; /* 0x06 */
- u_int8_t an_rsvd0; /* 0x08 */
- u_int8_t an_rx_signal_strength; /* 0x09 */
- u_int8_t an_rx_rate; /* 0x0A */
- u_int8_t an_rx_chan; /* 0x0B */
- u_int8_t an_rx_assoc_cnt; /* 0x0C */
- u_int8_t an_rsvd1[3]; /* 0x0D */
- u_int8_t an_plcp_hdr[4]; /* 0x10 */
- u_int16_t an_frame_ctl; /* 0x14 */
- u_int16_t an_duration; /* 0x16 */
- u_int8_t an_addr1[6]; /* 0x18 */
- u_int8_t an_addr2[6]; /* 0x1E */
- u_int8_t an_addr3[6]; /* 0x24 */
- u_int16_t an_seq_ctl; /* 0x2A */
- u_int8_t an_addr4[6]; /* 0x2C */
- u_int16_t an_gaplen; /* 0x32 */
-};
-
#define AN_RXGAP_MAX 8
/*
@@ -265,8 +241,8 @@ struct an_txframe {
u_int8_t an_addr3[6]; /* 0x24 */
u_int16_t an_seq_ctl; /* 0x2A */
u_int8_t an_addr4[6]; /* 0x2C */
- u_int16_t an_gaplen; /* 0x32 */
-};
+ u_int8_t an_gaplen; /* 0x32 */
+} __attribute__((packed));
struct an_rxframe_802_3 {
u_int16_t an_rx_802_3_status; /* 0x34 */
@@ -386,6 +362,7 @@ struct an_softc {
int an_monitor;
int an_was_monitor;
u_char buf_802_11[MCLBYTES];
+ struct an_req areq;
};
#define AN_LOCK(_sc) mtx_lock(&(_sc)->an_mtx)
OpenPOWER on IntegriCloud