From dd90c968339ddd84c51b966bb78c53ff921198ec Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Fri, 9 Mar 2007 23:37:57 +0100 Subject: run through Lindent and merge in most of the hunks --- at76_usb.h | 494 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 246 insertions(+), 248 deletions(-) (limited to 'at76_usb.h') diff --git a/at76_usb.h b/at76_usb.h index 02b0149..9090f44 100644 --- a/at76_usb.h +++ b/at76_usb.h @@ -118,7 +118,7 @@ #define TX_AUTORATE_FALLBACK_OFFSET offsetof(struct mib_local,txautorate_fallback) #define FRAGMENTATION_OFFSET offsetof(struct mib_mac,frag_threshold) #define PREAMBLE_TYPE_OFFSET offsetof(struct mib_local,preamble_type) -#define RTS_OFFSET offsetof(struct mib_mac, rts_threshold) +#define RTS_OFFSET offsetof(struct mib_mac, rts_threshold) /* valid only for rfmd and 505 !*/ #define IBSS_CHANGE_OK_OFFSET offsetof(struct mib_mac_mgmt, ibss_change) @@ -145,41 +145,41 @@ struct hwcfg_r505 { } __attribute__ ((packed)); struct hwcfg_rfmd { - u8 cr20_values[14]; - u8 cr21_values[14]; - u8 bb_cr[14]; - u8 pidvid[4]; - u8 mac_addr[ETH_ALEN]; - u8 regulatory_domain; - u8 low_power_values[14]; - u8 normal_power_values[14]; - u8 reserved1[3]; + u8 cr20_values[14]; + u8 cr21_values[14]; + u8 bb_cr[14]; + u8 pidvid[4]; + u8 mac_addr[ETH_ALEN]; + u8 regulatory_domain; + u8 low_power_values[14]; + u8 normal_power_values[14]; + u8 reserved1[3]; } __attribute__ ((packed)); struct hwcfg_intersil { - u8 mac_addr[ETH_ALEN]; - u8 cr31_values[14]; - u8 cr58_values[14]; - u8 pidvid[4]; - u8 regulatory_domain; - u8 reserved[1]; + u8 mac_addr[ETH_ALEN]; + u8 cr31_values[14]; + u8 cr58_values[14]; + u8 pidvid[4]; + u8 regulatory_domain; + u8 reserved[1]; } __attribute__ ((packed)); #define WEP_SMALL_KEY_LEN (40/8) #define WEP_LARGE_KEY_LEN (104/8) -struct at76c503_card_config{ +struct at76c503_card_config { u8 exclude_unencrypted; u8 promiscuous_mode; 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; @@ -187,7 +187,7 @@ struct at76c503_card_config{ __le16 beacon_period; } __attribute__ ((packed)); -struct at76c503_command{ +struct at76c503_command { u8 cmd; u8 reserved; __le16 size; @@ -224,15 +224,15 @@ struct at76c503_tx_buffer { #define SCAN_TYPE_PASSIVE 1 struct at76c503_start_scan { - u8 bssid[ETH_ALEN]; - u8 essid[32]; - u8 scan_type; - u8 channel; + u8 bssid[ETH_ALEN]; + u8 essid[32]; + u8 scan_type; + u8 channel; __le16 probe_delay; __le16 min_channel_time; __le16 max_channel_time; - u8 essid_size; - u8 international_scan; + u8 essid_size; + u8 international_scan; } __attribute__ ((packed)); struct at76c503_start_bss { @@ -263,89 +263,89 @@ struct set_mib_buffer { } __attribute__ ((packed)); struct mib_local { - u16 reserved0; - u8 beacon_enable; - u8 txautorate_fallback; - u8 reserved1; - u8 ssid_size; - u8 promiscuous_mode; - u16 reserved2; - u8 preamble_type; - u16 reserved3; + u16 reserved0; + u8 beacon_enable; + u8 txautorate_fallback; + u8 reserved1; + u8 ssid_size; + u8 promiscuous_mode; + u16 reserved2; + u8 preamble_type; + u16 reserved3; } __attribute__ ((packed)); struct mib_mac_addr { u8 mac_addr[ETH_ALEN]; - u8 res[2]; /* ??? */ - u8 group_addr[4][ETH_ALEN]; - u8 group_addr_status[4]; + u8 res[2]; /* ??? */ + u8 group_addr[4][ETH_ALEN]; + u8 group_addr_status[4]; } __attribute__ ((packed)); struct mib_mac { - __le32 max_tx_msdu_lifetime; - __le32 max_rx_lifetime; - __le16 frag_threshold; - __le16 rts_threshold; - __le16 cwmin; - __le16 cwmax; - u8 short_retry_time; - u8 long_retry_time; - u8 scan_type; /* active or passive */ - u8 scan_channel; - __le16 probe_delay; /* delay before sending a ProbeReq in active scan, RO */ - __le16 min_channel_time; - __le16 max_channel_time; - __le16 listen_interval; - u8 desired_ssid[32]; - u8 desired_bssid[ETH_ALEN]; - u8 desired_bsstype; /* ad-hoc or infrastructure */ - u8 reserved2; + __le32 max_tx_msdu_lifetime; + __le32 max_rx_lifetime; + __le16 frag_threshold; + __le16 rts_threshold; + __le16 cwmin; + __le16 cwmax; + u8 short_retry_time; + u8 long_retry_time; + u8 scan_type; /* active or passive */ + u8 scan_channel; + __le16 probe_delay; /* delay before sending a ProbeReq in active scan, RO */ + __le16 min_channel_time; + __le16 max_channel_time; + __le16 listen_interval; + u8 desired_ssid[32]; + u8 desired_bssid[ETH_ALEN]; + u8 desired_bsstype; /* ad-hoc or infrastructure */ + u8 reserved2; } __attribute__ ((packed)); struct mib_mac_mgmt { __le16 beacon_period; __le16 CFP_max_duration; __le16 medium_occupancy_limit; - __le16 station_id; /* assoc id */ + __le16 station_id; /* assoc id */ __le16 ATIM_window; - u8 CFP_mode; - u8 privacy_option_implemented; - u8 DTIM_period; - u8 CFP_period; - u8 current_bssid[ETH_ALEN]; - u8 current_essid[32]; - u8 current_bss_type; - u8 power_mgmt_mode; + u8 CFP_mode; + u8 privacy_option_implemented; + u8 DTIM_period; + u8 CFP_period; + u8 current_bssid[ETH_ALEN]; + u8 current_essid[32]; + u8 current_bss_type; + u8 power_mgmt_mode; /* rfmd and 505 */ - u8 ibss_change; - u8 res; - u8 multi_domain_capability_implemented; - u8 multi_domain_capability_enabled; - u8 country_string[3]; - u8 reserved[3]; + u8 ibss_change; + u8 res; + u8 multi_domain_capability_implemented; + u8 multi_domain_capability_enabled; + u8 country_string[3]; + u8 reserved[3]; } __attribute__ ((packed)); struct mib_mac_wep { - u8 privacy_invoked; /* 0 disable encr., 1 enable encr */ - u8 wep_default_key_id; - u8 wep_key_mapping_len; - u8 exclude_unencrypted; - __le32 wep_icv_error_count; - __le32 wep_excluded_count; - u8 wep_default_keyvalue[WEP_KEYS][WEP_KEY_LEN]; - u8 encryption_level; /* 1 for 40bit, 2 for 104bit encryption */ + u8 privacy_invoked; /* 0 disable encr., 1 enable encr */ + u8 wep_default_key_id; + u8 wep_key_mapping_len; + u8 exclude_unencrypted; + __le32 wep_icv_error_count; + __le32 wep_excluded_count; + u8 wep_default_keyvalue[WEP_KEYS][WEP_KEY_LEN]; + u8 encryption_level; /* 1 for 40bit, 2 for 104bit encryption */ } __attribute__ ((packed)); struct mib_phy { __le32 ed_threshold; - + __le16 slot_time; __le16 sifs_time; __le16 preamble_length; __le16 plcp_header_length; __le16 mpdu_max_length; __le16 cca_mode_supported; - + u8 operation_rate_set[4]; u8 channel_id; u8 current_cca_mode; @@ -354,21 +354,22 @@ struct mib_phy { } __attribute__ ((packed)); struct mib_fw_version { - u8 major; - u8 minor; - u8 patch; - u8 build; + u8 major; + u8 minor; + u8 patch; + u8 build; } __attribute__ ((packed)); struct mib_mdomain { - u8 tx_powerlevel[14]; - u8 channel_list[14]; /* 0 for invalid channels */ + u8 tx_powerlevel[14]; + u8 channel_list[14]; /* 0 for invalid channels */ } __attribute__ ((packed)); -static u8 snapsig[] = {0xaa, 0xaa, 0x03}; +static u8 snapsig[] = { 0xaa, 0xaa, 0x03 }; + /* RFC 1042 encapsulates Ethernet frames in 802.2 SNAP (0xaa, 0xaa, 0x03) with * a SNAP OID of 0 (0x00, 0x00, 0x00) */ -static u8 rfc1042sig[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}; +static u8 rfc1042sig[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; /* states in infrastructure mode */ enum infra_state { @@ -391,22 +392,22 @@ enum infra_state { #define KEVENT_NEW_BSS 2 #define KEVENT_SET_PROMISC 3 #define KEVENT_MGMT_TIMEOUT 4 -#define KEVENT_SCAN 5 +#define KEVENT_SCAN 5 #define KEVENT_JOIN 6 #define KEVENT_STARTIBSS 7 #define KEVENT_SUBMIT_RX 8 -#define KEVENT_RESTART 9 /* restart the device */ -#define KEVENT_ASSOC_DONE 10 /* execute the power save settings: - listen interval, pm mode, assoc id */ +#define KEVENT_RESTART 9 /* restart the device */ +#define KEVENT_ASSOC_DONE 10 /* execute the power save settings: + listen interval, pm mode, assoc id */ #define KEVENT_EXTERNAL_FW 11 #define KEVENT_INTERNAL_FW 12 #define KEVENT_RESET_DEVICE 13 /* a description of a regulatory domain and the allowed channels */ struct reg_domain { - u16 code; - char const *name; - u32 channel_map; /* if bit N is set, channel (N+1) is allowed */ + u16 code; + char const *name; + u32 channel_map; /* if bit N is set, channel (N+1) is allowed */ }; /* how long do we keep a (I)BSS in the bss_list in jiffies @@ -415,25 +416,25 @@ struct reg_domain { other channels than the one the device locks on get removed, too */ #define BSS_LIST_TIMEOUT (120*HZ) /* struct to store BSS info found during scan */ -#define BSS_LIST_MAX_RATE_LEN 32 /* 32 rates should be enough ... */ +#define BSS_LIST_MAX_RATE_LEN 32 /* 32 rates should be enough ... */ -struct bss_info{ +struct bss_info { struct list_head list; - u8 mac[ETH_ALEN]; /* real mac address, differs - for ad-hoc from bssid */ - u8 bssid[ETH_ALEN]; /* bssid */ - u8 ssid[IW_ESSID_MAX_SIZE+1]; /* ssid, +1 for trailing \0 - to make it printable */ - u8 ssid_len; /* length of ssid above */ + u8 mac[ETH_ALEN]; /* real mac address, differs + for ad-hoc from bssid */ + u8 bssid[ETH_ALEN]; /* bssid */ + u8 ssid[IW_ESSID_MAX_SIZE + 1]; /* ssid, +1 for trailing \0 + to make it printable */ + u8 ssid_len; /* length of ssid above */ u8 channel; - u16 capa; /* the capabilities of the BSS (in original endianess - - we only check IEEE802_11 bits in it) */ - u16 beacon_interval; /* the beacon interval in units of TU (1.024 ms) - (in CPU endianess - we must calc. values from it) */ - u8 rates[BSS_LIST_MAX_RATE_LEN]; /* supported rates (list of bytes: - (basic_rate ? 0x80 : 0) + rate/(500 Kbit/s); e.g. - x82,x84,x8b,x96 for basic rates 1,2,5.5,11 MBit/s) */ + u16 capa; /* the capabilities of the BSS (in original endianess - + we only check IEEE802_11 bits in it) */ + u16 beacon_interval; /* the beacon interval in units of TU (1.024 ms) + (in CPU endianess - we must calc. values from it) */ + u8 rates[BSS_LIST_MAX_RATE_LEN]; /* supported rates (list of bytes: + (basic_rate ? 0x80 : 0) + rate/(500 Kbit/s); e.g. + x82,x84,x8b,x96 for basic rates 1,2,5.5,11 MBit/s) */ u8 rates_len; /* quality of received beacon */ @@ -441,18 +442,18 @@ struct bss_info{ u8 link_qual; u8 noise_level; - unsigned long last_rx; /* time (jiffies) of last beacon received */ - u16 assoc_id; /* if this is dev->curr_bss this is the assoc id we got - in a successful AssocResponse */ + unsigned long last_rx; /* time (jiffies) of last beacon received */ + u16 assoc_id; /* if this is dev->curr_bss this is the assoc id we got + in a successful AssocResponse */ }; /* a rx data buffer to collect rx fragments */ struct rx_data_buf { - u8 sender[ETH_ALEN]; /* sender address */ - u16 seqnr; /* sequence number */ - u16 fragnr; /* last fragment received */ - unsigned long last_rx; /* jiffies of last rx */ - struct sk_buff *skb; /* == NULL if entry is free */ + u8 sender[ETH_ALEN]; /* sender address */ + u16 seqnr; /* sequence number */ + u16 fragnr; /* last fragment received */ + unsigned long last_rx; /* jiffies of last rx */ + struct sk_buff *skb; /* == NULL if entry is free */ }; #define NR_RX_DATA_BUF 8 @@ -460,88 +461,87 @@ struct rx_data_buf { #define NR_SUBMIT_RX_TRIES 8 struct at76c503 { - struct usb_device *udev; /* USB device pointer */ - struct net_device *netdev; /* net device pointer */ + struct usb_device *udev; /* USB device pointer */ + struct net_device *netdev; /* net device pointer */ struct net_device_stats stats; struct iw_statistics wstats; - struct usb_interface *interface; /* the interface for this device */ + struct usb_interface *interface; /* the interface for this device */ - 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 */ - 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 sk_buff *rx_skb; /* skbuff for receiving packets */ + __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */ - int open_count; /* number of times this port has been opened */ - struct semaphore sem; /* locks this structure */ + 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 */ + int open_count; /* number of times this port has been opened */ + struct semaphore sem; /* locks this structure */ unsigned long kevent_flags; struct work_struct kevent; - int nr_submit_rx_tries; /* number of tries to submit an rx urb left */ + 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; u8 op_mode; - /* the WEP stuff */ - 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 */ + /* the WEP stuff */ + 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 */ int channel; int iw_mode; int curr_ap; u8 bssid[ETH_ALEN]; u8 essid[IW_ESSID_MAX_SIZE]; - char nickn[IW_ESSID_MAX_SIZE+1]; /* nickname, only used in the iwconfig i/f */ + char nickn[IW_ESSID_MAX_SIZE + 1]; /* nickname, only used in the iwconfig i/f */ int essid_size; 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 frag_threshold; /* threshold for fragmentation of tx packets */ - int rts_threshold; /* threshold for RTS mechanism */ + 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 short_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 */ - 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 - before and must not remove curr_bss nor - new_bss ! */ - 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 */ - + spinlock_t bss_list_spinlock; /* protects bss_list operations and setting + 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 + before and must not remove curr_bss nor + new_bss ! */ + 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 */ + 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 */ - - struct at76c503_tx_buffer *next_mgmt_bulk; /* pending management msg to - send via bulk out */ + spinlock_t mgmt_spinlock; /* this spinlock protects access to + next_mgmt_bulk */ + + struct at76c503_tx_buffer *next_mgmt_bulk; /* pending management msg to + send via bulk out */ enum infra_state istate; enum { SITE_SURVEY_IDLE, @@ -550,18 +550,18 @@ struct at76c503 { } site_survey_state; time_t last_survey; - struct timer_list restart_timer; /* the timer we use to delay the restart a bit */ + 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 */ - 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_beacon; /* power manag. period (in beacon intervals - of the curr_bss) */ - u32 board_type; /* BOARDTYPE_* defined above */ + 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 */ + 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_beacon; /* power manag. period (in beacon intervals + of the curr_bss) */ + u32 board_type; /* BOARDTYPE_* defined above */ - struct reg_domain const *domain; /* the description of the regulatory domain */ + struct reg_domain const *domain; /* the description of the regulatory domain */ /* iwspy support */ spinlock_t spy_spinlock; @@ -576,54 +576,53 @@ struct at76c503 { u8 pidvid[4]; u8 regulatory_domain; u8 cr15_values[14]; - u8 cr20_values[14]; - u8 cr21_values[14]; + u8 cr20_values[14]; + u8 cr21_values[14]; u8 cr31_values[14]; u8 cr39_values[14]; u8 cr58_values[14]; - u8 low_power_values[14]; - u8 normal_power_values[14]; + u8 low_power_values[14]; + u8 normal_power_values[14]; struct at76c503_card_config card_config; struct mib_fw_version fw_version; - int rx_data_fcs_len; /* length of the trailing FCS - (0 for fw <= 0.84.x, 4 otherwise) */ + int rx_data_fcs_len; /* length of the trailing FCS + (0 for fw <= 0.84.x, 4 otherwise) */ /* store rx fragments until complete */ struct rx_data_buf rx_data[NR_RX_DATA_BUF]; /* firmware downloading stuff */ - struct timer_list fw_dl_timer; /* timer used to wait after REMAP - until device is reset */ + struct timer_list fw_dl_timer; /* timer used to wait after REMAP + until device is reset */ int extfw_size; int intfw_size; /* these point into a buffer managed by at76c503-xxx.o, no need to dealloc */ - u8 *extfw; /* points to external firmware part, extfw_size bytes long */ - u8 *intfw; /* points to internal firmware part, intfw_size bytes long */ + u8 *extfw; /* points to external firmware part, extfw_size bytes long */ + u8 *intfw; /* points to internal firmware part, intfw_size bytes long */ 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 */ - struct set_mib_buffer mib_buf; /* global buffer for set_mib calls */ + 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 */ + struct set_mib_buffer mib_buf; /* global buffer for set_mib calls */ /* new whiz-bang feature flags */ int international_roaming; - int monitor_prism_header; /* if iw_mode == IW_MODE_MONITOR, - use Prism header */ + int monitor_prism_header; /* if iw_mode == IW_MODE_MONITOR, + use Prism header */ int monitor_scan_min_time; int monitor_scan_max_time; - int beacon_period; /* period of mgmt beacons */ + int beacon_period; /* period of mgmt beacons */ int beacons_received; - unsigned long beacons_last_qual; /* last time we reset beacons_received = 0 */ + unsigned long beacons_last_qual; /* last time we reset beacons_received = 0 */ }; /* Quasi-monitor mode defs (copied from /drivers/net/wireless/orinoco.h) */ /* message data item for INT, BOUNDEDINT, ENUMINT */ -struct p80211item_u32 -{ +struct p80211item_u32 { uint32_t did; uint16_t status; uint16_t len; @@ -647,21 +646,20 @@ struct p80211item_u32 #define DIDmsg_lnxind_wlansniffrm_istx 0x9041 #define DIDmsg_lnxind_wlansniffrm_frmlen 0xA041 -struct p80211msg -{ - uint32_t msgcode; - uint32_t msglen; - uint8_t devname[IFNAMSIZ]; - struct p80211item_u32 hosttime; - struct p80211item_u32 mactime; - struct p80211item_u32 channel; - struct p80211item_u32 rssi; - struct p80211item_u32 sq; - struct p80211item_u32 signal; - struct p80211item_u32 noise; - struct p80211item_u32 rate; - struct p80211item_u32 istx; - struct p80211item_u32 frmlen; +struct p80211msg { + uint32_t msgcode; + uint32_t msglen; + uint8_t devname[IFNAMSIZ]; + struct p80211item_u32 hosttime; + struct p80211item_u32 mactime; + struct p80211item_u32 channel; + struct p80211item_u32 rssi; + struct p80211item_u32 sq; + struct p80211item_u32 signal; + struct p80211item_u32 noise; + struct p80211item_u32 rate; + struct p80211item_u32 istx; + struct p80211item_u32 frmlen; } __attribute__ ((packed)); #define BEACON_MAX_DATA_LENGTH 1500 @@ -701,48 +699,48 @@ struct p80211msg /* The frequency of each channel in MHz */ static const long channel_frequency[] = { - 2412, 2417, 2422, 2427, 2432, 2437, 2442, - 2447, 2452, 2457, 2462, 2467, 2472, 2484 + 2412, 2417, 2422, 2427, 2432, 2437, 2442, + 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; #define NUM_CHANNELS ARRAY_SIZE(channel_frequency) /* the supported rates of this hardware, bit7 marks a basic rate */ -static const u8 hw_rates[4] = {0x82,0x84,0x0b,0x16}; +static const u8 hw_rates[4] = { 0x82, 0x84, 0x0b, 0x16 }; /* the max padding size for tx in bytes (see calc_padding) */ #define MAX_PADDING_SIZE 53 /* at76_debug bits */ -#define DBG_PROGRESS 0x00000001 /* progress of scan-join-(auth-assoc)-connected */ -#define DBG_BSS_TABLE 0x00000002 /* show the bss table after scans */ -#define DBG_IOCTL 0x00000004 /* ioctl calls / settings */ -#define DBG_KEVENT 0x00000008 /* kevents */ -#define DBG_TX_DATA 0x00000010 /* tx header */ -#define DBG_TX_DATA_CONTENT 0x00000020 /* tx content */ +#define DBG_PROGRESS 0x00000001 /* progress of scan-join-(auth-assoc)-connected */ +#define DBG_BSS_TABLE 0x00000002 /* show the bss table after scans */ +#define DBG_IOCTL 0x00000004 /* ioctl calls / settings */ +#define DBG_KEVENT 0x00000008 /* kevents */ +#define DBG_TX_DATA 0x00000010 /* tx header */ +#define DBG_TX_DATA_CONTENT 0x00000020 /* tx content */ #define DBG_TX_MGMT 0x00000040 -#define DBG_RX_DATA 0x00000080 /* rx data header */ -#define DBG_RX_DATA_CONTENT 0x00000100 /* rx data content */ -#define DBG_RX_MGMT 0x00000200 /* rx mgmt header except beacon and probe responses */ -#define DBG_RX_BEACON 0x00000400 /* rx beacon */ -#define DBG_RX_CTRL 0x00000800 /* rx control */ -#define DBG_RX_MGMT_CONTENT 0x00001000 /* rx mgmt content */ -#define DBG_RX_FRAGS 0x00002000 /* rx data fragment handling */ -#define DBG_DEVSTART 0x00004000 /* fw download, device start */ -#define DBG_URB 0x00008000 /* rx urb status, ... */ -#define DBG_RX_ATMEL_HDR 0x00010000 /* the Atmel specific header of each rx packet */ -#define DBG_PROC_ENTRY 0x00020000 /* procedure entries and exits */ -#define DBG_PM 0x00040000 /* power management settings */ -#define DBG_BSS_MATCH 0x00080000 /* show why a certain bss did not match */ -#define DBG_PARAMS 0x00100000 /* show the configured parameters */ -#define DBG_WAIT_COMPLETE 0x00200000 /* show the wait_completion progress */ -#define DBG_RX_FRAGS_SKB 0x00400000 /* show skb header for incoming rx fragments */ -#define DBG_BSS_TABLE_RM 0x00800000 /* inform on removal of old bss table entries */ -#define DBG_MONITOR_MODE 0x01000000 /* debugs from monitor mode */ -#define DBG_MIB 0x02000000 /* dump all MIBs in startup_device */ -#define DBG_MGMT_TIMER 0x04000000 /* dump mgmt_timer ops */ -#define DBG_WE_EVENTS 0x08000000 /* dump wireless events */ -#define DBG_FW 0x10000000 /* firmware download */ -#define DBG_DFU 0x20000000 /* device firmware upgrade */ +#define DBG_RX_DATA 0x00000080 /* rx data header */ +#define DBG_RX_DATA_CONTENT 0x00000100 /* rx data content */ +#define DBG_RX_MGMT 0x00000200 /* rx mgmt header except beacon and probe responses */ +#define DBG_RX_BEACON 0x00000400 /* rx beacon */ +#define DBG_RX_CTRL 0x00000800 /* rx control */ +#define DBG_RX_MGMT_CONTENT 0x00001000 /* rx mgmt content */ +#define DBG_RX_FRAGS 0x00002000 /* rx data fragment handling */ +#define DBG_DEVSTART 0x00004000 /* fw download, device start */ +#define DBG_URB 0x00008000 /* rx urb status, ... */ +#define DBG_RX_ATMEL_HDR 0x00010000 /* the Atmel specific header of each rx packet */ +#define DBG_PROC_ENTRY 0x00020000 /* procedure entries and exits */ +#define DBG_PM 0x00040000 /* power management settings */ +#define DBG_BSS_MATCH 0x00080000 /* show why a certain bss did not match */ +#define DBG_PARAMS 0x00100000 /* show the configured parameters */ +#define DBG_WAIT_COMPLETE 0x00200000 /* show the wait_completion progress */ +#define DBG_RX_FRAGS_SKB 0x00400000 /* show skb header for incoming rx fragments */ +#define DBG_BSS_TABLE_RM 0x00800000 /* inform on removal of old bss table entries */ +#define DBG_MONITOR_MODE 0x01000000 /* debugs from monitor mode */ +#define DBG_MIB 0x02000000 /* dump all MIBs in startup_device */ +#define DBG_MGMT_TIMER 0x04000000 /* dump mgmt_timer ops */ +#define DBG_WE_EVENTS 0x08000000 /* dump wireless events */ +#define DBG_FW 0x10000000 /* firmware download */ +#define DBG_DFU 0x20000000 /* device firmware upgrade */ #define DBG_DEFAULTS 0 @@ -764,4 +762,4 @@ static const u8 hw_rates[4] = {0x82,0x84,0x0b,0x16}; err("%d: assertion " #x " failed", __LINE__);\ } while (0) -#endif /* _AT76C503_H */ +#endif /* _AT76C503_H */ -- cgit v1.2.3