From owner-p4-projects@FreeBSD.ORG Wed Jan 2 17:55:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96C3916A420; Wed, 2 Jan 2008 17:55:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C70616A41A for ; Wed, 2 Jan 2008 17:55:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4B23613C465 for ; Wed, 2 Jan 2008 17:55:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m02HtAev072084 for ; Wed, 2 Jan 2008 17:55:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m02HtAYd072078 for perforce@freebsd.org; Wed, 2 Jan 2008 17:55:10 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 2 Jan 2008 17:55:10 GMT Message-Id: <200801021755.m02HtAYd072078@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132315 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 17:55:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=132315 Change 132315 by hselasky@hselasky_laptop001 on 2008/01/02 17:55:04 Some corrections and additions. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#13 (text+ko) ==== @@ -1066,6 +1066,7 @@ uint16_t count; } __packed; +#define ZYD_HW_PADDING 10 /* bytes */ #define ZYD_CONFIG_INDEX 0 #define ZYD_IFACE_INDEX 0 @@ -1079,7 +1080,6 @@ #define ZYD_MIN_FRAGSZ \ (sizeof(struct zyd_plcphdr) + IEEE80211_MIN_LEN + \ sizeof(struct zyd_rx_stat)) -#define ZYD_MIN_RXBUFSZ ZYD_MIN_FRAGSZ #define ZYX_MAX_RXBUFSZ \ ((sizeof (struct zyd_plcphdr) + IEEE80211_MAX_LEN + \ sizeof (struct zyd_rx_stat)) * ZYD_MAX_RXFRAMECNT + \ @@ -1140,25 +1140,28 @@ struct zyd_rf { /* RF methods */ - int (*init) (struct zyd_rf *); - int (*switch_radio) (struct zyd_rf *, int); - int (*set_channel) (struct zyd_rf *, uint8_t); - - /* RF attributes */ - struct zyd_softc *rf_sc; /* back-pointer */ - int width; + void (*cfg_init_hw) (struct zyd_softc *, struct zyd_rf *); + void (*cfg_switch_radio) (struct zyd_softc *, uint8_t on); + void (*cfg_set_channel) (struct zyd_softc *, struct zyd_rf *, uint8_t); + uint8_t width; }; -struct zyd_rq { - const uint16_t *idata; - struct zyd_pair *odata; - int len; - STAILQ_ENTRY(rq) rq; +enum { + ZYD_TR_BULK_DT_WR, + ZYD_TR_BULK_DT_RD, + ZYD_TR_BULK_CS_WR, + ZYD_TR_BULK_CS_RD, + ZYD_TR_INTR_DT_WR, + ZYD_TR_INTR_DT_RD, + ZYD_TR_INTR_CS_WR, + ZYD_TR_INTR_CS_RD, + ZYD_N_TRANSFER, }; struct zyd_softc { void *sc_evilhack; /* XXX this pointer must be first */ + struct ieee80211_amrr sc_amrr; struct ieee80211com sc_ic; struct zyd_rf sc_rf; struct usb_callout sc_watchdog; @@ -1167,8 +1170,8 @@ struct ieee80211_beacon_offsets sc_bo; struct zyd_rx_radiotap_header sc_rxtap; struct zyd_tx_radiotap_header sc_txtap; - struct zyd_rf sc_rf; - STAILQ_HEAD(rqh, zyd_rq) sc_rqh; + struct zyd_cmd sc_intr_ibuf; + struct zyd_cmd sc_intr_obuf; struct ifnet *sc_ifp; int (*sc_newstate) (struct ieee80211com *, @@ -1179,16 +1182,16 @@ uint32_t sc_rxtap_len; uint32_t sc_txtap_len; + uint32_t sc_unit; uint16_t sc_firmware_base; uint16_t sc_fw_ver; uint16_t sc_fwbase; uint16_t sc_fw_rev; - uint8_t sc_intr_obuf[ZYD_INTR_BUF_SIZE]; - uint8_t sc_intr_ibuf[ZYD_INTR_BUF_SIZE]; uint8_t sc_intr_iwakeup; uint8_t sc_intr_owakeup; + uint8_t sc_intr_ilen; uint8_t sc_intr_olen; uint8_t sc_regdomain; uint8_t sc_mac_rev; @@ -1212,5 +1215,38 @@ #define ZYD_FLAG_LL_READY 0x40 #define ZYD_FLAG_WAIT_COMMAND 0x80 + uint8_t sc_amrr_timer; + uint8_t sc_name[16]; }; + +struct zyd_config_copy { + struct { + uint32_t chan_to_ieee; + uint16_t ic_freq; + uint8_t chan_is_2ghz; + } ic_curchan; + + struct { + struct { + uint8_t chan_is_5ghz; + } ni_chan; + + uint16_t ni_intval; + uint8_t ni_bssid[IEEE80211_ADDR_LEN]; + } ic_bss; + + enum ieee80211_opmode ic_opmode; + enum ieee80211_state ic_state; + uint32_t ic_flags; + uint32_t if_flags; + + uint32_t zyd_multi_low; + uint32_t zyd_multi_high; + + uint16_t ic_txpowlimit; + uint16_t ic_curmode; + + uint8_t ic_myaddr[IEEE80211_ADDR_LEN]; + uint8_t if_broadcastaddr[IEEE80211_ADDR_LEN]; +};