Don't use a private variable for storing the desired ssid, the net80211 layer
provides that. From OpenBSD.
This commit is contained in:
parent
be39d7253e
commit
a2a222b5c1
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: if_atu.c,v 1.14 2006/03/28 17:38:35 thorpej Exp $ */
|
/* $NetBSD: if_atu.c,v 1.15 2006/05/08 17:12:42 rpaulo Exp $ */
|
||||||
/* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
|
/* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2004
|
* Copyright (c) 2003, 2004
|
||||||
@ -48,7 +48,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.14 2006/03/28 17:38:35 thorpej Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.15 2006/05/08 17:12:42 rpaulo Exp $");
|
||||||
|
|
||||||
#include "bpfilter.h"
|
#include "bpfilter.h"
|
||||||
|
|
||||||
@ -401,6 +401,7 @@ atu_get_mib(struct atu_softc *sc, u_int8_t type, u_int8_t size,
|
|||||||
int
|
int
|
||||||
atu_start_ibss(struct atu_softc *sc)
|
atu_start_ibss(struct atu_softc *sc)
|
||||||
{
|
{
|
||||||
|
struct ieee80211com *ic = &sc->sc_ic;
|
||||||
int err;
|
int err;
|
||||||
struct atu_cmd_start_ibss Request;
|
struct atu_cmd_start_ibss Request;
|
||||||
|
|
||||||
@ -410,8 +411,8 @@ atu_start_ibss(struct atu_softc *sc)
|
|||||||
|
|
||||||
memset(Request.BSSID, 0x00, sizeof(Request.BSSID));
|
memset(Request.BSSID, 0x00, sizeof(Request.BSSID));
|
||||||
memset(Request.SSID, 0x00, sizeof(Request.SSID));
|
memset(Request.SSID, 0x00, sizeof(Request.SSID));
|
||||||
memcpy(Request.SSID, sc->atu_ssid, sc->atu_ssidlen);
|
memcpy(Request.SSID, ic->ic_des_ssid, ic->ic_des_ssidlen);
|
||||||
Request.SSIDSize = sc->atu_ssidlen;
|
Request.SSIDSize = ic->ic_des_ssidlen;
|
||||||
if (sc->atu_desired_channel != IEEE80211_CHAN_ANY)
|
if (sc->atu_desired_channel != IEEE80211_CHAN_ANY)
|
||||||
Request.Channel = (u_int8_t)sc->atu_desired_channel;
|
Request.Channel = (u_int8_t)sc->atu_desired_channel;
|
||||||
else
|
else
|
||||||
@ -452,6 +453,7 @@ atu_start_ibss(struct atu_softc *sc)
|
|||||||
int
|
int
|
||||||
atu_start_scan(struct atu_softc *sc)
|
atu_start_scan(struct atu_softc *sc)
|
||||||
{
|
{
|
||||||
|
struct ieee80211com *ic = &sc->sc_ic;
|
||||||
struct atu_cmd_do_scan Scan;
|
struct atu_cmd_do_scan Scan;
|
||||||
usbd_status err;
|
usbd_status err;
|
||||||
int Cnt;
|
int Cnt;
|
||||||
@ -467,8 +469,8 @@ atu_start_scan(struct atu_softc *sc)
|
|||||||
Scan.BSSID[Cnt] = 0xff;
|
Scan.BSSID[Cnt] = 0xff;
|
||||||
|
|
||||||
memset(Scan.SSID, 0x00, sizeof(Scan.SSID));
|
memset(Scan.SSID, 0x00, sizeof(Scan.SSID));
|
||||||
memcpy(Scan.SSID, sc->atu_ssid, sc->atu_ssidlen);
|
memcpy(Scan.SSID, ic->ic_des_essid, ic->ic_des_esslen);
|
||||||
Scan.SSID_Len = sc->atu_ssidlen;
|
Scan.SSID_Len = ic->ic_des_esslen;
|
||||||
|
|
||||||
/* default values for scan */
|
/* default values for scan */
|
||||||
Scan.ScanType = ATU_SCAN_ACTIVE;
|
Scan.ScanType = ATU_SCAN_ACTIVE;
|
||||||
@ -624,9 +626,9 @@ atu_initial_config(struct atu_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Setting the SSID here doesn't seem to do anything */
|
/* Setting the SSID here doesn't seem to do anything */
|
||||||
memset(cmd.SSID, 0, sizeof(cmd.SSID));
|
memset(cmd.SSID, 0x00, sizeof(cmd.SSID));
|
||||||
memcpy(cmd.SSID, sc->atu_ssid, sc->atu_ssidlen);
|
memcpy(cmd.SSID, ic->ic_des_essid, ic->ic_des_esslen);
|
||||||
cmd.SSID_Len = sc->atu_ssidlen;
|
cmd.SSID_Len = ic->ic_des_esslen;
|
||||||
|
|
||||||
cmd.ShortPreamble = 0;
|
cmd.ShortPreamble = 0;
|
||||||
USETW(cmd.BeaconPeriod, 100);
|
USETW(cmd.BeaconPeriod, 100);
|
||||||
@ -1334,8 +1336,6 @@ atu_complete_attach(struct atu_softc *sc)
|
|||||||
sc->atu_wepkey = 0;
|
sc->atu_wepkey = 0;
|
||||||
|
|
||||||
bzero(sc->atu_bssid, ETHER_ADDR_LEN);
|
bzero(sc->atu_bssid, ETHER_ADDR_LEN);
|
||||||
sc->atu_ssidlen = strlen(ATU_DEFAULT_SSID);
|
|
||||||
memcpy(sc->atu_ssid, ATU_DEFAULT_SSID, sc->atu_ssidlen);
|
|
||||||
sc->atu_channel = ATU_DEFAULT_CHANNEL;
|
sc->atu_channel = ATU_DEFAULT_CHANNEL;
|
||||||
sc->atu_desired_channel = IEEE80211_CHAN_ANY;
|
sc->atu_desired_channel = IEEE80211_CHAN_ANY;
|
||||||
sc->atu_mode = INFRASTRUCTURE_MODE;
|
sc->atu_mode = INFRASTRUCTURE_MODE;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: if_atureg.h,v 1.4 2005/12/11 12:24:00 christos Exp $ */
|
/* $NetBSD: if_atureg.h,v 1.5 2006/05/08 17:12:42 rpaulo Exp $ */
|
||||||
/* $OpenBSD: if_atureg.h,v 1.21 2004/12/23 13:19:38 dlg Exp $ */
|
/* $OpenBSD: if_atureg.h,v 1.21 2004/12/23 13:19:38 dlg Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003
|
* Copyright (c) 2003
|
||||||
@ -162,8 +162,6 @@ struct atu_softc {
|
|||||||
enum atu_radio_type atu_radio;
|
enum atu_radio_type atu_radio;
|
||||||
u_int16_t atu_quirk;
|
u_int16_t atu_quirk;
|
||||||
|
|
||||||
u_int8_t atu_ssid[MAX_SSID_LEN];
|
|
||||||
u_int8_t atu_ssidlen;
|
|
||||||
u_int8_t atu_channel;
|
u_int8_t atu_channel;
|
||||||
u_int16_t atu_desired_channel;
|
u_int16_t atu_desired_channel;
|
||||||
u_int8_t atu_mode;
|
u_int8_t atu_mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user