o Comment out the symbol download code for 4.x.
o Add hooks for doing power management of the output signal. o Minor hacks to make flexlint happy wrt staticness of functions.
This commit is contained in:
parent
0b78986fe2
commit
aa23e9c476
@ -50,7 +50,6 @@
|
|||||||
#ifndef SIOCGWAVELAN
|
#ifndef SIOCGWAVELAN
|
||||||
#define SIOCGWAVELAN SIOCGIFGENERIC
|
#define SIOCGWAVELAN SIOCGIFGENERIC
|
||||||
#endif
|
#endif
|
||||||
#define WI_RID_MONITOR_MODE 0x0500
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Technically I don't think there's a limit to a record
|
* Technically I don't think there's a limit to a record
|
||||||
@ -76,6 +75,9 @@ struct wi_req {
|
|||||||
#define WI_RID_ZERO_CACHE 0x0300
|
#define WI_RID_ZERO_CACHE 0x0300
|
||||||
#define WI_RID_READ_CACHE 0x0400
|
#define WI_RID_READ_CACHE 0x0400
|
||||||
#define WI_RID_FWDOWNLOAD 0x0500
|
#define WI_RID_FWDOWNLOAD 0x0500
|
||||||
|
#define WI_RID_MONITOR_MODE 0x0600
|
||||||
|
#define WI_RID_MIF 0x0700
|
||||||
|
|
||||||
|
|
||||||
struct wi_80211_hdr {
|
struct wi_80211_hdr {
|
||||||
u_int16_t frame_ctl;
|
u_int16_t frame_ctl;
|
||||||
@ -698,8 +700,6 @@ struct wi_scan_p2_hdr {
|
|||||||
#define SIOCSPRISM2DEBUG _IOW('i', 137, struct ifreq)
|
#define SIOCSPRISM2DEBUG _IOW('i', 137, struct ifreq)
|
||||||
#define SIOCGPRISM2DEBUG _IOWR('i', 138, struct ifreq)
|
#define SIOCGPRISM2DEBUG _IOWR('i', 138, struct ifreq)
|
||||||
|
|
||||||
#define WI_CMD_DEBUG 0x0038 /* prism2 debug */
|
|
||||||
|
|
||||||
#define WI_DEBUG_RESET 0x00
|
#define WI_DEBUG_RESET 0x00
|
||||||
#define WI_DEBUG_INIT 0x01
|
#define WI_DEBUG_INIT 0x01
|
||||||
#define WI_DEBUG_SLEEP 0x02
|
#define WI_DEBUG_SLEEP 0x02
|
||||||
|
@ -142,10 +142,12 @@ static void wi_media_status(struct ifnet *, struct ifmediareq *);
|
|||||||
static int wi_get_debug(struct wi_softc *, struct wi_req *);
|
static int wi_get_debug(struct wi_softc *, struct wi_req *);
|
||||||
static int wi_set_debug(struct wi_softc *, struct wi_req *);
|
static int wi_set_debug(struct wi_softc *, struct wi_req *);
|
||||||
|
|
||||||
|
#if __FreeBSD_version >= 500000
|
||||||
/* support to download firmware for symbol CF card */
|
/* support to download firmware for symbol CF card */
|
||||||
static int wi_symbol_write_firm(struct wi_softc *, const void *, int,
|
static int wi_symbol_write_firm(struct wi_softc *, const void *, int,
|
||||||
const void *, int);
|
const void *, int);
|
||||||
static int wi_symbol_set_hcr(struct wi_softc *, int);
|
static int wi_symbol_set_hcr(struct wi_softc *, int);
|
||||||
|
#endif
|
||||||
|
|
||||||
devclass_t wi_devclass;
|
devclass_t wi_devclass;
|
||||||
|
|
||||||
@ -842,7 +844,7 @@ wi_txeof(sc, status)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
wi_inquire(xsc)
|
wi_inquire(xsc)
|
||||||
void *xsc;
|
void *xsc;
|
||||||
{
|
{
|
||||||
@ -866,7 +868,7 @@ wi_inquire(xsc)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
wi_update_stats(sc)
|
wi_update_stats(sc)
|
||||||
struct wi_softc *sc;
|
struct wi_softc *sc;
|
||||||
{
|
{
|
||||||
@ -1651,6 +1653,9 @@ wi_ioctl(ifp, command, data)
|
|||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int len;
|
int len;
|
||||||
|
int s;
|
||||||
|
uint16_t mif;
|
||||||
|
uint16_t val;
|
||||||
u_int8_t tmpkey[14];
|
u_int8_t tmpkey[14];
|
||||||
char tmpssid[IEEE80211_NWID_LEN];
|
char tmpssid[IEEE80211_NWID_LEN];
|
||||||
struct wi_softc *sc;
|
struct wi_softc *sc;
|
||||||
@ -1662,7 +1667,6 @@ wi_ioctl(ifp, command, data)
|
|||||||
#else
|
#else
|
||||||
struct proc *td = curproc; /* Little white lie */
|
struct proc *td = curproc; /* Little white lie */
|
||||||
#endif
|
#endif
|
||||||
int s;
|
|
||||||
|
|
||||||
sc = ifp->if_softc;
|
sc = ifp->if_softc;
|
||||||
WI_LOCK(sc, s);
|
WI_LOCK(sc, s);
|
||||||
@ -1763,6 +1767,12 @@ wi_ioctl(ifp, command, data)
|
|||||||
memcpy((char *)wreq.wi_val, (char *)sc->wi_scanbuf,
|
memcpy((char *)wreq.wi_val, (char *)sc->wi_scanbuf,
|
||||||
sc->wi_scanbuf_len * 2);
|
sc->wi_scanbuf_len * 2);
|
||||||
wreq.wi_len = sc->wi_scanbuf_len;
|
wreq.wi_len = sc->wi_scanbuf_len;
|
||||||
|
} else if (wreq.wi_type == WI_RID_MIF) {
|
||||||
|
mif = wreq.wi_val[0];
|
||||||
|
error = wi_cmd(sc, WI_CMD_READMIF, mif, 0, 0);
|
||||||
|
val = CSR_READ_2(sc, WI_RESP0);
|
||||||
|
wreq.wi_len = 2;
|
||||||
|
wreq.wi_val[0] = val;
|
||||||
} else {
|
} else {
|
||||||
if (wi_read_record(sc, (struct wi_ltv_gen *)&wreq)) {
|
if (wi_read_record(sc, (struct wi_ltv_gen *)&wreq)) {
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
@ -1799,6 +1809,10 @@ wi_ioctl(ifp, command, data)
|
|||||||
} else if (wreq.wi_type == WI_RID_SCAN_REQ &&
|
} else if (wreq.wi_type == WI_RID_SCAN_REQ &&
|
||||||
sc->sc_firmware_type == WI_LUCENT) {
|
sc->sc_firmware_type == WI_LUCENT) {
|
||||||
wi_cmd(sc, WI_CMD_INQUIRE, WI_INFO_SCAN_RESULTS, 0, 0);
|
wi_cmd(sc, WI_CMD_INQUIRE, WI_INFO_SCAN_RESULTS, 0, 0);
|
||||||
|
} else if (wreq.wi_type == WI_RID_MIF) {
|
||||||
|
mif = wreq.wi_val[0];
|
||||||
|
val = wreq.wi_val[1];
|
||||||
|
error = wi_cmd(sc, WI_CMD_WRITEMIF, mif, val, 0);
|
||||||
} else {
|
} else {
|
||||||
error = wi_write_record(sc, (struct wi_ltv_gen *)&wreq);
|
error = wi_write_record(sc, (struct wi_ltv_gen *)&wreq);
|
||||||
if (!error)
|
if (!error)
|
||||||
@ -3137,6 +3151,7 @@ wi_set_debug(sc, wreq)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __FreeBSD_version >= 500000
|
||||||
/*
|
/*
|
||||||
* Special routines to download firmware for Symbol CF card.
|
* Special routines to download firmware for Symbol CF card.
|
||||||
* XXX: This should be modified generic into any PRISM-2 based card.
|
* XXX: This should be modified generic into any PRISM-2 based card.
|
||||||
@ -3273,3 +3288,4 @@ wi_symbol_set_hcr(struct wi_softc *sc, int mode)
|
|||||||
tsleep(sc, PWAIT, "wiinit", 1);
|
tsleep(sc, PWAIT, "wiinit", 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -222,6 +222,7 @@ wi_pccard_attach(device_t dev)
|
|||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __FreeBSD_version > 500000
|
||||||
/*
|
/*
|
||||||
* The cute little Symbol LA4100-series CF cards need to have
|
* The cute little Symbol LA4100-series CF cards need to have
|
||||||
* code downloaded to them.
|
* code downloaded to them.
|
||||||
@ -242,6 +243,7 @@ wi_pccard_attach(device_t dev)
|
|||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return (wi_generic_attach(dev));
|
return (wi_generic_attach(dev));
|
||||||
}
|
}
|
||||||
|
@ -214,11 +214,23 @@
|
|||||||
#define WI_CMD_NOTIFY 0x0010
|
#define WI_CMD_NOTIFY 0x0010
|
||||||
#define WI_CMD_INQUIRE 0x0011
|
#define WI_CMD_INQUIRE 0x0011
|
||||||
#define WI_CMD_ACCESS 0x0021
|
#define WI_CMD_ACCESS 0x0021
|
||||||
|
#define WI_CMD_ACCESS_WRITE 0x0121
|
||||||
#define WI_CMD_PROGRAM 0x0022
|
#define WI_CMD_PROGRAM 0x0022
|
||||||
#define WI_CMD_READEE 0x0030 /* symbol only */
|
#define WI_CMD_READEE 0x0030 /* symbol only */
|
||||||
|
#define WI_CMD_READMIF 0x0030 /* prism2 */
|
||||||
|
#define WI_CMD_WRITEMIF 0x0031 /* prism2 */
|
||||||
|
#define WI_CMD_DEBUG 0x0038 /* Various test commands */
|
||||||
|
|
||||||
#define WI_CMD_CODE_MASK 0x003F
|
#define WI_CMD_CODE_MASK 0x003F
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Various cmd test stuff.
|
||||||
|
*/
|
||||||
|
#define WI_TEST_MONITOR 0x0B
|
||||||
|
#define WI_TEST_STOP 0x0F
|
||||||
|
#define WI_TEST_CFG_BITS 0x15
|
||||||
|
#define WI_TEST_CFG_BIT_ALC 0x08
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reclaim qualifier bit, applicable to the
|
* Reclaim qualifier bit, applicable to the
|
||||||
* TX and INQUIRE commands.
|
* TX and INQUIRE commands.
|
||||||
@ -664,3 +676,9 @@ struct wi_frame {
|
|||||||
#define WI_SNAP_WORD1 (WI_SNAP_K2 | (WI_SNAP_CONTROL << 8))
|
#define WI_SNAP_WORD1 (WI_SNAP_K2 | (WI_SNAP_CONTROL << 8))
|
||||||
#define WI_SNAPHDR_LEN 0x6
|
#define WI_SNAPHDR_LEN 0x6
|
||||||
#define WI_FCS_LEN 0x4
|
#define WI_FCS_LEN 0x4
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HFA3861/3863 (BBP) Control Registers
|
||||||
|
*/
|
||||||
|
#define WI_HFA386X_CR_A_D_TEST_MODES2 0x1A
|
||||||
|
#define WI_HFA386X_CR_MANUAL_TX_POWER 0x3E
|
||||||
|
Loading…
x
Reference in New Issue
Block a user