diff options
-rw-r--r-- | at76c503.c | 312 | ||||
-rw-r--r-- | at76c503.h | 83 |
2 files changed, 52 insertions, 343 deletions
@@ -51,21 +51,6 @@ #include "at76c503.h" -#if WIRELESS_EXT < 17 -#define IW_QUAL_QUAL_UPDATED 0x01 -#define IW_QUAL_LEVEL_UPDATED 0x02 -#define IW_QUAL_NOISE_UPDATED 0x04 -#define IW_QUAL_QUAL_INVALID 0x10 -#define IW_QUAL_LEVEL_INVALID 0x20 -#define IW_QUAL_NOISE_INVALID 0x40 -#endif - -#if WIRELESS_EXT < 19 -#define IW_QUAL_ALL_UPDATED 0x07 -#define IW_QUAL_DBM 0x08 -#define IW_QUAL_ALL_INVALID 0x70 -#endif - /* timeout in seconds for the usb_control_msg in get_cmd_status * and set_card_command */ @@ -76,39 +61,13 @@ /* number of endpoints of an interface */ #define NUM_EP(intf) (intf)->altsetting[0].desc.bNumEndpoints #define EP(intf,nr) (intf)->altsetting[0].endpoint[(nr)].desc -#define GET_DEV(udev) usb_get_dev((udev)) -#define PUT_DEV(udev) usb_put_dev((udev)) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) -#define gfp_t int -#endif - -/* Backwards compatibility for usb_kill_urb() */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) -# define usb_kill_urb usb_unlink_urb -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9) -# define eth_hdr(s) (s)->mac.ethernet -# define set_eth_hdr(s,p) (s)->mac.ethernet=(p) -#else -# define set_eth_hdr(s,p) (s)->mac.raw=(unsigned char *)(p) -#endif +#define set_eth_hdr(s,p) (s)->mac.raw=(unsigned char *)(p) /* wireless extension level this source currently supports */ -#define WIRELESS_EXT_SUPPORTED 16 - -#ifndef USB_ASYNC_UNLINK -#ifdef URB_ASYNC_UNLINK -#define USB_ASYNC_UNLINK URB_ASYNC_UNLINK -#else -#define USB_ASYNC_UNLINK 0 -#endif -#endif +#define WIRELESS_EXT_SUPPORTED 21 -#ifndef FILL_BULK_URB #define FILL_BULK_URB(a,b,c,d,e,f,g) usb_fill_bulk_urb(a,b,c,d,e,f,g) -#endif int at76_debug = DBG_DEFAULTS; @@ -116,10 +75,6 @@ int at76_debug = DBG_DEFAULTS; #define dbg_uc(format, arg...) \ printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg) -#ifndef min -#define min(x,y) ((x) < (y) ? (x) : (y)) -#endif - #define assert(x) \ do {\ if (!(x)) \ @@ -132,7 +87,6 @@ int at76_debug = DBG_DEFAULTS; #define DISASSOC_RETRIES 3 - static unsigned long spin_l_istate_flags; #define LOCK_ISTATE() spin_lock_irqsave(&dev->istate_spinlock,spin_l_istate_flags); #define UNLOCK_ISTATE() spin_unlock_irqrestore(&dev->istate_spinlock,spin_l_istate_flags); @@ -757,190 +711,6 @@ static void scan_hook(int blink) } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) - -/* == PROC analyze_usb_config == - This procedure analyzes the configuration after the - USB device got reset and find the start of the interface and the - two endpoint descriptors. - Returns < 0 if the descriptors seems to be wrong. */ -static int analyze_usb_config(u8 *cfgd, int cfgd_len, - int *intf_idx, int *ep0_idx, int *ep1_idx) -{ - u8 *cfgd_start = cfgd; - u8 *cfgd_end = cfgd + cfgd_len; /* first byte after config descriptor */ - int nr_intf=0, nr_ep=0; /* number of interface, number of endpoint descr. - found */ - - assert(cfgd_len >= 2); - if (cfgd_len < 2) - return -1; - - if (*(cfgd+1) != USB_DT_CONFIG) { - err("not a config descriptor"); - return -2; - } - - if (*cfgd != USB_DT_CONFIG_SIZE) { - err("invalid length for config descriptor: %d", *cfgd); - return -3; - } - - /* scan the config descr */ - while ((cfgd+1) < cfgd_end) { - - switch (*(cfgd+1)) { - - case USB_DT_INTERFACE: - nr_intf++; - if (nr_intf == 1) - *intf_idx = cfgd - cfgd_start; - break; - - case USB_DT_ENDPOINT: - nr_ep++; - if (nr_ep == 1) - *ep0_idx = cfgd - cfgd_start; - else - if (nr_ep == 2) - *ep1_idx = cfgd - cfgd_start; - break; - default: - ; - } - cfgd += *cfgd; - } /* while ((cfgd+1) < cfgd_end) */ - - if (nr_ep != 2 || nr_intf != 1) { - err("unexpected nr of intf (%d) or endpoints (%d)", - nr_intf, nr_ep); - return -4; - } - - return 0; -} /* end of analyze_usb_config */ - - - -/* == PROC update_usb_intf_descr == - currently (2.6.0-test2) usb_reset_device() does not recognize that - the interface descr. are changed. - This procedure reads the configuration and does a limited parsing of - the interface and endpoint descriptors. - This is IMHO needed until usb_reset_device() is changed inside the - kernel's USB subsystem. - Copied from usb/core/config.c:usb_get_configuration() - - THIS IS VERY UGLY CODE - DO NOT COPY IT ! */ - -#define AT76C503A_USB_CONFDESCR_LEN 0x20 -/* the short configuration descriptor before reset */ -//#define AT76C503A_USB_SHORT_CONFDESCR_LEN 0x19 - -static int update_usb_intf_descr(struct at76c503 *dev) -{ - int intf0; /* begin of intf descriptor in configuration */ - int ep0, ep1; /* begin of endpoint descriptors */ - - struct usb_device *udev = dev->udev; - struct usb_config_descriptor *cfg_desc; - int result = 0, size; - u8 *buffer; - struct usb_host_interface *ifp; - int i; - - dbg(DBG_DEVSTART, "%s: ENTER", __FUNCTION__); - - cfg_desc = (struct usb_config_descriptor *) - kmalloc(AT76C503A_USB_CONFDESCR_LEN, GFP_KERNEL); - if (!cfg_desc) { - err("cannot kmalloc config desc"); - return -ENOMEM; - } - - result = usb_get_descriptor(udev, USB_DT_CONFIG, 0, - cfg_desc, AT76C503A_USB_CONFDESCR_LEN); - if (result < AT76C503A_USB_CONFDESCR_LEN) { - if (result < 0) - err("unable to get descriptor"); - else { - err("config descriptor too short (expected >= %i, got %i)", - AT76C503A_USB_CONFDESCR_LEN, result); - result = -EINVAL; - } - goto err; - } - - /* now check the config descriptor */ - le16_to_cpus(&cfg_desc->wTotalLength); - size = cfg_desc->wTotalLength; - buffer = (u8 *)cfg_desc; - - if (cfg_desc->bNumInterfaces > 1) { - err("found %d interfaces", cfg_desc->bNumInterfaces); - result = - EINVAL; - goto err; - } - - if ((result=analyze_usb_config(buffer, size, &intf0, &ep0, &ep1))) { - - err("analyze_usb_config returned %d for config desc %s", - result, - hex2str(dev->obuf, (u8 *)cfg_desc, - min((int)(sizeof(dev->obuf)-1)/2,size), '\0')); - result=-EINVAL; - goto err; - } - - /* we got the correct config descriptor - update the interface's endpoints */ - ifp = &udev->actconfig->interface[0]->altsetting[0]; - - if (ifp->endpoint) - kfree(ifp->endpoint); - - memcpy(&ifp->desc, buffer+intf0, USB_DT_INTERFACE_SIZE); - - if (!(ifp->endpoint = kmalloc(2 * sizeof(struct usb_host_endpoint), - GFP_KERNEL))) { - result = -ENOMEM; - goto err; - } - memset(ifp->endpoint, 0, 2 * sizeof(struct usb_host_endpoint)); - memcpy(&ifp->endpoint[0].desc, buffer+ep0, USB_DT_ENDPOINT_SIZE); - le16_to_cpus(&ifp->endpoint[0].desc.wMaxPacketSize); - memcpy(&ifp->endpoint[1].desc, buffer+ep1, USB_DT_ENDPOINT_SIZE); - le16_to_cpus(&ifp->endpoint[1].desc.wMaxPacketSize); - - /* we must set the max packet for the new ep (see usb_set_maxpacket() ) */ - -#define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) - for(i=0; i < ifp->desc.bNumEndpoints; i++) { - struct usb_endpoint_descriptor *d = &ifp->endpoint[i].desc; - int b = d->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; - if (usb_endpoint_out(d->bEndpointAddress)) { - if (d->wMaxPacketSize > udev->epmaxpacketout[b]) - udev->epmaxpacketout[b] = d->wMaxPacketSize; - } else { - if (d->wMaxPacketSize > udev->epmaxpacketin[b]) - udev->epmaxpacketin[b] = d->wMaxPacketSize; - } - } - - dbg(DBG_DEVSTART, "%s: ifp %p num_altsetting %d " - "endpoint addr x%x, x%x", __FUNCTION__, - ifp, udev->actconfig->interface[0]->num_altsetting, - ifp->endpoint[0].desc.bEndpointAddress, - ifp->endpoint[1].desc.bEndpointAddress); - result = 0; -err: - kfree(cfg_desc); - dbg(DBG_DEVSTART, "%s: EXIT with %d", __FUNCTION__, result); - return result; -} /* update_usb_intf_descr */ - -#endif /* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) */ - - static int at76c503_remap(struct usb_device *udev) { int ret; @@ -2059,8 +1829,10 @@ static void handle_mgmt_timeout_scan(struct at76c503 *dev) /* report the end of scan to user space */ iwevent_scan_complete(dev->netdev); NEW_STATE(dev,JOINING); +#if 0 assert(dev->curr_bss == NULL); /* done in free_bss_list, find_bss will start with first bss */ +#endif /* call join_bss immediately after re-run of all other threads in kevent */ defer_kevent(dev,KEVENT_JOIN); @@ -2796,7 +2568,9 @@ end_join: if (test_bit(KEVENT_RESTART, &dev->kevent_flags)) { clear_bit(KEVENT_RESTART, &dev->kevent_flags); LOCK_ISTATE() +#if 0 assert(dev->istate == INIT); +#endif UNLOCK_ISTATE() startup_device(dev); @@ -2878,27 +2652,7 @@ end_join: usb_reset_device(dev->udev); -/* with 2.6.8 the reset above will cause a disconnect as the USB subsys - recognizes the change in the config descriptors. Subsequently the device - will be registered again. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) - - //jal: patch the state (patch by Dmitri) - dev->udev->state = USB_STATE_CONFIGURED; - - /* jal: currently (2.6.0-test2 and 2.4.23) - usb_reset_device() does not recognize that - the interface descr. are changed. - This procedure reads the configuration and does a limited parsing of - the interface and endpoint descriptors */ - update_usb_intf_descr(dev); - - /* continue immediately with external fw download */ - set_bit (KEVENT_EXTERNAL_FW, &dev->kevent_flags); -#else - /* kernel >= 2.6.8 */ NEW_STATE(dev, WAIT_FOR_DISCONNECT); -#endif } if (test_bit(KEVENT_EXTERNAL_FW, &dev->kevent_flags)) { @@ -4725,9 +4479,7 @@ static void at76c503_tx_timeout(struct net_device *netdev) if (!dev) return; warn("%s: tx timeout.", netdev->name); -#if WIRELESS_EXT < 17 - dev->write_urb->transfer_flags |= USB_ASYNC_UNLINK; -#endif + usb_unlink_urb(dev->write_urb); dev->stats.tx_errors++; } @@ -5439,9 +5191,7 @@ static int at76c503_iw_handler_set_scan(struct net_device *netdev, struct at76c503 *dev = (struct at76c503*)netdev->priv; unsigned long flags; int ret = 0; -#if WIRELESS_EXT > 19 struct iw_scan_req *req = NULL; -#endif dbg(DBG_IOCTL, "%s: SIOCSIWSCAN", netdev->name); @@ -5475,12 +5225,11 @@ static int at76c503_iw_handler_set_scan(struct net_device *netdev, spin_unlock_irqrestore(&(dev->mgmt_spinlock), flags); if (netif_running(dev->netdev)) { - /* pause network activity */ + /* pause network activity */ netif_carrier_off(dev->netdev); netif_stop_queue(dev->netdev); } - /* Try to do passive or active scan if WE asks as. */ -#if WIRELESS_EXT > 19 + /* Try to do passive or active scan if WE asks as. */ if (wrqu->data.length && wrqu->data.length == sizeof(struct iw_scan_req)) { req = (struct iw_scan_req *)extra; @@ -5506,7 +5255,6 @@ static int at76c503_iw_handler_set_scan(struct net_device *netdev, } UNLOCK_ISTATE() } -#endif /* change to scanning state */ NEW_STATE(dev, SCANNING); @@ -5646,22 +5394,11 @@ static int at76c503_iw_handler_set_essid(struct net_device *netdev, dbg(DBG_IOCTL, "%s: SIOCSIWESSID - %s", netdev->name, extra); - if (data->flags) - { + if (data->flags) { memcpy(dev->essid, extra, data->length); dev->essid_size = data->length; -#if WIRELESS_EXT < 21 - /* For historic reasons, the SSID length used to include one - * extra character, C string nul termination, even though SSID is - * really an octet string that should not be presented as a C - * string. WE-21 changes this to explicitly require the length - * _not_ to include nul termination, but for WE < 21, decrement - * the length count here to remove the nul termination. */ - dev->essid_size = max(dev->essid_size - 1, 0); -#endif } - else - { + else { /* Use any SSID */ dev->essid_size = 0; } @@ -6413,12 +6150,7 @@ static const struct iw_handler_def at76c503_handler_def = .standard = (iw_handler *) at76c503_handlers, .private = (iw_handler *) at76c503_priv_handlers, .private_args = (struct iw_priv_args *) at76c503_priv_args, -#if WIRELESS_EXT > 16 .get_wireless_stats = at76c503_get_wireless_stats, -#endif -#if WIRELESS_EXT == 15 || WIRELESS_EXT == 16 - .spy_offset = offsetof(struct at76c503, spy_data), -#endif }; @@ -6466,11 +6198,7 @@ static void at76c503_delete_device(struct at76c503 *dev) dbg(DBG_PROC_ENTRY, "%s: ENTER",__FUNCTION__); if (dev->netdev_registered) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17) - if (down_trylock(&rtnl_sem) != 0) { -#else if (rtnl_trylock() == 0) { -#endif info("%s: rtnl_sem already down'ed", __FUNCTION__); } else { /* synchronously calls at76c503_stop() */ @@ -6479,7 +6207,7 @@ static void at76c503_delete_device(struct at76c503 *dev) } } - PUT_DEV(dev->udev); + usb_put_dev(dev->udev); /* assuming we used keventd, it must quiesce too */ flush_scheduled_work (); @@ -6605,6 +6333,7 @@ static int at76c503_alloc_urbs(struct at76c503 *dev) return 0; } + static struct at76c503 *alloc_new_device(struct usb_device *udev, int board_type, const char *netdev_name) @@ -6627,11 +6356,7 @@ static struct at76c503 *alloc_new_device(struct usb_device *udev, dev->netdev = netdev; init_MUTEX (&dev->sem); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) - INIT_WORK (&dev->kevent, (void (*)(void *))kevent, &dev->kevent); -#else INIT_WORK (&dev->kevent, kevent); -#endif dev->open_count = 0; @@ -6773,13 +6498,9 @@ static int init_new_device(struct at76c503 *dev) netdev->get_stats = at76c503_get_stats; netdev->ethtool_ops = &at76c503_ethtool_ops; -#if WIRELESS_EXT > 16 /* Add pointers to enable iwspy support. */ dev->wireless_data.spy_data = &dev->spy_data; netdev->wireless_data = &dev->wireless_data; -#else /* WIRELESS_EXT > 16 */ - netdev->get_wireless_stats = at76c503_get_wireless_stats; -#endif /* WIRELESS_EXT > 16 */ netdev->hard_start_xmit = at76c503_tx; netdev->tx_timeout = at76c503_tx_timeout; @@ -6876,7 +6597,7 @@ static int at76c503_do_probe(struct module *mod, struct usb_device *udev, char *id_str; u32 version; - GET_DEV(udev); + usb_get_dev(udev); if ((dev=alloc_new_device(udev, (u8)board_type, netdev_name)) == NULL) { ret = -ENOMEM; @@ -6999,7 +6720,7 @@ static int at76c503_do_probe(struct module *mod, struct usb_device *udev, return 0; error: - PUT_DEV(udev); + usb_put_dev(udev); return ret; } @@ -7341,9 +7062,6 @@ static void at76c50x_disconnect(struct usb_interface *interface) /* structure for registering this driver with the USB subsystem */ static struct usb_driver module_usb = { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) - .owner = THIS_MODULE, -#endif .name = DRIVER_NAME, .probe = at76c50x_probe, .disconnect = at76c50x_disconnect, @@ -19,7 +19,7 @@ * kept binary only). Thanks for that decision to Atmel! * * For the latest version of this driver, mailinglists - * and other info, please check + * and other info, please check * http://at76c503a.berlios.de/ */ @@ -90,7 +90,7 @@ #define MIB_FW_VERSION 0x08 #define MIB_MDOMAIN 0x09 -#define ADHOC_MODE 1 +#define ADHOC_MODE 1 #define INFRASTRUCTURE_MODE 2 /* values for struct mib_local, field preamble_type */ @@ -98,11 +98,11 @@ #define PREAMBLE_TYPE_LONG 0 /* values for tx_rate */ -#define TX_RATE_1MBIT 0 -#define TX_RATE_2MBIT 1 +#define TX_RATE_1MBIT 0 +#define TX_RATE_2MBIT 1 #define TX_RATE_5_5MBIT 2 -#define TX_RATE_11MBIT 3 -#define TX_RATE_AUTO 4 +#define TX_RATE_11MBIT 3 +#define TX_RATE_AUTO 4 /* power management modes */ #define PM_ACTIVE 1 @@ -127,7 +127,7 @@ /* valid only for rfmd and 505 !*/ #define IBSS_CHANGE_OK_OFFSET offsetof(struct mib_mac_mgmt, ibss_change) -#define IROAMING_IMPL_OFFSET offsetof(struct mib_mac_mgmt, multi_domain_capability_implemented) +#define IROAMING_IMPL_OFFSET offsetof(struct mib_mac_mgmt, multi_domain_capability_implemented) #define IROAMING_OFFSET \ offsetof(struct mib_mac_mgmt, multi_domain_capability_enabled) /* the AssocID */ @@ -135,7 +135,7 @@ #define POWER_MGMT_MODE_OFFSET offsetof(struct mib_mac_mgmt, power_mgmt_mode) #define LISTEN_INTERVAL_OFFSET offsetof(struct mib_mac, listen_interval) -#define PRIVACY_OPT_IMPL offsetof(struct mib_mac_mgmt, privacy_option_implemented) +#define PRIVACY_OPT_IMPL offsetof(struct mib_mac_mgmt, privacy_option_implemented) #define BOARDTYPE_503_INTERSIL_3861 1 #define BOARDTYPE_503_INTERSIL_3863 2 @@ -188,12 +188,12 @@ struct at76c503_card_config{ u8 short_retry_limit; u8 encryption_type; __le16 rts_threshold; - __le16 fragmentation_threshold; // 256..2346 + __le16 fragmentation_threshold; /* 256..2346 */ u8 basic_rate_set[4]; - u8 auto_rate_fallback; //0,1 + u8 auto_rate_fallback; /* 0,1 */ u8 channel; u8 privacy_invoked; - u8 wep_default_key_id; // 0..3 + u8 wep_default_key_id; /* 0..3 */ u8 current_ssid[32]; u8 wep_default_key_value[4][WEP_KEY_LEN]; u8 ssid_len; @@ -461,22 +461,16 @@ struct at76c503 { struct net_device_stats stats; struct iw_statistics wstats; struct usb_interface *interface; /* the interface for this device */ - -// unsigned char num_ports; /* the number of ports this device has */ -// char num_interrupt_in; /* number of interrupt in endpoints we have */ -// char num_bulk_in; /* number of bulk in endpoints we have */ -// char num_bulk_out; /* number of bulk out endpoints we have */ - + struct sk_buff * rx_skb; /* skbuff for receiving packets */ __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */ - unsigned char * bulk_out_buffer; /* the buffer to send data */ + unsigned char * bulk_out_buffer; /* the buffer to send data */ int bulk_out_size; /* the size of the send buffer */ struct urb * write_urb; /* the urb used to send data */ struct urb * read_urb; __u8 bulk_out_endpointAddr; /* the address of the bulk out endpoint */ -// struct work_struct tqueue; /* task queue for line discipline waking up */ int open_count; /* number of times this port has been opened */ struct semaphore sem; /* locks this structure */ @@ -485,7 +479,7 @@ struct at76c503 { struct work_struct kevent; int nr_submit_rx_tries; /* number of tries to submit an rx urb left */ struct tasklet_struct tasklet; - struct urb *rx_urb; /* tmp urb pointer for rx_tasklet */ + struct urb *rx_urb; /* tmp urb pointer for rx_tasklet */ unsigned char *ctrl_buffer; struct urb *ctrl_urb; @@ -493,8 +487,8 @@ struct at76c503 { u8 op_mode; /* the WEP stuff */ - int wep_enabled; /* 1 if WEP is enabled */ - int wep_key_id; /* key id to be used */ + int wep_enabled; /* 1 if WEP is enabled */ + int wep_key_id; /* key id to be used */ u8 wep_keys[WEP_KEYS][WEP_KEY_LEN]; /* the four WEP keys, 5 or 13 bytes are used */ u8 wep_keys_len[WEP_KEYS]; /* the length of the above keys */ @@ -509,22 +503,21 @@ struct at76c503 { int radio_on; int promisc; - int preamble_type; /* 0 - long preamble, 1 - short preamble */ - int auth_mode; /* authentication type: 0 open, 1 shared key */ - int txrate; /* 0,1,2,3 = 1,2,5.5,11 MBit, 4 is auto-fallback */ + int preamble_type; /* 0 - long preamble, 1 - short preamble */ + int auth_mode; /* authentication type: 0 open, 1 shared key */ + int txrate; /* 0,1,2,3 = 1,2,5.5,11 MBit, 4 is auto-fallback */ int frag_threshold; /* threshold for fragmentation of tx packets */ - int rts_threshold; /* threshold for RTS mechanism */ + int rts_threshold; /* threshold for RTS mechanism */ int short_retry_limit; - //int long_retry_limit; - int scan_min_time; /* scan min channel time */ - int scan_max_time; /* scan max channel time */ - int scan_mode; /* SCAN_TYPE_ACTIVE, SCAN_TYPE_PASSIVE */ - int scan_runs; /* counts how many scans are started */ + int scan_min_time; /* scan min channel time */ + int scan_max_time; /* scan max channel time */ + int scan_mode; /* SCAN_TYPE_ACTIVE, SCAN_TYPE_PASSIVE */ + int scan_runs; /* counts how many scans are started */ /* the list we got from scanning */ spinlock_t bss_list_spinlock; /* protects bss_list operations and setting - curr_bss and new_bss */ + curr_bss and new_bss */ struct list_head bss_list; /* the list of bss we received beacons from */ struct timer_list bss_list_timer; /* a timer removing old entries from the bss_list. It must acquire bss_list_spinlock @@ -533,21 +526,21 @@ struct at76c503 { struct bss_info *curr_bss; /* if istate == AUTH, ASSOC, REASSOC, JOIN or CONN dev->bss[curr_bss] is the currently selected BSS we operate on */ - struct bss_info *new_bss; /* if istate == REASSOC dev->new_bss - is the new bss we want to reassoc to */ + struct bss_info *new_bss; /* if istate == REASSOC dev->new_bss + is the new bss we want to reassoc to */ u8 wanted_bssid[ETH_ALEN]; - int wanted_bssid_valid; /* != 0 if wanted_bssid is to be used */ + int wanted_bssid_valid; /* != 0 if wanted_bssid is to be used */ /* some data for infrastructure mode only */ - spinlock_t mgmt_spinlock; /* this spinlock protects access to - next_mgmt_bulk */ - spinlock_t istate_spinlock; /* this spinlock protects access to - istate */ + spinlock_t mgmt_spinlock; /* this spinlock protects access to + next_mgmt_bulk */ + spinlock_t istate_spinlock;/* this spinlock protects access to + istate */ struct at76c503_tx_buffer *next_mgmt_bulk; /* pending management msg to - send via bulk out */ + send via bulk out */ enum infra_state istate; enum { SITE_SURVEY_IDLE, @@ -559,13 +552,13 @@ struct at76c503 { struct timer_list restart_timer; /* the timer we use to delay the restart a bit */ struct timer_list mgmt_timer; /* the timer we use to repeat auth_req etc. */ - int retries; /* counts backwards while re-trying to send auth/assoc_req's */ + int retries; /* counts backwards while re-trying to send auth/assoc_req's */ u16 assoc_id; /* the assoc_id for states JOINING, REASSOCIATING, CONNECTED */ u8 pm_mode ; /* power management mode: ACTIVE, SAVE, SMART_SAVE */ - u32 pm_period_us; /* power manag. period (in us ?) - set by iwconfig */ + u32 pm_period_us; /* power manag. period (in us ?) - set by iwconfig */ u32 pm_period_beacon; /* power manag. period (in beacon intervals of the curr_bss) */ - u32 board_type; /* BOARDTYPE_* defined above*/ + u32 board_type; /* BOARDTYPE_* defined above */ struct reg_domain const *domain; /* the description of the regulatory domain */ @@ -573,9 +566,7 @@ struct at76c503 { spinlock_t spy_spinlock; struct iw_spy_data spy_data; -#if WIRELESS_EXT > 16 struct iw_public_data wireless_data; -#endif /* WIRELESS_EXT > 16 */ /* These fields contain HW config provided by the device (not all of * these fields are used by all board types) */ @@ -612,7 +603,7 @@ struct at76c503 { unsigned int device_unplugged:1; unsigned int netdev_registered:1; char obuf[2*256+1]; /* global debug output buffer to reduce stack usage */ - char obuf_s[3*32]; /* small global debug output buffer to reduce stack usage */ + char obuf_s[3*32]; /* small global debug output buffer to reduce stack usage */ struct set_mib_buffer mib_buf; /* global buffer for set_mib calls */ /* new whiz-bang feature flags */ |