diff --git a/drivers/wireless/ieee80211/bcmf_bdc.c b/drivers/wireless/ieee80211/bcmf_bdc.c index a9dd3b3a81d..a2a31a3f3fb 100644 --- a/drivers/wireless/ieee80211/bcmf_bdc.c +++ b/drivers/wireless/ieee80211/bcmf_bdc.c @@ -97,8 +97,8 @@ static const uint8_t bcmf_broadcom_oui[] = {0x00, 0x10, 0x18}; * Public Functions ****************************************************************************/ -struct bcmf_frame_s* bcmf_bdc_allocate_frame(FAR struct bcmf_dev_s *priv, - uint32_t len, bool block) +struct bcmf_frame_s *bcmf_bdc_allocate_frame(FAR struct bcmf_dev_s *priv, + uint32_t len, bool block) { struct bcmf_frame_s *frame; @@ -136,7 +136,7 @@ int bcmf_bdc_process_event_frame(FAR struct bcmf_dev_s *priv, goto exit_invalid_frame; } - header = (struct bcmf_bdc_header*)frame->data; + header = (struct bcmf_bdc_header *)frame->data; data_size -= sizeof(struct bcmf_bdc_header) + header->data_offset; @@ -149,9 +149,9 @@ int bcmf_bdc_process_event_frame(FAR struct bcmf_dev_s *priv, /* Check ethernet header */ - event_msg = (struct bcmf_event_msg*)(frame->data + - sizeof(struct bcmf_bdc_header) + - header->data_offset); + event_msg = (struct bcmf_event_msg *)(frame->data + + sizeof(struct bcmf_bdc_header) + + header->data_offset); if (event_msg->eth.ether_type != BCMF_EVENT_ETHER_TYPE || memcmp(event_msg->bcm_eth.oui, bcmf_broadcom_oui, 3)) @@ -207,15 +207,15 @@ int bcmf_event_push_config(FAR struct bcmf_dev_s *priv) { int i; uint32_t out_len; - uint8_t event_mask[(BCMF_EVENT_COUNT+7)>>3]; + uint8_t event_mask[(BCMF_EVENT_COUNT + 7) >> 3]; memset(event_mask, 0, sizeof(event_mask)); - for (i=0; ievent_handlers[i] != NULL) { - event_mask[i>>3] |= 1 << (i & 0x7); + event_mask[i >> 3] |= 1 << (i & 0x7); } } @@ -233,20 +233,20 @@ int bcmf_event_push_config(FAR struct bcmf_dev_s *priv) } int bcmf_bdc_transmit_frame(FAR struct bcmf_dev_s *priv, - struct bcmf_frame_s *frame) + struct bcmf_frame_s *frame) { - struct bcmf_bdc_header* header; + struct bcmf_bdc_header *header; /* Set frame data for lower layer */ frame->data -= sizeof(struct bcmf_bdc_header); - header = (struct bcmf_bdc_header*)frame->data; + header = (struct bcmf_bdc_header *)frame->data; /* Setup data frame header */ - header->flags = 0x20; /* Set bdc protocol version */ - header->priority = 0; // TODO handle priority - header->flags2 = CHIP_STA_INTERFACE; + header->flags = 0x20; /* Set bdc protocol version */ + header->priority = 0; // TODO handle priority + header->flags2 = CHIP_STA_INTERFACE; header->data_offset = 0; /* Send frame */ @@ -254,7 +254,7 @@ int bcmf_bdc_transmit_frame(FAR struct bcmf_dev_s *priv, return priv->bus->txframe(priv, frame, false); } -struct bcmf_frame_s* bcmf_bdc_rx_frame(FAR struct bcmf_dev_s *priv) +struct bcmf_frame_s *bcmf_bdc_rx_frame(FAR struct bcmf_dev_s *priv) { unsigned int frame_len; struct bcmf_frame_s *frame = priv->bus->rxframe(priv); @@ -274,4 +274,4 @@ struct bcmf_frame_s* bcmf_bdc_rx_frame(FAR struct bcmf_dev_s *priv) frame->data += sizeof(struct bcmf_bdc_header); return frame; -} \ No newline at end of file +} diff --git a/drivers/wireless/ieee80211/bcmf_bdc.h b/drivers/wireless/ieee80211/bcmf_bdc.h index 905dc7209fb..37d9225b5e9 100644 --- a/drivers/wireless/ieee80211/bcmf_bdc.h +++ b/drivers/wireless/ieee80211/bcmf_bdc.h @@ -75,13 +75,13 @@ int bcmf_bdc_process_event_frame(FAR struct bcmf_dev_s *priv, /* Function called from upper layer */ -struct bcmf_frame_s* bcmf_bdc_allocate_frame(FAR struct bcmf_dev_s *priv, - uint32_t len, bool block); +struct bcmf_frame_s *bcmf_bdc_allocate_frame(FAR struct bcmf_dev_s *priv, + uint32_t len, bool block); int bcmf_bdc_transmit_frame(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s *frame); -struct bcmf_frame_s* bcmf_bdc_rx_frame(FAR struct bcmf_dev_s *priv); +struct bcmf_frame_s *bcmf_bdc_rx_frame(FAR struct bcmf_dev_s *priv); /* Event frames API */ diff --git a/drivers/wireless/ieee80211/bcmf_cdc.c b/drivers/wireless/ieee80211/bcmf_cdc.c index c45bbef1b5b..06efd9ec5ce 100644 --- a/drivers/wireless/ieee80211/bcmf_cdc.c +++ b/drivers/wireless/ieee80211/bcmf_cdc.c @@ -80,7 +80,7 @@ struct __attribute__((packed)) bcmf_cdc_header { * Private Function Prototypes ****************************************************************************/ -static struct bcmf_frame_s* bcmf_cdc_allocate_frame( +static struct bcmf_frame_s *bcmf_cdc_allocate_frame( FAR struct bcmf_dev_s *priv, char *name, uint8_t *data, uint32_t len); @@ -99,8 +99,9 @@ static int bcmf_cdc_control_request_unsafe(FAR struct bcmf_dev_s *priv, * Private Functions ****************************************************************************/ -struct bcmf_frame_s* bcmf_cdc_allocate_frame(FAR struct bcmf_dev_s *priv, - char *name, uint8_t *data, uint32_t len) +struct bcmf_frame_s *bcmf_cdc_allocate_frame(FAR struct bcmf_dev_s *priv, + char *name, uint8_t *data, + uint32_t len) { uint32_t data_len; uint16_t name_len; @@ -145,10 +146,10 @@ struct bcmf_frame_s* bcmf_cdc_allocate_frame(FAR struct bcmf_dev_s *priv, } int bcmf_cdc_sendframe(FAR struct bcmf_dev_s *priv, uint32_t cmd, - int ifidx, bool set, struct bcmf_frame_s *frame) + int ifidx, bool set, struct bcmf_frame_s *frame) { - struct bcmf_cdc_header* header = - (struct bcmf_cdc_header*)frame->data; + struct bcmf_cdc_header *header = + (struct bcmf_cdc_header *)frame->data; /* Setup control frame header */ @@ -290,7 +291,7 @@ int bcmf_cdc_process_control_frame(FAR struct bcmf_dev_s *priv, return -EINVAL; } - cdc_header = (struct bcmf_cdc_header*)frame->data; + cdc_header = (struct bcmf_cdc_header *)frame->data; if (data_size < cdc_header->len || data_size < sizeof(struct bcmf_cdc_header) + cdc_header->len) @@ -315,8 +316,9 @@ int bcmf_cdc_process_control_frame(FAR struct bcmf_dev_s *priv, priv->control_rxdata_len, cdc_header->len); priv->control_rxdata_len = cdc_header->len; } - memcpy(priv->control_rxdata, (uint8_t*)&cdc_header[1], - priv->control_rxdata_len); + + memcpy(priv->control_rxdata, (uint8_t *)&cdc_header[1], + priv->control_rxdata_len); } sem_post(&priv->control_timeout); @@ -325,4 +327,4 @@ int bcmf_cdc_process_control_frame(FAR struct bcmf_dev_s *priv, wlinfo("Got unexpected control frame\n"); return -EINVAL; -} \ No newline at end of file +} diff --git a/drivers/wireless/ieee80211/bcmf_chip_43362.c b/drivers/wireless/ieee80211/bcmf_chip_43362.c index 891cf7784ae..7bea6584dcf 100644 --- a/drivers/wireless/ieee80211/bcmf_chip_43362.c +++ b/drivers/wireless/ieee80211/bcmf_chip_43362.c @@ -44,7 +44,8 @@ extern const unsigned int bcm43362_nvram_image_len; extern const uint8_t bcm43362_firmware_image[]; extern const unsigned int bcm43362_firmware_image_len; -const struct bcmf_sdio_chip bcmf_43362_config_sdio = { +const struct bcmf_sdio_chip bcmf_43362_config_sdio = +{ /* General chip stats */ @@ -52,7 +53,8 @@ const struct bcmf_sdio_chip bcmf_43362_config_sdio = { /* Backplane architecture */ - .core_base = { + .core_base = + { [CHIPCOMMON_CORE_ID] = 0x18000000, /* Chipcommon core register base */ [DOT11MAC_CORE_ID] = 0x18001000, /* dot11mac core register base */ [SDIOD_CORE_ID] = 0x18002000, /* SDIOD Device core register base */ @@ -66,9 +68,9 @@ const struct bcmf_sdio_chip bcmf_43362_config_sdio = { // TODO find something smarter than using image_len references - .firmware_image = (uint8_t*)bcm43362_firmware_image, - .firmware_image_size = (unsigned int*)&bcm43362_firmware_image_len, + .firmware_image = (uint8_t *)bcm43362_firmware_image, + .firmware_image_size = (unsigned int *)&bcm43362_firmware_image_len, - .nvram_image = (uint8_t*)bcm43362_nvram_image, - .nvram_image_size = (unsigned int*)&bcm43362_nvram_image_len -}; \ No newline at end of file + .nvram_image = (uint8_t *)bcm43362_nvram_image, + .nvram_image_size = (unsigned int *)&bcm43362_nvram_image_len +}; diff --git a/drivers/wireless/ieee80211/bcmf_core.c b/drivers/wireless/ieee80211/bcmf_core.c index e51e88c8761..64606b7a712 100644 --- a/drivers/wireless/ieee80211/bcmf_core.c +++ b/drivers/wireless/ieee80211/bcmf_core.c @@ -190,23 +190,23 @@ int bcmf_upload_nvram(FAR struct bcmf_sdio_dev_s *sbus) ret = bcmf_upload_binary(sbus, sbus->chip->ram_size - 4 - nvram_sz, sbus->chip->nvram_image, *sbus->chip->nvram_image_size); - if ( ret != OK) - { + if (ret != OK) + { return ret; - } + } - /* generate length token */ + /* Generate length token */ token = nvram_sz / 4; token = (~token << 16) | (token & 0x0000FFFF); /* Write the length token to the last word */ - ret = bcmf_write_sbreg(sbus, sbus->chip->ram_size - 4, (uint8_t*)&token, 4); - if ( ret != OK) - { + ret = bcmf_write_sbreg(sbus, sbus->chip->ram_size - 4, (uint8_t *)&token, 4); + if (ret != OK) + { return ret; - } + } return OK; } diff --git a/drivers/wireless/ieee80211/bcmf_core.h b/drivers/wireless/ieee80211/bcmf_core.h index 074196cdede..00f859601cd 100644 --- a/drivers/wireless/ieee80211/bcmf_core.h +++ b/drivers/wireless/ieee80211/bcmf_core.h @@ -64,7 +64,7 @@ static inline int bcmf_read_sbregb(FAR struct bcmf_sdio_dev_s *sbus, static inline int bcmf_read_sbregw(FAR struct bcmf_sdio_dev_s *sbus, uint32_t address, uint32_t *reg) { - return bcmf_read_sbreg(sbus, address, (uint8_t*)reg, 4); + return bcmf_read_sbreg(sbus, address, (uint8_t *)reg, 4); } static inline int bcmf_write_sbregb(FAR struct bcmf_sdio_dev_s *sbus, @@ -76,7 +76,7 @@ static inline int bcmf_write_sbregb(FAR struct bcmf_sdio_dev_s *sbus, static inline int bcmf_write_sbregw(FAR struct bcmf_sdio_dev_s *sbus, uint32_t address, uint32_t reg) { - return bcmf_write_sbreg(sbus, address, (uint8_t*)®, 4); + return bcmf_write_sbreg(sbus, address, (uint8_t *)®, 4); } #endif /* __DRIVERS_WIRELESS_IEEE80211_BCMF_CORE_H */ diff --git a/drivers/wireless/ieee80211/bcmf_driver.c b/drivers/wireless/ieee80211/bcmf_driver.c index 78f3ee0b865..8e62c6049a6 100644 --- a/drivers/wireless/ieee80211/bcmf_driver.c +++ b/drivers/wireless/ieee80211/bcmf_driver.c @@ -84,12 +84,13 @@ enum * Private Function Prototypes ****************************************************************************/ -static FAR struct bcmf_dev_s* bcmf_allocate_device(void); +static FAR struct bcmf_dev_s *bcmf_allocate_device(void); static void bcmf_free_device(FAR struct bcmf_dev_s *priv); static int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv); // FIXME only for debug purpose + static void bcmf_wl_default_event_handler(FAR struct bcmf_dev_s *priv, struct bcmf_event_s *event, unsigned int len); @@ -109,7 +110,7 @@ static int bcmf_wl_get_interface(FAR struct bcmf_dev_s *priv, * Private Functions ****************************************************************************/ -FAR struct bcmf_dev_s* bcmf_allocate_device(void) +FAR struct bcmf_dev_s *bcmf_allocate_device(void) { int ret; FAR struct bcmf_dev_s *priv; @@ -186,7 +187,7 @@ int bcmf_wl_set_mac_address(FAR struct bcmf_dev_s *priv, struct ifreq *req) ret = bcmf_cdc_iovar_request(priv, CHIP_STA_INTERFACE, true, IOVAR_STR_CUR_ETHERADDR, - (uint8_t*)req->ifr_hwaddr.sa_data, + (uint8_t *)req->ifr_hwaddr.sa_data, &out_len); if (ret != OK) { @@ -215,10 +216,10 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) /* Disable TX Gloming feature */ out_len = 4; - *(uint32_t*)tmp_buf = 0; + *(uint32_t *)tmp_buf = 0; ret = bcmf_cdc_iovar_request(priv, interface, false, - IOVAR_STR_TX_GLOM, tmp_buf, - &out_len); + IOVAR_STR_TX_GLOM, tmp_buf, + &out_len); if (ret != OK) { return -EIO; @@ -229,7 +230,7 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) out_len = 4; value = 0; ret = bcmf_cdc_ioctl(priv, interface, true, WLC_SET_PM, - (uint8_t*)&value, &out_len); + (uint8_t *)&value, &out_len); if (ret != OK) { return ret; @@ -240,7 +241,7 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) out_len = 4; value = GMODE_AUTO; ret = bcmf_cdc_ioctl(priv, interface, true, WLC_SET_GMODE, - (uint8_t*)&value, &out_len); + (uint8_t *)&value, &out_len); if (ret != OK) { return ret; @@ -251,14 +252,14 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) out_len = 4; value = 1; ret = bcmf_cdc_iovar_request(priv, interface, true, IOVAR_STR_ROAM_OFF, - (uint8_t*)&value, + (uint8_t *)&value, &out_len); /* TODO configure EAPOL version to default */ out_len = 8; - ((uint32_t*)tmp_buf)[0] = interface; - ((uint32_t*)tmp_buf)[1] = (uint32_t)-1; + ((uint32_t *)tmp_buf)[0] = interface; + ((uint32_t *)tmp_buf)[1] = (uint32_t)-1; if (bcmf_cdc_iovar_request(priv, interface, true, "bsscfg:"IOVAR_STR_SUP_WPA2_EAPVER, tmp_buf, @@ -282,10 +283,10 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) /* Remove line feed */ - out_len = strlen((char*)tmp_buf); - if (out_len > 0 && tmp_buf[out_len-1] == '\n') + out_len = strlen((char *)tmp_buf); + if (out_len > 0 && tmp_buf[out_len - 1] == '\n') { - tmp_buf[out_len-1] = 0; + tmp_buf[out_len - 1] = 0; } wlinfo("fw version <%s>\n", tmp_buf); @@ -353,7 +354,7 @@ void bcmf_wl_auth_event_handler(FAR struct bcmf_dev_s *priv, wlinfo("Got auth event %d from <%s>\n", type, event->src_name); - bcmf_hexdump((uint8_t*)event, len, (unsigned long)event); + bcmf_hexdump((uint8_t *)event, len, (unsigned long)event); if (type == WLC_E_SET_SSID && status == WLC_E_STATUS_SUCCESS) { @@ -408,7 +409,7 @@ void bcmf_wl_scan_event_handler(FAR struct bcmf_dev_s *priv, /* Process escan result payload */ - result = (struct wl_escan_result*)&event[1]; + result = (struct wl_escan_result *)&event[1]; if (len < result->buflen || result->buflen < sizeof(struct wl_escan_result)) { @@ -442,7 +443,7 @@ void bcmf_wl_scan_event_handler(FAR struct bcmf_dev_s *priv, /* Process next bss_info */ len -= bss_info_len; - bss = (struct wl_bss_info*)((uint8_t*)bss + bss_info_len); + bss = (struct wl_bss_info *)((uint8_t *)bss + bss_info_len); bss_count += 1; } @@ -474,12 +475,12 @@ wl_escan_result_processed: exit_invalid_frame: wlerr("Invalid scan result event\n"); - bcmf_hexdump((uint8_t*)event, event_len, (unsigned long)event); + bcmf_hexdump((uint8_t *)event, event_len, (unsigned long)event); } void bcmf_wl_scan_timeout(int argc, wdparm_t arg1, ...) { - FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s*)arg1; + FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s *)arg1; if (priv->scan_status < BCMF_SCAN_RUN) { @@ -590,7 +591,7 @@ int bcmf_wl_start_scan(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) if (iwr->u.data.pointer && iwr->u.data.length >= sizeof(*req)) { - req = (struct iw_scan_req*)iwr->u.data.pointer; + req = (struct iw_scan_req *)iwr->u.data.pointer; memcpy(&scan_params.params.bssid, req->bssid.sa_data, sizeof(scan_params.params.bssid)); @@ -624,7 +625,7 @@ int bcmf_wl_start_scan(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) value = scan_params.params.scan_type; out_len = 4; if (bcmf_cdc_ioctl(priv, CHIP_STA_INTERFACE, true, - WLC_SET_PASSIVE_SCAN, (uint8_t*)&value, &out_len)) + WLC_SET_PASSIVE_SCAN, (uint8_t *)&value, &out_len)) { ret = -EIO; goto exit_failed; @@ -644,7 +645,7 @@ int bcmf_wl_start_scan(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) out_len = sizeof(scan_params); if (bcmf_cdc_iovar_request_unsafe(priv, CHIP_STA_INTERFACE, true, - IOVAR_STR_ESCAN, (uint8_t*)&scan_params, + IOVAR_STR_ESCAN, (uint8_t *)&scan_params, &out_len)) { ret = -EIO; @@ -727,15 +728,15 @@ int bcmf_wl_set_auth_param(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) if (bcmf_cdc_iovar_request(priv, interface, true, "bsscfg:"IOVAR_STR_SUP_WPA, - (uint8_t*)wpa_version, + (uint8_t *)wpa_version, &out_len)) { return -EIO; } out_len = 4; - if(bcmf_cdc_ioctl(priv, interface, true, WLC_SET_WPA_AUTH, - (uint8_t*)&auth_mode, &out_len)) + if (bcmf_cdc_ioctl(priv, interface, true, WLC_SET_WPA_AUTH, + (uint8_t *)&auth_mode, &out_len)) { return -EIO; } @@ -767,8 +768,8 @@ int bcmf_wl_set_auth_param(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) } out_len = 4; - if(bcmf_cdc_ioctl(priv, interface, true, - WLC_SET_WSEC, (uint8_t*)&cipher_mode, &out_len)) + if (bcmf_cdc_ioctl(priv, interface, true, + WLC_SET_WSEC, (uint8_t *)&cipher_mode, &out_len)) { return -EIO; } @@ -776,8 +777,8 @@ int bcmf_wl_set_auth_param(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) /* Set authentication mode */ out_len = 4; - if(bcmf_cdc_ioctl(priv, interface, true, - WLC_SET_AUTH, (uint8_t*)&wep_auth, &out_len)) + if (bcmf_cdc_ioctl(priv, interface, true, + WLC_SET_AUTH, (uint8_t *)&wep_auth, &out_len)) { return -EIO; } @@ -815,8 +816,8 @@ int bcmf_wl_set_mode(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) out_len = 4; value = iwr->u.mode == IW_MODE_INFRA ? 1 : 0; - if(bcmf_cdc_ioctl(priv, interface, true, - WLC_SET_INFRA, (uint8_t*)&value, &out_len)) + if (bcmf_cdc_ioctl(priv, interface, true, + WLC_SET_INFRA, (uint8_t *)&value, &out_len)) { return -EIO; } @@ -838,7 +839,7 @@ int bcmf_wl_set_encode_ext(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) return -EINVAL; } - ext = (struct iw_encode_ext*)iwr->u.encoding.pointer; + ext = (struct iw_encode_ext *)iwr->u.encoding.pointer; switch (ext->alg) { @@ -860,7 +861,7 @@ int bcmf_wl_set_encode_ext(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) out_len = sizeof(psk); return bcmf_cdc_ioctl(priv, interface, true, - WLC_SET_WSEC_PMK, (uint8_t*)&psk, &out_len); + WLC_SET_WSEC_PMK, (uint8_t *)&psk, &out_len); } int bcmf_wl_set_ssid(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) @@ -883,8 +884,8 @@ int bcmf_wl_set_ssid(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) /* Configure AP SSID and trig authentication request */ out_len = sizeof(ssid); - if(bcmf_cdc_ioctl(priv, interface, true, - WLC_SET_SSID, (uint8_t*)&ssid, &out_len)) + if (bcmf_cdc_ioctl(priv, interface, true, + WLC_SET_SSID, (uint8_t *)&ssid, &out_len)) { return -EIO; } @@ -910,4 +911,5 @@ int bcmf_wl_set_ssid(FAR struct bcmf_dev_s *priv, struct iwreq *iwr) return -EINVAL; } return OK; - } \ No newline at end of file + } + \ No newline at end of file diff --git a/drivers/wireless/ieee80211/bcmf_driver.h b/drivers/wireless/ieee80211/bcmf_driver.h index 3e38ff4f935..937427a49be 100644 --- a/drivers/wireless/ieee80211/bcmf_driver.h +++ b/drivers/wireless/ieee80211/bcmf_driver.h @@ -105,18 +105,18 @@ struct bcmf_bus_dev_s void (*stop)(FAR struct bcmf_dev_s *priv); int (*txframe)(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s *frame, bool control); - struct bcmf_frame_s* (*rxframe)(FAR struct bcmf_dev_s *priv); + struct bcmf_frame_s *(*rxframe)(FAR struct bcmf_dev_s *priv); /* Frame buffer allocation primitives * len - requested payload length * control - true if control frame else false * block - true to block until free frame is available */ - struct bcmf_frame_s* (*allocate_frame)(FAR struct bcmf_dev_s *priv, + struct bcmf_frame_s *(*allocate_frame)(FAR struct bcmf_dev_s *priv, unsigned int len, bool block, bool control); - void (*free_frame)(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s* frame); + void (*free_frame)(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s *frame); }; /* bcmf frame definition */ diff --git a/drivers/wireless/ieee80211/bcmf_ioctl.h b/drivers/wireless/ieee80211/bcmf_ioctl.h index f37fd608bca..7c4cc235f21 100644 --- a/drivers/wireless/ieee80211/bcmf_ioctl.h +++ b/drivers/wireless/ieee80211/bcmf_ioctl.h @@ -1,4 +1,4 @@ -/* +/**************************************************************************** * Copyright (c) 2015 Broadcom * All rights reserved. * @@ -31,7 +31,8 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * + ****************************************************************************/ /* * Custom OID/ioctl definitions for * Broadcom 802.11abg Networking Device Driver @@ -49,64 +50,66 @@ typedef uint16_t chanspec_t; typedef struct wl_action_frame { - struct ether_addr da; - uint16_t len; - uint32_t packetId; - uint8_t data[ACTION_FRAME_SIZE]; + struct ether_addr da; + uint16_t len; + uint32_t packetId; + uint8_t data[ACTION_FRAME_SIZE]; } wl_action_frame_t; typedef struct ssid_info { - uint8_t ssid_len; - uint8_t ssid[32]; + uint8_t ssid_len; + uint8_t ssid[32]; } ssid_info_t; typedef struct cnt_rx { - uint32_t cnt_rxundec; - uint32_t cnt_rxframe; + uint32_t cnt_rxundec; + uint32_t cnt_rxframe; } cnt_rx_t; #define MCSSET_LEN 16 -typedef struct wl_bss_info { - uint32_t version; /* version field */ - uint32_t length; /* byte length of data in this record, */ - /* starting at version and including IEs */ - struct ether_addr BSSID; - uint16_t beacon_period; /* units are Kusec */ - uint16_t capability; /* Capability information */ - uint8_t SSID_len; - uint8_t SSID[32]; - struct { - uint32_t count; /* # rates in this set */ - uint8_t rates[16]; /* rates in 500kbps units w/hi bit set if basic */ - } rateset; /* supported rates */ - wl_chanspec_t chanspec; /* chanspec for bss */ - uint16_t atim_window; /* units are Kusec */ - uint8_t dtim_period; /* DTIM period */ - int16_t RSSI; /* receive signal strength (in dBm) */ - int8_t phy_noise; /* noise (in dBm) */ +typedef struct wl_bss_info +{ + uint32_t version; /* version field */ + uint32_t length; /* byte length of data in this record, */ + /* starting at version and including IEs */ + struct ether_addr BSSID; + uint16_t beacon_period; /* units are Kusec */ + uint16_t capability; /* Capability information */ + uint8_t SSID_len; + uint8_t SSID[32]; + struct + { + uint32_t count; /* # rates in this set */ + uint8_t rates[16]; /* rates in 500kbps units w/hi bit set if basic */ + } rateset; /* supported rates */ + wl_chanspec_t chanspec; /* chanspec for bss */ + uint16_t atim_window; /* units are Kusec */ + uint8_t dtim_period; /* DTIM period */ + int16_t RSSI; /* receive signal strength (in dBm) */ + int8_t phy_noise; /* noise (in dBm) */ - uint8_t n_cap; /* BSS is 802.11N Capable */ - uint32_t nbss_cap; /* 802.11N BSS Capabilities (based on HT_CAP_*) */ - uint8_t ctl_ch; /* 802.11N BSS control channel number */ - uint32_t reserved32[1]; /* Reserved for expansion of BSS properties */ - uint8_t flags; /* flags */ - uint8_t reserved[3]; /* Reserved for expansion of BSS properties */ - uint8_t basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */ + uint8_t n_cap; /* BSS is 802.11N Capable */ + uint32_t nbss_cap; /* 802.11N BSS Capabilities (based on HT_CAP_*) */ + uint8_t ctl_ch; /* 802.11N BSS control channel number */ + uint32_t reserved32[1]; /* Reserved for expansion of BSS properties */ + uint8_t flags; /* flags */ + uint8_t reserved[3]; /* Reserved for expansion of BSS properties */ + uint8_t basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */ - uint16_t ie_offset; /* offset at which IEs start, from beginning */ - uint32_t ie_length; /* byte length of Information Elements */ - int16_t SNR; /* average SNR of during frame reception */ - /* Add new fields here */ - /* variable length Information Elements */ + uint16_t ie_offset; /* offset at which IEs start, from beginning */ + uint32_t ie_length; /* byte length of Information Elements */ + int16_t SNR; /* average SNR of during frame reception */ + /* Add new fields here */ + /* variable length Information Elements */ } wl_bss_info_t; typedef struct wlc_ssid { - uint32_t SSID_len; - uint8_t SSID[32]; + uint32_t SSID_len; + uint8_t SSID[32]; } wlc_ssid_t; #define WL_BSSTYPE_INFRA 1 @@ -117,16 +120,16 @@ typedef struct wlc_ssid typedef struct wl_scan_params { - wlc_ssid_t ssid; - struct ether_addr bssid; - int8_t bss_type; - int8_t scan_type; - int32_t nprobes; - int32_t active_time; - int32_t passive_time; - int32_t home_time; - int32_t channel_num; - uint16_t channel_list[1]; + wlc_ssid_t ssid; + struct ether_addr bssid; + int8_t bss_type; + int8_t scan_type; + int32_t nprobes; + int32_t active_time; + int32_t passive_time; + int32_t home_time; + int32_t channel_num; + uint16_t channel_list[1]; } wl_scan_params_t; #define WL_SCAN_PARAMS_FIXED_SIZE (64) @@ -139,20 +142,20 @@ typedef struct wl_scan_params typedef struct wl_iscan_params { - uint32_t version; - uint16_t action; - uint16_t scan_duration; - wl_scan_params_t params; + uint32_t version; + uint16_t action; + uint16_t scan_duration; + wl_scan_params_t params; } wl_iscan_params_t; #define WL_ISCAN_PARAMS_FIXED_SIZE (offsetof(wl_iscan_params_t, params) + sizeof(wlc_ssid_t)) typedef struct wl_scan_results { - uint32_t buflen; - uint32_t version; - uint32_t count; - wl_bss_info_t bss_info[1]; + uint32_t buflen; + uint32_t version; + uint32_t count; + wl_bss_info_t bss_info[1]; } wl_scan_results_t; #define WL_SCAN_RESULTS_FIXED_SIZE (12) @@ -165,56 +168,57 @@ typedef struct wl_scan_results typedef struct wl_escan_params { - uint32_t version; - uint16_t action; - uint16_t sync_id; - wl_scan_params_t params; + uint32_t version; + uint16_t action; + uint16_t sync_id; + wl_scan_params_t params; } wl_escan_params_t; #define WL_ESCAN_PARAMS_FIXED_SIZE (offsetof(wl_escan_params_t, params) + sizeof(wlc_ssid_t)) typedef struct wl_escan_result { - uint32_t buflen; - uint32_t version; - uint16_t sync_id; - uint16_t bss_count; - wl_bss_info_t bss_info[1]; + uint32_t buflen; + uint32_t version; + uint16_t sync_id; + uint16_t bss_count; + wl_bss_info_t bss_info[1]; } wl_escan_result_t; #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t)) typedef struct wl_iscan_results { - uint32_t status; - wl_scan_results_t results; + uint32_t status; + wl_scan_results_t results; } wl_iscan_results_t; #define WL_ISCAN_RESULTS_FIXED_SIZE \ - (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results)) + (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results)) #define WL_MAXRATES_IN_SET 16 /* max # of rates in a rateset */ typedef struct wl_rateset { - uint32_t count; /* # rates in this set */ - uint8_t rates[WL_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */ + uint32_t count; /* # rates in this set */ + uint8_t rates[WL_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */ } wl_rateset_t; typedef struct wl_uint32_list { - uint32_t count; - uint32_t element[1]; + uint32_t count; + uint32_t element[1]; } wl_uint32_list_t; -typedef struct wl_join_scan_params { - uint8_t scan_type; /* 0 use default, active or passive scan */ - int32_t nprobes; /* -1 use default, number of probes per channel */ - int32_t active_time; /* -1 use default, dwell time per channel for - * active scanning */ - int32_t passive_time; /* -1 use default, dwell time per channel - * for passive scanning */ - int32_t home_time; /* -1 use default, dwell time for the home channel - * between channel scans */ +typedef struct wl_join_scan_params +{ + uint8_t scan_type; /* 0 use default, active or passive scan */ + int32_t nprobes; /* -1 use default, number of probes per channel */ + int32_t active_time; /* -1 use default, dwell time per channel for + * active scanning */ + int32_t passive_time; /* -1 use default, dwell time per channel + * for passive scanning */ + int32_t home_time; /* -1 use default, dwell time for the home channel + * between channel scans */ } wl_join_scan_params_t; #define NRATE_MCS_INUSE (0x00000080) @@ -247,8 +251,8 @@ typedef struct wl_join_scan_params { typedef struct { - uint8_t ant_config[ANT_SELCFG_MAX]; - uint8_t num_antcfg; + uint8_t ant_config[ANT_SELCFG_MAX]; + uint8_t num_antcfg; } wlc_antselcfg_t; #define HIGHEST_SINGLE_STREAM_MCS (7) @@ -256,27 +260,27 @@ typedef struct typedef struct wl_country { - int8_t country_abbrev[WLC_CNTRY_BUF_SZ]; - int32_t rev; - int8_t ccode[WLC_CNTRY_BUF_SZ]; + int8_t country_abbrev[WLC_CNTRY_BUF_SZ]; + int32_t rev; + int8_t ccode[WLC_CNTRY_BUF_SZ]; } wl_country_t; typedef struct wl_channels_in_country { - uint32_t buflen; - uint32_t band; - int8_t country_abbrev[WLC_CNTRY_BUF_SZ]; - uint32_t count; - uint32_t channel[1]; + uint32_t buflen; + uint32_t band; + int8_t country_abbrev[WLC_CNTRY_BUF_SZ]; + uint32_t count; + uint32_t channel[1]; } wl_channels_in_country_t; typedef struct wl_country_list { - uint32_t buflen; - uint32_t band_set; - uint32_t band; - uint32_t count; - int8_t country_abbrev[1]; + uint32_t buflen; + uint32_t band_set; + uint32_t band; + uint32_t count; + int8_t country_abbrev[1]; } wl_country_list_t; #define WL_NUM_RPI_BINS 8 @@ -290,37 +294,37 @@ typedef struct wl_country_list typedef struct wl_rm_req_elt { - int8_t type; - int8_t flags; - wl_chanspec_t chanspec; - uint32_t token; - uint32_t tsf_h; - uint32_t tsf_l; - uint32_t dur; + int8_t type; + int8_t flags; + wl_chanspec_t chanspec; + uint32_t token; + uint32_t tsf_h; + uint32_t tsf_l; + uint32_t dur; } wl_rm_req_elt_t; typedef struct wl_rm_req { - uint32_t token; - uint32_t count; - void* cb; - void* cb_arg; - wl_rm_req_elt_t req[1]; + uint32_t token; + uint32_t count; + void *cb; + void *cb_arg; + wl_rm_req_elt_t req[1]; } wl_rm_req_t; #define WL_RM_REQ_FIXED_LEN offsetof(wl_rm_req_t, req) typedef struct wl_rm_rep_elt { - int8_t type; - int8_t flags; - wl_chanspec_t chanspec; - uint32_t token; - uint32_t tsf_h; - uint32_t tsf_l; - uint32_t dur; - uint32_t len; - uint8_t data[1]; + int8_t type; + int8_t flags; + wl_chanspec_t chanspec; + uint32_t token; + uint32_t tsf_h; + uint32_t tsf_l; + uint32_t dur; + uint32_t len; + uint8_t data[1]; } wl_rm_rep_elt_t; #define WL_RM_REP_ELT_FIXED_LEN 24 @@ -328,14 +332,14 @@ typedef struct wl_rm_rep_elt typedef struct wl_rm_rpi_rep { - uint8_t rpi[WL_RPI_REP_BIN_NUM]; - int8_t rpi_max[WL_RPI_REP_BIN_NUM]; + uint8_t rpi[WL_RPI_REP_BIN_NUM]; + int8_t rpi_max[WL_RPI_REP_BIN_NUM]; } wl_rm_rpi_rep_t; typedef struct wl_rm_rep { - uint32_t token; - uint32_t len; - wl_rm_rep_elt_t rep[1]; + uint32_t token; + uint32_t len; + wl_rm_rep_elt_t rep[1]; } wl_rm_rep_t; #define WL_RM_REP_FIXED_LEN 8 @@ -362,23 +366,23 @@ typedef struct wl_rm_rep typedef struct wl_wsec_key { - uint32_t index; - uint32_t len; - uint8_t data[DOT11_MAX_KEY_SIZE]; - uint32_t pad_1[18]; - uint32_t algo; - uint32_t flags; - uint32_t pad_2[2]; - int32_t pad_3; - int32_t iv_initialized; - int32_t pad_4; - struct - { - uint32_t hi; - uint16_t lo; - } rxiv; - uint32_t pad_5[2]; - struct ether_addr ea; + uint32_t index; + uint32_t len; + uint8_t data[DOT11_MAX_KEY_SIZE]; + uint32_t pad_1[18]; + uint32_t algo; + uint32_t flags; + uint32_t pad_2[2]; + int32_t pad_3; + int32_t iv_initialized; + int32_t pad_4; + struct + { + uint32_t hi; + uint16_t lo; + } rxiv; + uint32_t pad_5[2]; + struct ether_addr ea; } wl_wsec_key_t; #define WSEC_MIN_PSK_LEN 8 @@ -387,9 +391,9 @@ typedef struct wl_wsec_key typedef struct { - uint16_t key_len; - uint16_t flags; - uint8_t key[WSEC_MAX_PSK_LEN]; + uint16_t key_len; + uint16_t flags; + uint8_t key[WSEC_MAX_PSK_LEN]; } wsec_pmk_t; #define OPEN_AUTH 0x0000 @@ -413,72 +417,72 @@ typedef struct typedef struct _pmkid { - struct ether_addr BSSID; - uint8_t PMKID[WPA2_PMKID_LEN]; + struct ether_addr BSSID; + uint8_t PMKID[WPA2_PMKID_LEN]; } pmkid_t; typedef struct _pmkid_list { - uint32_t npmkid; - pmkid_t pmkid[1]; + uint32_t npmkid; + pmkid_t pmkid[1]; } pmkid_list_t; typedef struct _pmkid_cand { - struct ether_addr BSSID; - uint8_t preauth; + struct ether_addr BSSID; + uint8_t preauth; } pmkid_cand_t; typedef struct _pmkid_cand_list { - uint32_t npmkid_cand; - pmkid_cand_t pmkid_cand[1]; + uint32_t npmkid_cand; + pmkid_cand_t pmkid_cand[1]; } pmkid_cand_list_t; typedef struct wl_led_info { - uint32_t index; - uint32_t behavior; - uint8_t activehi; + uint32_t index; + uint32_t behavior; + uint8_t activehi; } wl_led_info_t; struct wl_dot11_assoc_req { - uint16_t capability; - uint16_t listen; + uint16_t capability; + uint16_t listen; }; struct wl_dot11_assoc_resp { - uint16_t capability; - uint16_t status; - uint16_t aid; + uint16_t capability; + uint16_t status; + uint16_t aid; }; typedef struct wl_assoc_info { - uint32_t req_len; - uint32_t resp_len; - uint32_t flags; - struct wl_dot11_assoc_req req; - struct ether_addr reassoc_bssid; - struct wl_dot11_assoc_resp resp; + uint32_t req_len; + uint32_t resp_len; + uint32_t flags; + struct wl_dot11_assoc_req req; + struct ether_addr reassoc_bssid; + struct wl_dot11_assoc_resp resp; } wl_assoc_info_t; #define WLC_ASSOC_REQ_IS_REASSOC 0x01 typedef struct { - uint32_t byteoff; - uint32_t nbytes; - uint16_t buf[1]; + uint32_t byteoff; + uint32_t nbytes; + uint16_t buf[1]; } srom_rw_t; typedef struct { - uint32_t source; - uint32_t byteoff; - uint32_t nbytes; + uint32_t source; + uint32_t byteoff; + uint32_t nbytes; } cis_rw_t; #define WLC_CIS_DEFAULT 0 @@ -487,10 +491,10 @@ typedef struct typedef struct { - uint32_t byteoff; - uint32_t val; - uint32_t size; - uint32_t band; + uint32_t byteoff; + uint32_t val; + uint32_t size; + uint32_t band; } rw_reg_t; #define WL_ATTEN_APP_INPUT_PCL_OFF 0 @@ -499,19 +503,19 @@ typedef struct typedef struct { - uint16_t auto_ctrl; - uint16_t bb; - uint16_t radio; - uint16_t txctl1; + uint16_t auto_ctrl; + uint16_t bb; + uint16_t radio; + uint16_t txctl1; } atten_t; struct wme_tx_params_s { - uint8_t short_retry; - uint8_t short_fallback; - uint8_t long_retry; - uint8_t long_fallback; - uint16_t max_rate; + uint8_t short_retry; + uint8_t short_fallback; + uint8_t long_retry; + uint8_t long_fallback; + uint16_t max_rate; }; typedef struct wme_tx_params_s wme_tx_params_t; @@ -523,29 +527,29 @@ typedef struct wme_tx_params_s wme_tx_params_t; typedef struct { - uint32_t val; - struct ether_addr ea; + uint32_t val; + struct ether_addr ea; } scb_val_t; #define BCM_MAC_STATUS_INDICATION (0x40010200L) typedef struct { - uint16_t ver; - uint16_t len; - uint16_t cap; - uint32_t flags; - uint32_t idle; - struct ether_addr ea; - wl_rateset_t rateset; - uint32_t in; - uint32_t listen_interval_inms; - uint32_t tx_pkts; - uint32_t tx_failures; - uint32_t rx_ucast_pkts; - uint32_t rx_mcast_pkts; - uint32_t tx_rate; - uint32_t rx_rate; + uint16_t ver; + uint16_t len; + uint16_t cap; + uint32_t flags; + uint32_t idle; + struct ether_addr ea; + wl_rateset_t rateset; + uint32_t in; + uint32_t listen_interval_inms; + uint32_t tx_pkts; + uint32_t tx_failures; + uint32_t rx_ucast_pkts; + uint32_t rx_mcast_pkts; + uint32_t tx_rate; + uint32_t rx_rate; } sta_info_t; #define WL_OLD_STAINFO_SIZE offsetof(sta_info_t, tx_pkts) @@ -569,50 +573,50 @@ typedef struct typedef struct channel_info { - int32_t hw_channel; - int32_t target_channel; - int32_t scan_channel; + int32_t hw_channel; + int32_t target_channel; + int32_t scan_channel; } channel_info_t; struct mac_list { - uint32_t count; - struct ether_addr ea[1]; + uint32_t count; + struct ether_addr ea[1]; }; typedef struct get_pktcnt { - uint32_t rx_good_pkt; - uint32_t rx_bad_pkt; - uint32_t tx_good_pkt; - uint32_t tx_bad_pkt; - uint32_t rx_ocast_good_pkt; + uint32_t rx_good_pkt; + uint32_t rx_bad_pkt; + uint32_t tx_good_pkt; + uint32_t tx_bad_pkt; + uint32_t rx_ocast_good_pkt; } get_pktcnt_t; typedef struct wl_ioctl { - uint32_t cmd; - void* buf; - uint32_t len; - uint8_t set; - uint32_t used; - uint32_t needed; + uint32_t cmd; + void *buf; + uint32_t len; + uint8_t set; + uint32_t used; + uint32_t needed; } wl_ioctl_t; typedef struct wlc_rev_info { - uint32_t vendorid; - uint32_t deviceid; - uint32_t radiorev; - uint32_t chiprev; - uint32_t corerev; - uint32_t boardid; - uint32_t boardvendor; - uint32_t boardrev; - uint32_t driverrev; - uint32_t ucoderev; - uint32_t bus; - uint32_t chipnum; - uint32_t phytype; - uint32_t phyrev; - uint32_t anarev; + uint32_t vendorid; + uint32_t deviceid; + uint32_t radiorev; + uint32_t chiprev; + uint32_t corerev; + uint32_t boardid; + uint32_t boardvendor; + uint32_t boardrev; + uint32_t driverrev; + uint32_t ucoderev; + uint32_t bus; + uint32_t chipnum; + uint32_t phytype; + uint32_t phyrev; + uint32_t anarev; } wlc_rev_info_t; #define WL_REV_INFO_LEGACY_LENGTH 48 @@ -620,23 +624,23 @@ typedef struct wlc_rev_info typedef struct wl_instance_info { - uint32_t instance; - int8_t brand[WL_BRAND_MAX]; + uint32_t instance; + int8_t brand[WL_BRAND_MAX]; } wl_instance_info_t; typedef struct wl_txfifo_sz { - uint8_t fifo; - uint8_t size; + uint8_t fifo; + uint8_t size; } wl_txfifo_sz_t; #define WLC_IOV_NAME_LEN 30 typedef struct wlc_iov_trx_s { - uint8_t module; - uint8_t type; - int8_t name[WLC_IOV_NAME_LEN]; + uint8_t module; + uint8_t type; + int8_t name[WLC_IOV_NAME_LEN]; } wlc_iov_trx_t; #define IOVAR_STR_BSSCFG_WPA_AUTH "bsscfg:wpa_auth" @@ -1110,43 +1114,43 @@ typedef struct wlc_iov_trx_s typedef struct wl_aci_args { - int32_t enter_aci_thresh; - int32_t exit_aci_thresh; - int32_t usec_spin; - int32_t glitch_delay; - uint16_t nphy_adcpwr_enter_thresh; - uint16_t nphy_adcpwr_exit_thresh; - uint16_t nphy_repeat_ctr; - uint16_t nphy_num_samples; - uint16_t nphy_undetect_window_sz; - uint16_t nphy_b_energy_lo_aci; - uint16_t nphy_b_energy_md_aci; - uint16_t nphy_b_energy_hi_aci; + int32_t enter_aci_thresh; + int32_t exit_aci_thresh; + int32_t usec_spin; + int32_t glitch_delay; + uint16_t nphy_adcpwr_enter_thresh; + uint16_t nphy_adcpwr_exit_thresh; + uint16_t nphy_repeat_ctr; + uint16_t nphy_num_samples; + uint16_t nphy_undetect_window_sz; + uint16_t nphy_b_energy_lo_aci; + uint16_t nphy_b_energy_md_aci; + uint16_t nphy_b_energy_hi_aci; } wl_aci_args_t; #define WL_ACI_ARGS_LEGACY_LENGTH 16 typedef struct { - int32_t npulses; - int32_t ncontig; - int32_t min_pw; - int32_t max_pw; - uint16_t thresh0; - uint16_t thresh1; - uint16_t blank; - uint16_t fmdemodcfg; - int32_t npulses_lp; - int32_t min_pw_lp; - int32_t max_pw_lp; - int32_t min_fm_lp; - int32_t max_deltat_lp; - int32_t min_deltat; - int32_t max_deltat; - uint16_t autocorr; - uint16_t st_level_time; - uint16_t t2_min; - uint32_t version; + int32_t npulses; + int32_t ncontig; + int32_t min_pw; + int32_t max_pw; + uint16_t thresh0; + uint16_t thresh1; + uint16_t blank; + uint16_t fmdemodcfg; + int32_t npulses_lp; + int32_t min_pw_lp; + int32_t max_pw_lp; + int32_t min_fm_lp; + int32_t max_deltat_lp; + int32_t min_deltat; + int32_t max_deltat; + uint16_t autocorr; + uint16_t st_level_time; + uint16_t t2_min; + uint32_t version; } wl_radar_args_t; #define WL_RADAR_ARGS_VERSION 1 @@ -1158,9 +1162,9 @@ typedef struct typedef struct { - uint32_t version; - uint32_t count; - int8_t rssi_ant[WL_RSSI_ANT_MAX]; + uint32_t version; + uint32_t count; + int8_t rssi_ant[WL_RSSI_ANT_MAX]; } wl_rssi_ant_t; #define WL_DFS_CACSTATE_IDLE 0 @@ -1174,29 +1178,29 @@ typedef struct typedef struct { - uint32_t state; - uint32_t duration; - wl_chanspec_t chanspec_cleared; - uint16_t pad; + uint32_t state; + uint32_t duration; + wl_chanspec_t chanspec_cleared; + uint16_t pad; } wl_dfs_status_t; #define NUM_PWRCTRL_RATES 12 typedef struct { - uint8_t txpwr_band_max[NUM_PWRCTRL_RATES]; - uint8_t txpwr_limit[NUM_PWRCTRL_RATES]; - uint8_t txpwr_local_max; - uint8_t txpwr_local_constraint; - uint8_t txpwr_chan_reg_max; - uint8_t txpwr_target[2][NUM_PWRCTRL_RATES]; - uint8_t txpwr_est_Pout[2]; - uint8_t txpwr_opo[NUM_PWRCTRL_RATES]; - uint8_t txpwr_bphy_cck_max[NUM_PWRCTRL_RATES]; - uint8_t txpwr_bphy_ofdm_max; - uint8_t txpwr_aphy_max[NUM_PWRCTRL_RATES]; - int8_t txpwr_antgain[2]; - uint8_t txpwr_est_Pout_gofdm; + uint8_t txpwr_band_max[NUM_PWRCTRL_RATES]; + uint8_t txpwr_limit[NUM_PWRCTRL_RATES]; + uint8_t txpwr_local_max; + uint8_t txpwr_local_constraint; + uint8_t txpwr_chan_reg_max; + uint8_t txpwr_target[2][NUM_PWRCTRL_RATES]; + uint8_t txpwr_est_Pout[2]; + uint8_t txpwr_opo[NUM_PWRCTRL_RATES]; + uint8_t txpwr_bphy_cck_max[NUM_PWRCTRL_RATES]; + uint8_t txpwr_bphy_ofdm_max; + uint8_t txpwr_aphy_max[NUM_PWRCTRL_RATES]; + int8_t txpwr_antgain[2]; + uint8_t txpwr_est_Pout_gofdm; } tx_power_legacy_t; #define WL_TX_POWER_RATES 45 @@ -1219,25 +1223,25 @@ typedef struct typedef struct { - uint32_t flags; - wl_chanspec_t chanspec; - wl_chanspec_t local_chanspec; - uint8_t local_max; - uint8_t local_constraint; - int8_t antgain[2]; - uint8_t rf_cores; - uint8_t est_Pout[4]; - uint8_t est_Pout_cck; - uint8_t user_limit[WL_TX_POWER_RATES]; - uint8_t reg_limit[WL_TX_POWER_RATES]; - uint8_t board_limit[WL_TX_POWER_RATES]; - uint8_t target[WL_TX_POWER_RATES]; + uint32_t flags; + wl_chanspec_t chanspec; + wl_chanspec_t local_chanspec; + uint8_t local_max; + uint8_t local_constraint; + int8_t antgain[2]; + uint8_t rf_cores; + uint8_t est_Pout[4]; + uint8_t est_Pout_cck; + uint8_t user_limit[WL_TX_POWER_RATES]; + uint8_t reg_limit[WL_TX_POWER_RATES]; + uint8_t board_limit[WL_TX_POWER_RATES]; + uint8_t target[WL_TX_POWER_RATES]; } tx_power_t; typedef struct tx_inst_power { - uint8_t txpwr_est_Pout[2]; - uint8_t txpwr_est_Pout_gofdm; + uint8_t txpwr_est_Pout[2]; + uint8_t txpwr_est_Pout_gofdm; } tx_inst_power_t; #define WLC_MEASURE_TPC 1 @@ -1349,29 +1353,29 @@ typedef struct tx_inst_power struct wl_vndr_ie { - uint8_t id; - uint8_t len; - uint8_t oui[3]; - uint8_t data[1]; + uint8_t id; + uint8_t len; + uint8_t oui[3]; + uint8_t data[1]; }; typedef struct wl_vndr_ie wl_vndr_ie_t; typedef struct { - uint32_t pktflag; - wl_vndr_ie_t vndr_ie_data; + uint32_t pktflag; + wl_vndr_ie_t vndr_ie_data; } vndr_ie_info_t; typedef struct { - int32_t iecount; - vndr_ie_info_t vndr_ie_list[1]; + int32_t iecount; + vndr_ie_info_t vndr_ie_list[1]; } vndr_ie_buf_t; typedef struct { - int8_t cmd[VNDR_IE_CMD_LEN]; - vndr_ie_buf_t vndr_ie_buffer; + int8_t cmd[VNDR_IE_CMD_LEN]; + vndr_ie_buf_t vndr_ie_buffer; } vndr_ie_setbuf_t; #define WL_JOIN_PREF_RSSI 1 @@ -1382,7 +1386,7 @@ typedef struct struct tsinfo_arg { - uint8_t octets[3]; + uint8_t octets[3]; }; #define NFIFO 6 @@ -1391,811 +1395,813 @@ struct tsinfo_arg typedef struct { - uint16_t version; /* see definition of WL_CNT_T_VERSION */ - uint16_t length; /* length of entire structure */ + uint16_t version; /* see definition of WL_CNT_T_VERSION */ + uint16_t length; /* length of entire structure */ - /* transmit stat counters */ - uint32_t txframe; /* tx data frames */ - uint32_t txbyte; /* tx data bytes */ - uint32_t txretrans; /* tx mac retransmits */ - uint32_t txerror; /* tx data errors (derived: sum of others) */ - uint32_t txctl; /* tx management frames */ - uint32_t txprshort; /* tx short preamble frames */ - uint32_t txserr; /* tx status errors */ - uint32_t txnobuf; /* tx out of buffers errors */ - uint32_t txnoassoc; /* tx discard because we're not associated */ - uint32_t txrunt; /* tx runt frames */ - uint32_t txchit; /* tx header cache hit (fastpath) */ - uint32_t txcmiss; /* tx header cache miss (slowpath) */ + /* transmit stat counters */ + uint32_t txframe; /* tx data frames */ + uint32_t txbyte; /* tx data bytes */ + uint32_t txretrans; /* tx mac retransmits */ + uint32_t txerror; /* tx data errors (derived: sum of others) */ + uint32_t txctl; /* tx management frames */ + uint32_t txprshort; /* tx short preamble frames */ + uint32_t txserr; /* tx status errors */ + uint32_t txnobuf; /* tx out of buffers errors */ + uint32_t txnoassoc; /* tx discard because we're not associated */ + uint32_t txrunt; /* tx runt frames */ + uint32_t txchit; /* tx header cache hit (fastpath) */ + uint32_t txcmiss; /* tx header cache miss (slowpath) */ - /* transmit chip error counters */ - uint32_t txuflo; /* tx fifo underflows */ - uint32_t txphyerr; /* tx phy errors (indicated in tx status) */ - uint32_t txphycrs; /* PR8861/8963 counter */ + /* transmit chip error counters */ + uint32_t txuflo; /* tx fifo underflows */ + uint32_t txphyerr; /* tx phy errors (indicated in tx status) */ + uint32_t txphycrs; /* PR8861/8963 counter */ - /* receive stat counters */ - uint32_t rxframe; /* rx data frames */ - uint32_t rxbyte; /* rx data bytes */ - uint32_t rxerror; /* rx data errors (derived: sum of others) */ - uint32_t rxctl; /* rx management frames */ - uint32_t rxnobuf; /* rx out of buffers errors */ - uint32_t rxnondata; /* rx non data frames in the data channel errors */ - uint32_t rxbadds; /* rx bad DS errors */ - uint32_t rxbadcm; /* rx bad control or management frames */ - uint32_t rxfragerr; /* rx fragmentation errors */ - uint32_t rxrunt; /* rx runt frames */ - uint32_t rxgiant; /* rx giant frames */ - uint32_t rxnoscb; /* rx no scb error */ - uint32_t rxbadproto; /* rx invalid frames */ - uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */ - uint32_t rxbadda; /* rx frames tossed for invalid da */ - uint32_t rxfilter; /* rx frames filtered out */ + /* receive stat counters */ + uint32_t rxframe; /* rx data frames */ + uint32_t rxbyte; /* rx data bytes */ + uint32_t rxerror; /* rx data errors (derived: sum of others) */ + uint32_t rxctl; /* rx management frames */ + uint32_t rxnobuf; /* rx out of buffers errors */ + uint32_t rxnondata; /* rx non data frames in the data channel errors */ + uint32_t rxbadds; /* rx bad DS errors */ + uint32_t rxbadcm; /* rx bad control or management frames */ + uint32_t rxfragerr; /* rx fragmentation errors */ + uint32_t rxrunt; /* rx runt frames */ + uint32_t rxgiant; /* rx giant frames */ + uint32_t rxnoscb; /* rx no scb error */ + uint32_t rxbadproto; /* rx invalid frames */ + uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */ + uint32_t rxbadda; /* rx frames tossed for invalid da */ + uint32_t rxfilter; /* rx frames filtered out */ - /* receive chip error counters */ - uint32_t rxoflo; /* rx fifo overflow errors */ - uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ + /* receive chip error counters */ + uint32_t rxoflo; /* rx fifo overflow errors */ + uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ - uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ - uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ - uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ + uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ + uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ + uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ - /* misc counters */ - uint32_t dmade; /* tx/rx dma descriptor errors */ - uint32_t dmada; /* tx/rx dma data errors */ - uint32_t dmape; /* tx/rx dma descriptor protocol errors */ - uint32_t reset; /* reset count */ - uint32_t tbtt; /* cnts the TBTT int's */ - uint32_t txdmawar; /* # occurrences of PR15420 workaround */ - uint32_t pkt_callback_reg_fail; /* callbacks register failure */ + /* misc counters */ + uint32_t dmade; /* tx/rx dma descriptor errors */ + uint32_t dmada; /* tx/rx dma data errors */ + uint32_t dmape; /* tx/rx dma descriptor protocol errors */ + uint32_t reset; /* reset count */ + uint32_t tbtt; /* cnts the TBTT int's */ + uint32_t txdmawar; /* # occurrences of PR15420 workaround */ + uint32_t pkt_callback_reg_fail; /* callbacks register failure */ - /* MAC counters: 32-bit version of d11.h's macstat_t */ - uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, - * Control Management (includes retransmissions) - */ - uint32_t txrtsfrm; /* number of RTS sent out by the MAC */ - uint32_t txctsfrm; /* number of CTS sent out by the MAC */ - uint32_t txackfrm; /* number of ACK frames sent out */ - uint32_t txdnlfrm; /* Not used */ - uint32_t txbcnfrm; /* beacons transmitted */ - uint32_t txfunfl[8]; /* per-fifo tx underflows */ - uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS - * or BCN) - */ - uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for - * driver enqueued frames - */ - uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ - uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ - uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not - * data/control/management - */ - uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ - uint32_t rxbadplcp; /* parity check of the PLCP header failed */ - uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ - uint32_t rxstrt; /* Number of received frames with a good PLCP - * (i.e. passing parity check) - */ - uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ - uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ - uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ - uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ - uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ - uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */ - uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ - uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ - uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ - uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */ - uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */ - uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ - uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ - uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC - * (unlikely to see these) - */ - uint32_t rxbeaconmbss; /* beacons received from member of BSS */ - uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from - * other BSS (WDS FRAME) - */ - uint32_t rxbeaconobss; /* beacons received from other BSS */ - uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames - * expecting a response - */ - uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ - uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */ - uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ - uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ - uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ - uint32_t pmqovfl; /* Number of PMQ overflows */ - uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into - * the PRQ fifo - */ - uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ - uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did - * not get ACK - */ - uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */ - uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ - * fifo because a probe response could not be sent out within - * the time limit defined in M_PRS_MAXTIME - */ - uint32_t rxnack; /* XXX Number of NACKS received (Afterburner) */ - uint32_t frmscons; /* XXX Number of frames completed without transmission because of an - * Afterburner re-queue - */ - uint32_t txnack; /* XXX Number of NACKs transmitted (Afterburner) */ - uint32_t txglitch_nack; /* obsolete */ - uint32_t txburst; /* obsolete */ + /* MAC counters: 32-bit version of d11.h's macstat_t */ + uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, + * Control Management (includes retransmissions) + */ + uint32_t txrtsfrm; /* number of RTS sent out by the MAC */ + uint32_t txctsfrm; /* number of CTS sent out by the MAC */ + uint32_t txackfrm; /* number of ACK frames sent out */ + uint32_t txdnlfrm; /* Not used */ + uint32_t txbcnfrm; /* beacons transmitted */ + uint32_t txfunfl[8]; /* per-fifo tx underflows */ + uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS + * or BCN) + */ + uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for + * driver enqueued frames + */ + uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ + uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ + uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not + * data/control/management + */ + uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ + uint32_t rxbadplcp; /* parity check of the PLCP header failed */ + uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ + uint32_t rxstrt; /* Number of received frames with a good PLCP + * (i.e. passing parity check) + */ + uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ + uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ + uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ + uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ + uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ + uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */ + uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ + uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ + uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ + uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */ + uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */ + uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ + uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ + uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC + * (unlikely to see these) + */ + uint32_t rxbeaconmbss; /* beacons received from member of BSS */ + uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from + * other BSS (WDS FRAME) + */ + uint32_t rxbeaconobss; /* beacons received from other BSS */ + uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames + * expecting a response + */ + uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ + uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */ + uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ + uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ + uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ + uint32_t pmqovfl; /* Number of PMQ overflows */ + uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into + * the PRQ fifo + */ + uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ + uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did + * not get ACK + */ + uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */ + uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ + * fifo because a probe response could not be sent out within + * the time limit defined in M_PRS_MAXTIME + */ + uint32_t rxnack; /* XXX Number of NACKS received (Afterburner) */ + uint32_t frmscons; /* XXX Number of frames completed without transmission because of an + * Afterburner re-queue + */ + uint32_t txnack; /* XXX Number of NACKs transmitted (Afterburner) */ + uint32_t txglitch_nack; /* obsolete */ + uint32_t txburst; /* obsolete */ - /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ - uint32_t txfrag; /* dot11TransmittedFragmentCount */ - uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32_t txfail; /* dot11FailedCount */ - uint32_t txretry; /* dot11RetryCount */ - uint32_t txretrie; /* dot11MultipleRetryCount */ - uint32_t rxdup; /* dot11FrameduplicateCount */ - uint32_t txrts; /* dot11RTSSuccessCount */ - uint32_t txnocts; /* dot11RTSFailureCount */ - uint32_t txnoack; /* dot11ACKFailureCount */ - uint32_t rxfrag; /* dot11ReceivedFragmentCount */ - uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32_t rxcrc; /* dot11FCSErrorCount */ - uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ - uint32_t rxundec; /* dot11WEPUndecryptableCount */ + /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ + uint32_t txfrag; /* dot11TransmittedFragmentCount */ + uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32_t txfail; /* dot11FailedCount */ + uint32_t txretry; /* dot11RetryCount */ + uint32_t txretrie; /* dot11MultipleRetryCount */ + uint32_t rxdup; /* dot11FrameduplicateCount */ + uint32_t txrts; /* dot11RTSSuccessCount */ + uint32_t txnocts; /* dot11RTSFailureCount */ + uint32_t txnoack; /* dot11ACKFailureCount */ + uint32_t rxfrag; /* dot11ReceivedFragmentCount */ + uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32_t rxcrc; /* dot11FCSErrorCount */ + uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ + uint32_t rxundec; /* dot11WEPUndecryptableCount */ - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32_t tkipmicfaill; /* TKIPLocalMICFailures */ - uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ - uint32_t tkipreplay; /* TKIPReplays */ - uint32_t ccmpfmterr; /* CCMPFormatErrors */ - uint32_t ccmpreplay; /* CCMPReplays */ - uint32_t ccmpundec; /* CCMPDecryptErrors */ - uint32_t fourwayfail; /* FourWayHandshakeFailures */ - uint32_t wepundec; /* dot11WEPUndecryptableCount */ - uint32_t wepicverr; /* dot11WEPICVErrorCount */ - uint32_t decsuccess; /* DecryptSuccessCount */ - uint32_t tkipicverr; /* TKIPICVErrorCount */ - uint32_t wepexcluded; /* dot11WEPExcludedCount */ + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32_t tkipmicfaill; /* TKIPLocalMICFailures */ + uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ + uint32_t tkipreplay; /* TKIPReplays */ + uint32_t ccmpfmterr; /* CCMPFormatErrors */ + uint32_t ccmpreplay; /* CCMPReplays */ + uint32_t ccmpundec; /* CCMPDecryptErrors */ + uint32_t fourwayfail; /* FourWayHandshakeFailures */ + uint32_t wepundec; /* dot11WEPUndecryptableCount */ + uint32_t wepicverr; /* dot11WEPICVErrorCount */ + uint32_t decsuccess; /* DecryptSuccessCount */ + uint32_t tkipicverr; /* TKIPICVErrorCount */ + uint32_t wepexcluded; /* dot11WEPExcludedCount */ - uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */ + uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */ - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */ - uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ - uint32_t tkipreplay_mcst; /* TKIPReplays */ - uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */ - uint32_t ccmpreplay_mcst; /* CCMPReplays */ - uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */ - uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */ - uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */ - uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */ - uint32_t decsuccess_mcst; /* DecryptSuccessCount */ - uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */ - uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */ + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */ + uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ + uint32_t tkipreplay_mcst; /* TKIPReplays */ + uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */ + uint32_t ccmpreplay_mcst; /* CCMPReplays */ + uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */ + uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */ + uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */ + uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */ + uint32_t decsuccess_mcst; /* DecryptSuccessCount */ + uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */ + uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */ - uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */ - uint32_t txexptime; /* Tx frames suppressed due to timer expiration */ - uint32_t psmwds; /* Count PSM watchdogs */ - uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ + uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */ + uint32_t txexptime; /* Tx frames suppressed due to timer expiration */ + uint32_t psmwds; /* Count PSM watchdogs */ + uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ - /* MBSS counters, AP only */ - uint32_t prq_entries_handled; /* PRQ entries read in */ - uint32_t prq_undirected_entries; /* which were bcast bss & ssid */ - uint32_t prq_bad_entries; /* which could not be translated to info */ - uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */ - uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */ - uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ - uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */ + /* MBSS counters, AP only */ + uint32_t prq_entries_handled; /* PRQ entries read in */ + uint32_t prq_undirected_entries; /* which were bcast bss & ssid */ + uint32_t prq_bad_entries; /* which could not be translated to info */ + uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */ + uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */ + uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ + uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */ - /* per-rate receive stat counters */ - uint32_t rx1mbps; /* packets rx at 1Mbps */ - uint32_t rx2mbps; /* packets rx at 2Mbps */ - uint32_t rx5mbps5; /* packets rx at 5.5Mbps */ - uint32_t rx6mbps; /* packets rx at 6Mbps */ - uint32_t rx9mbps; /* packets rx at 9Mbps */ - uint32_t rx11mbps; /* packets rx at 11Mbps */ - uint32_t rx12mbps; /* packets rx at 12Mbps */ - uint32_t rx18mbps; /* packets rx at 18Mbps */ - uint32_t rx24mbps; /* packets rx at 24Mbps */ - uint32_t rx36mbps; /* packets rx at 36Mbps */ - uint32_t rx48mbps; /* packets rx at 48Mbps */ - uint32_t rx54mbps; /* packets rx at 54Mbps */ - uint32_t rx108mbps; /* packets rx at 108mbps */ - uint32_t rx162mbps; /* packets rx at 162mbps */ - uint32_t rx216mbps; /* packets rx at 216 mbps */ - uint32_t rx270mbps; /* packets rx at 270 mbps */ - uint32_t rx324mbps; /* packets rx at 324 mbps */ - uint32_t rx378mbps; /* packets rx at 378 mbps */ - uint32_t rx432mbps; /* packets rx at 432 mbps */ - uint32_t rx486mbps; /* packets rx at 486 mbps */ - uint32_t rx540mbps; /* packets rx at 540 mbps */ + /* per-rate receive stat counters */ + uint32_t rx1mbps; /* packets rx at 1Mbps */ + uint32_t rx2mbps; /* packets rx at 2Mbps */ + uint32_t rx5mbps5; /* packets rx at 5.5Mbps */ + uint32_t rx6mbps; /* packets rx at 6Mbps */ + uint32_t rx9mbps; /* packets rx at 9Mbps */ + uint32_t rx11mbps; /* packets rx at 11Mbps */ + uint32_t rx12mbps; /* packets rx at 12Mbps */ + uint32_t rx18mbps; /* packets rx at 18Mbps */ + uint32_t rx24mbps; /* packets rx at 24Mbps */ + uint32_t rx36mbps; /* packets rx at 36Mbps */ + uint32_t rx48mbps; /* packets rx at 48Mbps */ + uint32_t rx54mbps; /* packets rx at 54Mbps */ + uint32_t rx108mbps; /* packets rx at 108mbps */ + uint32_t rx162mbps; /* packets rx at 162mbps */ + uint32_t rx216mbps; /* packets rx at 216 mbps */ + uint32_t rx270mbps; /* packets rx at 270 mbps */ + uint32_t rx324mbps; /* packets rx at 324 mbps */ + uint32_t rx378mbps; /* packets rx at 378 mbps */ + uint32_t rx432mbps; /* packets rx at 432 mbps */ + uint32_t rx486mbps; /* packets rx at 486 mbps */ + uint32_t rx540mbps; /* packets rx at 540 mbps */ - /* pkteng rx frame stats */ - uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */ - uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */ + /* pkteng rx frame stats */ + uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */ + uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */ - uint32_t rfdisable; /* count of radio disables */ - uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */ + uint32_t rfdisable; /* count of radio disables */ + uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */ - uint32_t txmpdu_sgi; /* count for sgi transmit */ - uint32_t rxmpdu_sgi; /* count for sgi received */ - uint32_t txmpdu_stbc; /* count for stbc transmit */ - uint32_t rxmpdu_stbc; /* count for stbc received */ + uint32_t txmpdu_sgi; /* count for sgi transmit */ + uint32_t rxmpdu_sgi; /* count for sgi received */ + uint32_t txmpdu_stbc; /* count for stbc transmit */ + uint32_t rxmpdu_stbc; /* count for stbc received */ } wl_cnt_ver_six_t; -typedef struct { - uint16_t version; /* see definition of WL_CNT_T_VERSION */ - uint16_t length; /* length of entire structure */ +typedef struct +{ + uint16_t version; /* see definition of WL_CNT_T_VERSION */ + uint16_t length; /* length of entire structure */ - /* transmit stat counters */ - uint32_t txframe; /* tx data frames */ - uint32_t txbyte; /* tx data bytes */ - uint32_t txretrans; /* tx mac retransmits */ - uint32_t txerror; /* tx data errors (derived: sum of others) */ - uint32_t txctl; /* tx management frames */ - uint32_t txprshort; /* tx short preamble frames */ - uint32_t txserr; /* tx status errors */ - uint32_t txnobuf; /* tx out of buffers errors */ - uint32_t txnoassoc; /* tx discard because we're not associated */ - uint32_t txrunt; /* tx runt frames */ - uint32_t txchit; /* tx header cache hit (fastpath) */ - uint32_t txcmiss; /* tx header cache miss (slowpath) */ + /* transmit stat counters */ + uint32_t txframe; /* tx data frames */ + uint32_t txbyte; /* tx data bytes */ + uint32_t txretrans; /* tx mac retransmits */ + uint32_t txerror; /* tx data errors (derived: sum of others) */ + uint32_t txctl; /* tx management frames */ + uint32_t txprshort; /* tx short preamble frames */ + uint32_t txserr; /* tx status errors */ + uint32_t txnobuf; /* tx out of buffers errors */ + uint32_t txnoassoc; /* tx discard because we're not associated */ + uint32_t txrunt; /* tx runt frames */ + uint32_t txchit; /* tx header cache hit (fastpath) */ + uint32_t txcmiss; /* tx header cache miss (slowpath) */ - /* transmit chip error counters */ - uint32_t txuflo; /* tx fifo underflows */ - uint32_t txphyerr; /* tx phy errors (indicated in tx status) */ - uint32_t txphycrs; /* PR8861/8963 counter */ + /* transmit chip error counters */ + uint32_t txuflo; /* tx fifo underflows */ + uint32_t txphyerr; /* tx phy errors (indicated in tx status) */ + uint32_t txphycrs; /* PR8861/8963 counter */ - /* receive stat counters */ - uint32_t rxframe; /* rx data frames */ - uint32_t rxbyte; /* rx data bytes */ - uint32_t rxerror; /* rx data errors (derived: sum of others) */ - uint32_t rxctl; /* rx management frames */ - uint32_t rxnobuf; /* rx out of buffers errors */ - uint32_t rxnondata; /* rx non data frames in the data channel errors */ - uint32_t rxbadds; /* rx bad DS errors */ - uint32_t rxbadcm; /* rx bad control or management frames */ - uint32_t rxfragerr; /* rx fragmentation errors */ - uint32_t rxrunt; /* rx runt frames */ - uint32_t rxgiant; /* rx giant frames */ - uint32_t rxnoscb; /* rx no scb error */ - uint32_t rxbadproto; /* rx invalid frames */ - uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */ - uint32_t rxbadda; /* rx frames tossed for invalid da */ - uint32_t rxfilter; /* rx frames filtered out */ + /* receive stat counters */ + uint32_t rxframe; /* rx data frames */ + uint32_t rxbyte; /* rx data bytes */ + uint32_t rxerror; /* rx data errors (derived: sum of others) */ + uint32_t rxctl; /* rx management frames */ + uint32_t rxnobuf; /* rx out of buffers errors */ + uint32_t rxnondata; /* rx non data frames in the data channel errors */ + uint32_t rxbadds; /* rx bad DS errors */ + uint32_t rxbadcm; /* rx bad control or management frames */ + uint32_t rxfragerr; /* rx fragmentation errors */ + uint32_t rxrunt; /* rx runt frames */ + uint32_t rxgiant; /* rx giant frames */ + uint32_t rxnoscb; /* rx no scb error */ + uint32_t rxbadproto; /* rx invalid frames */ + uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */ + uint32_t rxbadda; /* rx frames tossed for invalid da */ + uint32_t rxfilter; /* rx frames filtered out */ - /* receive chip error counters */ - uint32_t rxoflo; /* rx fifo overflow errors */ - uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ + /* receive chip error counters */ + uint32_t rxoflo; /* rx fifo overflow errors */ + uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ - uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ - uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ - uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ + uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ + uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ + uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ - /* misc counters */ - uint32_t dmade; /* tx/rx dma descriptor errors */ - uint32_t dmada; /* tx/rx dma data errors */ - uint32_t dmape; /* tx/rx dma descriptor protocol errors */ - uint32_t reset; /* reset count */ - uint32_t tbtt; /* cnts the TBTT int's */ - uint32_t txdmawar; /* # occurrences of PR15420 workaround */ - uint32_t pkt_callback_reg_fail; /* callbacks register failure */ + /* misc counters */ + uint32_t dmade; /* tx/rx dma descriptor errors */ + uint32_t dmada; /* tx/rx dma data errors */ + uint32_t dmape; /* tx/rx dma descriptor protocol errors */ + uint32_t reset; /* reset count */ + uint32_t tbtt; /* cnts the TBTT int's */ + uint32_t txdmawar; /* # occurrences of PR15420 workaround */ + uint32_t pkt_callback_reg_fail; /* callbacks register failure */ - /* MAC counters: 32-bit version of d11.h's macstat_t */ - uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, - * Control Management (includes retransmissions) - */ - uint32_t txrtsfrm; /* number of RTS sent out by the MAC */ - uint32_t txctsfrm; /* number of CTS sent out by the MAC */ - uint32_t txackfrm; /* number of ACK frames sent out */ - uint32_t txdnlfrm; /* Not used */ - uint32_t txbcnfrm; /* beacons transmitted */ - uint32_t txfunfl[8]; /* per-fifo tx underflows */ - uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS - * or BCN) - */ - uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for - * driver enqueued frames - */ - uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ - uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ - uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not - * data/control/management - */ - uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ - uint32_t rxbadplcp; /* parity check of the PLCP header failed */ - uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ - uint32_t rxstrt; /* Number of received frames with a good PLCP - * (i.e. passing parity check) - */ - uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ - uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ - uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ - uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ - uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ - uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */ - uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ - uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ - uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ - uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */ - uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */ - uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ - uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ - uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC - * (unlikely to see these) - */ - uint32_t rxbeaconmbss; /* beacons received from member of BSS */ - uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from - * other BSS (WDS FRAME) - */ - uint32_t rxbeaconobss; /* beacons received from other BSS */ - uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames - * expecting a response - */ - uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ - uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */ - uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ - uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ - uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ - uint32_t pmqovfl; /* Number of PMQ overflows */ - uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into - * the PRQ fifo - */ - uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ - uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did - * not get ACK - */ - uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */ - uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ - * fifo because a probe response could not be sent out within - * the time limit defined in M_PRS_MAXTIME - */ - uint32_t rxnack; /* obsolete */ - uint32_t frmscons; /* obsolete */ - uint32_t txnack; /* obsolete */ - uint32_t txglitch_nack; /* obsolete */ - uint32_t txburst; /* obsolete */ + /* MAC counters: 32-bit version of d11.h's macstat_t */ + uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, + * Control Management (includes retransmissions) + */ + uint32_t txrtsfrm; /* number of RTS sent out by the MAC */ + uint32_t txctsfrm; /* number of CTS sent out by the MAC */ + uint32_t txackfrm; /* number of ACK frames sent out */ + uint32_t txdnlfrm; /* Not used */ + uint32_t txbcnfrm; /* beacons transmitted */ + uint32_t txfunfl[8]; /* per-fifo tx underflows */ + uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS + * or BCN) + */ + uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for + * driver enqueued frames + */ + uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ + uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ + uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not + * data/control/management + */ + uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ + uint32_t rxbadplcp; /* parity check of the PLCP header failed */ + uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ + uint32_t rxstrt; /* Number of received frames with a good PLCP + * (i.e. passing parity check) + */ + uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ + uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ + uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ + uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ + uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ + uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */ + uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ + uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ + uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ + uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */ + uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */ + uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ + uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ + uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC + * (unlikely to see these) + */ + uint32_t rxbeaconmbss; /* beacons received from member of BSS */ + uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from + * other BSS (WDS FRAME) + */ + uint32_t rxbeaconobss; /* beacons received from other BSS */ + uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames + * expecting a response + */ + uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ + uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */ + uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ + uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ + uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ + uint32_t pmqovfl; /* Number of PMQ overflows */ + uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into + * the PRQ fifo + */ + uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ + uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did + * not get ACK + */ + uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */ + uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ + * fifo because a probe response could not be sent out within + * the time limit defined in M_PRS_MAXTIME + */ + uint32_t rxnack; /* obsolete */ + uint32_t frmscons; /* obsolete */ + uint32_t txnack; /* obsolete */ + uint32_t txglitch_nack; /* obsolete */ + uint32_t txburst; /* obsolete */ - /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ - uint32_t txfrag; /* dot11TransmittedFragmentCount */ - uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32_t txfail; /* dot11FailedCount */ - uint32_t txretry; /* dot11RetryCount */ - uint32_t txretrie; /* dot11MultipleRetryCount */ - uint32_t rxdup; /* dot11FrameduplicateCount */ - uint32_t txrts; /* dot11RTSSuccessCount */ - uint32_t txnocts; /* dot11RTSFailureCount */ - uint32_t txnoack; /* dot11ACKFailureCount */ - uint32_t rxfrag; /* dot11ReceivedFragmentCount */ - uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32_t rxcrc; /* dot11FCSErrorCount */ - uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ - uint32_t rxundec; /* dot11WEPUndecryptableCount */ + /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ + uint32_t txfrag; /* dot11TransmittedFragmentCount */ + uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32_t txfail; /* dot11FailedCount */ + uint32_t txretry; /* dot11RetryCount */ + uint32_t txretrie; /* dot11MultipleRetryCount */ + uint32_t rxdup; /* dot11FrameduplicateCount */ + uint32_t txrts; /* dot11RTSSuccessCount */ + uint32_t txnocts; /* dot11RTSFailureCount */ + uint32_t txnoack; /* dot11ACKFailureCount */ + uint32_t rxfrag; /* dot11ReceivedFragmentCount */ + uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32_t rxcrc; /* dot11FCSErrorCount */ + uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ + uint32_t rxundec; /* dot11WEPUndecryptableCount */ - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32_t tkipmicfaill; /* TKIPLocalMICFailures */ - uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ - uint32_t tkipreplay; /* TKIPReplays */ - uint32_t ccmpfmterr; /* CCMPFormatErrors */ - uint32_t ccmpreplay; /* CCMPReplays */ - uint32_t ccmpundec; /* CCMPDecryptErrors */ - uint32_t fourwayfail; /* FourWayHandshakeFailures */ - uint32_t wepundec; /* dot11WEPUndecryptableCount */ - uint32_t wepicverr; /* dot11WEPICVErrorCount */ - uint32_t decsuccess; /* DecryptSuccessCount */ - uint32_t tkipicverr; /* TKIPICVErrorCount */ - uint32_t wepexcluded; /* dot11WEPExcludedCount */ + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32_t tkipmicfaill; /* TKIPLocalMICFailures */ + uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ + uint32_t tkipreplay; /* TKIPReplays */ + uint32_t ccmpfmterr; /* CCMPFormatErrors */ + uint32_t ccmpreplay; /* CCMPReplays */ + uint32_t ccmpundec; /* CCMPDecryptErrors */ + uint32_t fourwayfail; /* FourWayHandshakeFailures */ + uint32_t wepundec; /* dot11WEPUndecryptableCount */ + uint32_t wepicverr; /* dot11WEPICVErrorCount */ + uint32_t decsuccess; /* DecryptSuccessCount */ + uint32_t tkipicverr; /* TKIPICVErrorCount */ + uint32_t wepexcluded; /* dot11WEPExcludedCount */ - uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */ - uint32_t psmwds; /* Count PSM watchdogs */ - uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ + uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */ + uint32_t psmwds; /* Count PSM watchdogs */ + uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ - /* MBSS counters, AP only */ - uint32_t prq_entries_handled; /* PRQ entries read in */ - uint32_t prq_undirected_entries; /* which were bcast bss & ssid */ - uint32_t prq_bad_entries; /* which could not be translated to info */ - uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */ - uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */ - uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ - uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */ + /* MBSS counters, AP only */ + uint32_t prq_entries_handled; /* PRQ entries read in */ + uint32_t prq_undirected_entries; /* which were bcast bss & ssid */ + uint32_t prq_bad_entries; /* which could not be translated to info */ + uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */ + uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */ + uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ + uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */ - /* per-rate receive stat counters */ - uint32_t rx1mbps; /* packets rx at 1Mbps */ - uint32_t rx2mbps; /* packets rx at 2Mbps */ - uint32_t rx5mbps5; /* packets rx at 5.5Mbps */ - uint32_t rx6mbps; /* packets rx at 6Mbps */ - uint32_t rx9mbps; /* packets rx at 9Mbps */ - uint32_t rx11mbps; /* packets rx at 11Mbps */ - uint32_t rx12mbps; /* packets rx at 12Mbps */ - uint32_t rx18mbps; /* packets rx at 18Mbps */ - uint32_t rx24mbps; /* packets rx at 24Mbps */ - uint32_t rx36mbps; /* packets rx at 36Mbps */ - uint32_t rx48mbps; /* packets rx at 48Mbps */ - uint32_t rx54mbps; /* packets rx at 54Mbps */ - uint32_t rx108mbps; /* packets rx at 108mbps */ - uint32_t rx162mbps; /* packets rx at 162mbps */ - uint32_t rx216mbps; /* packets rx at 216 mbps */ - uint32_t rx270mbps; /* packets rx at 270 mbps */ - uint32_t rx324mbps; /* packets rx at 324 mbps */ - uint32_t rx378mbps; /* packets rx at 378 mbps */ - uint32_t rx432mbps; /* packets rx at 432 mbps */ - uint32_t rx486mbps; /* packets rx at 486 mbps */ - uint32_t rx540mbps; /* packets rx at 540 mbps */ + /* per-rate receive stat counters */ + uint32_t rx1mbps; /* packets rx at 1Mbps */ + uint32_t rx2mbps; /* packets rx at 2Mbps */ + uint32_t rx5mbps5; /* packets rx at 5.5Mbps */ + uint32_t rx6mbps; /* packets rx at 6Mbps */ + uint32_t rx9mbps; /* packets rx at 9Mbps */ + uint32_t rx11mbps; /* packets rx at 11Mbps */ + uint32_t rx12mbps; /* packets rx at 12Mbps */ + uint32_t rx18mbps; /* packets rx at 18Mbps */ + uint32_t rx24mbps; /* packets rx at 24Mbps */ + uint32_t rx36mbps; /* packets rx at 36Mbps */ + uint32_t rx48mbps; /* packets rx at 48Mbps */ + uint32_t rx54mbps; /* packets rx at 54Mbps */ + uint32_t rx108mbps; /* packets rx at 108mbps */ + uint32_t rx162mbps; /* packets rx at 162mbps */ + uint32_t rx216mbps; /* packets rx at 216 mbps */ + uint32_t rx270mbps; /* packets rx at 270 mbps */ + uint32_t rx324mbps; /* packets rx at 324 mbps */ + uint32_t rx378mbps; /* packets rx at 378 mbps */ + uint32_t rx432mbps; /* packets rx at 432 mbps */ + uint32_t rx486mbps; /* packets rx at 486 mbps */ + uint32_t rx540mbps; /* packets rx at 540 mbps */ - /* pkteng rx frame stats */ - uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */ - uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */ + /* pkteng rx frame stats */ + uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */ + uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */ - uint32_t rfdisable; /* count of radio disables */ - uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */ + uint32_t rfdisable; /* count of radio disables */ + uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */ - uint32_t txexptime; /* Tx frames suppressed due to timer expiration */ + uint32_t txexptime; /* Tx frames suppressed due to timer expiration */ - uint32_t txmpdu_sgi; /* count for sgi transmit */ - uint32_t rxmpdu_sgi; /* count for sgi received */ - uint32_t txmpdu_stbc; /* count for stbc transmit */ - uint32_t rxmpdu_stbc; /* count for stbc received */ + uint32_t txmpdu_sgi; /* count for sgi transmit */ + uint32_t rxmpdu_sgi; /* count for sgi received */ + uint32_t txmpdu_stbc; /* count for stbc transmit */ + uint32_t rxmpdu_stbc; /* count for stbc received */ - uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */ + uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */ - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */ - uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ - uint32_t tkipreplay_mcst; /* TKIPReplays */ - uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */ - uint32_t ccmpreplay_mcst; /* CCMPReplays */ - uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */ - uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */ - uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */ - uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */ - uint32_t decsuccess_mcst; /* DecryptSuccessCount */ - uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */ - uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */ + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */ + uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ + uint32_t tkipreplay_mcst; /* TKIPReplays */ + uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */ + uint32_t ccmpreplay_mcst; /* CCMPReplays */ + uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */ + uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */ + uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */ + uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */ + uint32_t decsuccess_mcst; /* DecryptSuccessCount */ + uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */ + uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */ - uint32_t dma_hang; /* count for stbc received */ - } wl_cnt_ver_seven_t; + uint32_t dma_hang; /* count for stbc received */ +} wl_cnt_ver_seven_t; +typedef struct +{ + uint16_t version; /* see definition of WL_CNT_T_VERSION */ + uint16_t length; /* length of entire structure */ -typedef struct { - uint16_t version; /* see definition of WL_CNT_T_VERSION */ - uint16_t length; /* length of entire structure */ + /* transmit stat counters */ + uint32_t txframe; /* tx data frames */ + uint32_t txbyte; /* tx data bytes */ + uint32_t txretrans; /* tx mac retransmits */ + uint32_t txerror; /* tx data errors (derived: sum of others) */ + uint32_t txctl; /* tx management frames */ + uint32_t txprshort; /* tx short preamble frames */ + uint32_t txserr; /* tx status errors */ + uint32_t txnobuf; /* tx out of buffers errors */ + uint32_t txnoassoc; /* tx discard because we're not associated */ + uint32_t txrunt; /* tx runt frames */ + uint32_t txchit; /* tx header cache hit (fastpath) */ + uint32_t txcmiss; /* tx header cache miss (slowpath) */ - /* transmit stat counters */ - uint32_t txframe; /* tx data frames */ - uint32_t txbyte; /* tx data bytes */ - uint32_t txretrans; /* tx mac retransmits */ - uint32_t txerror; /* tx data errors (derived: sum of others) */ - uint32_t txctl; /* tx management frames */ - uint32_t txprshort; /* tx short preamble frames */ - uint32_t txserr; /* tx status errors */ - uint32_t txnobuf; /* tx out of buffers errors */ - uint32_t txnoassoc; /* tx discard because we're not associated */ - uint32_t txrunt; /* tx runt frames */ - uint32_t txchit; /* tx header cache hit (fastpath) */ - uint32_t txcmiss; /* tx header cache miss (slowpath) */ + /* transmit chip error counters */ + uint32_t txuflo; /* tx fifo underflows */ + uint32_t txphyerr; /* tx phy errors (indicated in tx status) */ + uint32_t txphycrs; /* PR8861/8963 counter */ - /* transmit chip error counters */ - uint32_t txuflo; /* tx fifo underflows */ - uint32_t txphyerr; /* tx phy errors (indicated in tx status) */ - uint32_t txphycrs; /* PR8861/8963 counter */ + /* receive stat counters */ + uint32_t rxframe; /* rx data frames */ + uint32_t rxbyte; /* rx data bytes */ + uint32_t rxerror; /* rx data errors (derived: sum of others) */ + uint32_t rxctl; /* rx management frames */ + uint32_t rxnobuf; /* rx out of buffers errors */ + uint32_t rxnondata; /* rx non data frames in the data channel errors */ + uint32_t rxbadds; /* rx bad DS errors */ + uint32_t rxbadcm; /* rx bad control or management frames */ + uint32_t rxfragerr; /* rx fragmentation errors */ + uint32_t rxrunt; /* rx runt frames */ + uint32_t rxgiant; /* rx giant frames */ + uint32_t rxnoscb; /* rx no scb error */ + uint32_t rxbadproto; /* rx invalid frames */ + uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */ + uint32_t rxbadda; /* rx frames tossed for invalid da */ + uint32_t rxfilter; /* rx frames filtered out */ - /* receive stat counters */ - uint32_t rxframe; /* rx data frames */ - uint32_t rxbyte; /* rx data bytes */ - uint32_t rxerror; /* rx data errors (derived: sum of others) */ - uint32_t rxctl; /* rx management frames */ - uint32_t rxnobuf; /* rx out of buffers errors */ - uint32_t rxnondata; /* rx non data frames in the data channel errors */ - uint32_t rxbadds; /* rx bad DS errors */ - uint32_t rxbadcm; /* rx bad control or management frames */ - uint32_t rxfragerr; /* rx fragmentation errors */ - uint32_t rxrunt; /* rx runt frames */ - uint32_t rxgiant; /* rx giant frames */ - uint32_t rxnoscb; /* rx no scb error */ - uint32_t rxbadproto; /* rx invalid frames */ - uint32_t rxbadsrcmac; /* rx frames with Invalid Src Mac */ - uint32_t rxbadda; /* rx frames tossed for invalid da */ - uint32_t rxfilter; /* rx frames filtered out */ + /* receive chip error counters */ + uint32_t rxoflo; /* rx fifo overflow errors */ + uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ - /* receive chip error counters */ - uint32_t rxoflo; /* rx fifo overflow errors */ - uint32_t rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ + uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ + uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ + uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ - uint32_t d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ - uint32_t d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ - uint32_t d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ + /* misc counters */ + uint32_t dmade; /* tx/rx dma descriptor errors */ + uint32_t dmada; /* tx/rx dma data errors */ + uint32_t dmape; /* tx/rx dma descriptor protocol errors */ + uint32_t reset; /* reset count */ + uint32_t tbtt; /* cnts the TBTT int's */ + uint32_t txdmawar; /* # occurrences of PR15420 workaround */ + uint32_t pkt_callback_reg_fail; /* callbacks register failure */ - /* misc counters */ - uint32_t dmade; /* tx/rx dma descriptor errors */ - uint32_t dmada; /* tx/rx dma data errors */ - uint32_t dmape; /* tx/rx dma descriptor protocol errors */ - uint32_t reset; /* reset count */ - uint32_t tbtt; /* cnts the TBTT int's */ - uint32_t txdmawar; /* # occurrences of PR15420 workaround */ - uint32_t pkt_callback_reg_fail; /* callbacks register failure */ + /* MAC counters: 32-bit version of d11.h's macstat_t */ + uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, + * Control Management (includes retransmissions) + */ + uint32_t txrtsfrm; /* number of RTS sent out by the MAC */ + uint32_t txctsfrm; /* number of CTS sent out by the MAC */ + uint32_t txackfrm; /* number of ACK frames sent out */ + uint32_t txdnlfrm; /* Not used */ + uint32_t txbcnfrm; /* beacons transmitted */ + uint32_t txfunfl[6]; /* per-fifo tx underflows */ + uint32_t rxtoolate; /* receive too late */ + uint32_t txfbw; /* transmit at fallback bw (dynamic bw) */ + uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS + * or BCN) + */ + uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for + * driver enqueued frames + */ + uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ + uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ + uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not + * data/control/management + */ + uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ + uint32_t rxbadplcp; /* parity check of the PLCP header failed */ + uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ + uint32_t rxstrt; /* Number of received frames with a good PLCP + * (i.e. passing parity check) + */ + uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ + uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ + uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ + uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ + uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ + uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */ + uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ + uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ + uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ + uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */ + uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */ + uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ + uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ + uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC + * (unlikely to see these) + */ + uint32_t rxbeaconmbss; /* beacons received from member of BSS */ + uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from + * other BSS (WDS FRAME) + */ + uint32_t rxbeaconobss; /* beacons received from other BSS */ + uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames + * expecting a response + */ + uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ + uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */ + uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ + uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ + uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ + uint32_t pmqovfl; /* Number of PMQ overflows */ + uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into + * the PRQ fifo + */ + uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ + uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did + * not get ACK + */ + uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */ + uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ + * fifo because a probe response could not be sent out within + * the time limit defined in M_PRS_MAXTIME + */ + uint32_t rxnack; /* obsolete */ + uint32_t frmscons; /* obsolete */ + uint32_t txnack; /* obsolete */ + uint32_t rxback; /* blockack rxcnt */ + uint32_t txback; /* blockack txcnt */ - /* MAC counters: 32-bit version of d11.h's macstat_t */ - uint32_t txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, - * Control Management (includes retransmissions) - */ - uint32_t txrtsfrm; /* number of RTS sent out by the MAC */ - uint32_t txctsfrm; /* number of CTS sent out by the MAC */ - uint32_t txackfrm; /* number of ACK frames sent out */ - uint32_t txdnlfrm; /* Not used */ - uint32_t txbcnfrm; /* beacons transmitted */ - uint32_t txfunfl[6]; /* per-fifo tx underflows */ - uint32_t rxtoolate; /* receive too late */ - uint32_t txfbw; /* transmit at fallback bw (dynamic bw) */ - uint32_t txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS - * or BCN) - */ - uint32_t txphyerror; /* Transmit phy error, type of error is reported in tx-status for - * driver enqueued frames - */ - uint32_t rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ - uint32_t rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ - uint32_t rxinvmachdr; /* Either the protocol version != 0 or frame type not - * data/control/management - */ - uint32_t rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ - uint32_t rxbadplcp; /* parity check of the PLCP header failed */ - uint32_t rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ - uint32_t rxstrt; /* Number of received frames with a good PLCP - * (i.e. passing parity check) - */ - uint32_t rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ - uint32_t rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ - uint32_t rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ - uint32_t rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ - uint32_t rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ - uint32_t rxackucast; /* number of ucast ACKS received (good FCS) */ - uint32_t rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ - uint32_t rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ - uint32_t rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ - uint32_t rxrtsocast; /* number of received RTS not addressed to the MAC */ - uint32_t rxctsocast; /* number of received CTS not addressed to the MAC */ - uint32_t rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ - uint32_t rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ - uint32_t rxcfrmmcast; /* number of RX Control multicast frames received by the MAC - * (unlikely to see these) - */ - uint32_t rxbeaconmbss; /* beacons received from member of BSS */ - uint32_t rxdfrmucastobss; /* number of unicast frames addressed to the MAC from - * other BSS (WDS FRAME) - */ - uint32_t rxbeaconobss; /* beacons received from other BSS */ - uint32_t rxrsptmout; /* Number of response timeouts for transmitted frames - * expecting a response - */ - uint32_t bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ - uint32_t rxf0ovfl; /* Number of receive fifo 0 overflows */ - uint32_t rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ - uint32_t rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ - uint32_t txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ - uint32_t pmqovfl; /* Number of PMQ overflows */ - uint32_t rxcgprqfrm; /* Number of received Probe requests that made it into - * the PRQ fifo - */ - uint32_t rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ - uint32_t txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did - * not get ACK - */ - uint32_t txcgprssuc; /* Tx Probe Response Success (ACK was received) */ - uint32_t prs_timeout; /* Number of probe requests that were dropped from the PRQ - * fifo because a probe response could not be sent out within - * the time limit defined in M_PRS_MAXTIME - */ - uint32_t rxnack; /* obsolete */ - uint32_t frmscons; /* obsolete */ - uint32_t txnack; /* obsolete */ - uint32_t rxback; /* blockack rxcnt */ - uint32_t txback; /* blockack txcnt */ + /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ + uint32_t txfrag; /* dot11TransmittedFragmentCount */ + uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */ + uint32_t txfail; /* dot11FailedCount */ + uint32_t txretry; /* dot11RetryCount */ + uint32_t txretrie; /* dot11MultipleRetryCount */ + uint32_t rxdup; /* dot11FrameduplicateCount */ + uint32_t txrts; /* dot11RTSSuccessCount */ + uint32_t txnocts; /* dot11RTSFailureCount */ + uint32_t txnoack; /* dot11ACKFailureCount */ + uint32_t rxfrag; /* dot11ReceivedFragmentCount */ + uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */ + uint32_t rxcrc; /* dot11FCSErrorCount */ + uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ + uint32_t rxundec; /* dot11WEPUndecryptableCount */ - /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ - uint32_t txfrag; /* dot11TransmittedFragmentCount */ - uint32_t txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32_t txfail; /* dot11FailedCount */ - uint32_t txretry; /* dot11RetryCount */ - uint32_t txretrie; /* dot11MultipleRetryCount */ - uint32_t rxdup; /* dot11FrameduplicateCount */ - uint32_t txrts; /* dot11RTSSuccessCount */ - uint32_t txnocts; /* dot11RTSFailureCount */ - uint32_t txnoack; /* dot11ACKFailureCount */ - uint32_t rxfrag; /* dot11ReceivedFragmentCount */ - uint32_t rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32_t rxcrc; /* dot11FCSErrorCount */ - uint32_t txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ - uint32_t rxundec; /* dot11WEPUndecryptableCount */ + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32_t tkipmicfaill; /* TKIPLocalMICFailures */ + uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ + uint32_t tkipreplay; /* TKIPReplays */ + uint32_t ccmpfmterr; /* CCMPFormatErrors */ + uint32_t ccmpreplay; /* CCMPReplays */ + uint32_t ccmpundec; /* CCMPDecryptErrors */ + uint32_t fourwayfail; /* FourWayHandshakeFailures */ + uint32_t wepundec; /* dot11WEPUndecryptableCount */ + uint32_t wepicverr; /* dot11WEPICVErrorCount */ + uint32_t decsuccess; /* DecryptSuccessCount */ + uint32_t tkipicverr; /* TKIPICVErrorCount */ + uint32_t wepexcluded; /* dot11WEPExcludedCount */ - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32_t tkipmicfaill; /* TKIPLocalMICFailures */ - uint32_t tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ - uint32_t tkipreplay; /* TKIPReplays */ - uint32_t ccmpfmterr; /* CCMPFormatErrors */ - uint32_t ccmpreplay; /* CCMPReplays */ - uint32_t ccmpundec; /* CCMPDecryptErrors */ - uint32_t fourwayfail; /* FourWayHandshakeFailures */ - uint32_t wepundec; /* dot11WEPUndecryptableCount */ - uint32_t wepicverr; /* dot11WEPICVErrorCount */ - uint32_t decsuccess; /* DecryptSuccessCount */ - uint32_t tkipicverr; /* TKIPICVErrorCount */ - uint32_t wepexcluded; /* dot11WEPExcludedCount */ + uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */ + uint32_t psmwds; /* Count PSM watchdogs */ + uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ - uint32_t txchanrej; /* Tx frames suppressed due to channel rejection */ - uint32_t psmwds; /* Count PSM watchdogs */ - uint32_t phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ + /* MBSS counters, AP only */ + uint32_t prq_entries_handled; /* PRQ entries read in */ + uint32_t prq_undirected_entries; /* which were bcast bss & ssid */ + uint32_t prq_bad_entries; /* which could not be translated to info */ + uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */ + uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */ + uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ + uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */ - /* MBSS counters, AP only */ - uint32_t prq_entries_handled; /* PRQ entries read in */ - uint32_t prq_undirected_entries; /* which were bcast bss & ssid */ - uint32_t prq_bad_entries; /* which could not be translated to info */ - uint32_t atim_suppress_count; /* TX suppressions on ATIM fifo */ - uint32_t bcn_template_not_ready; /* Template marked in use on send bcn ... */ - uint32_t bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ - uint32_t late_tbtt_dpc; /* TBTT DPC did not happen in time */ + /* per-rate receive stat counters */ + uint32_t rx1mbps; /* packets rx at 1Mbps */ + uint32_t rx2mbps; /* packets rx at 2Mbps */ + uint32_t rx5mbps5; /* packets rx at 5.5Mbps */ + uint32_t rx6mbps; /* packets rx at 6Mbps */ + uint32_t rx9mbps; /* packets rx at 9Mbps */ + uint32_t rx11mbps; /* packets rx at 11Mbps */ + uint32_t rx12mbps; /* packets rx at 12Mbps */ + uint32_t rx18mbps; /* packets rx at 18Mbps */ + uint32_t rx24mbps; /* packets rx at 24Mbps */ + uint32_t rx36mbps; /* packets rx at 36Mbps */ + uint32_t rx48mbps; /* packets rx at 48Mbps */ + uint32_t rx54mbps; /* packets rx at 54Mbps */ + uint32_t rx108mbps; /* packets rx at 108mbps */ + uint32_t rx162mbps; /* packets rx at 162mbps */ + uint32_t rx216mbps; /* packets rx at 216 mbps */ + uint32_t rx270mbps; /* packets rx at 270 mbps */ + uint32_t rx324mbps; /* packets rx at 324 mbps */ + uint32_t rx378mbps; /* packets rx at 378 mbps */ + uint32_t rx432mbps; /* packets rx at 432 mbps */ + uint32_t rx486mbps; /* packets rx at 486 mbps */ + uint32_t rx540mbps; /* packets rx at 540 mbps */ - /* per-rate receive stat counters */ - uint32_t rx1mbps; /* packets rx at 1Mbps */ - uint32_t rx2mbps; /* packets rx at 2Mbps */ - uint32_t rx5mbps5; /* packets rx at 5.5Mbps */ - uint32_t rx6mbps; /* packets rx at 6Mbps */ - uint32_t rx9mbps; /* packets rx at 9Mbps */ - uint32_t rx11mbps; /* packets rx at 11Mbps */ - uint32_t rx12mbps; /* packets rx at 12Mbps */ - uint32_t rx18mbps; /* packets rx at 18Mbps */ - uint32_t rx24mbps; /* packets rx at 24Mbps */ - uint32_t rx36mbps; /* packets rx at 36Mbps */ - uint32_t rx48mbps; /* packets rx at 48Mbps */ - uint32_t rx54mbps; /* packets rx at 54Mbps */ - uint32_t rx108mbps; /* packets rx at 108mbps */ - uint32_t rx162mbps; /* packets rx at 162mbps */ - uint32_t rx216mbps; /* packets rx at 216 mbps */ - uint32_t rx270mbps; /* packets rx at 270 mbps */ - uint32_t rx324mbps; /* packets rx at 324 mbps */ - uint32_t rx378mbps; /* packets rx at 378 mbps */ - uint32_t rx432mbps; /* packets rx at 432 mbps */ - uint32_t rx486mbps; /* packets rx at 486 mbps */ - uint32_t rx540mbps; /* packets rx at 540 mbps */ + /* pkteng rx frame stats */ + uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */ + uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */ - /* pkteng rx frame stats */ - uint32_t pktengrxducast; /* unicast frames rxed by the pkteng code */ - uint32_t pktengrxdmcast; /* multicast frames rxed by the pkteng code */ + uint32_t rfdisable; /* count of radio disables */ + uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */ + uint32_t bphy_badplcp; - uint32_t rfdisable; /* count of radio disables */ - uint32_t bphy_rxcrsglitch; /* PHY count of bphy glitches */ - uint32_t bphy_badplcp; + uint32_t txexptime; /* Tx frames suppressed due to timer expiration */ - uint32_t txexptime; /* Tx frames suppressed due to timer expiration */ + uint32_t txmpdu_sgi; /* count for sgi transmit */ + uint32_t rxmpdu_sgi; /* count for sgi received */ + uint32_t txmpdu_stbc; /* count for stbc transmit */ + uint32_t rxmpdu_stbc; /* count for stbc received */ - uint32_t txmpdu_sgi; /* count for sgi transmit */ - uint32_t rxmpdu_sgi; /* count for sgi received */ - uint32_t txmpdu_stbc; /* count for stbc transmit */ - uint32_t rxmpdu_stbc; /* count for stbc received */ + uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */ - uint32_t rxundec_mcst; /* dot11WEPUndecryptableCount */ + /* WPA2 counters (see rxundec for DecryptFailureCount) */ + uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */ + uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ + uint32_t tkipreplay_mcst; /* TKIPReplays */ + uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */ + uint32_t ccmpreplay_mcst; /* CCMPReplays */ + uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */ + uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */ + uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */ + uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */ + uint32_t decsuccess_mcst; /* DecryptSuccessCount */ + uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */ + uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */ - /* WPA2 counters (see rxundec for DecryptFailureCount) */ - uint32_t tkipmicfaill_mcst; /* TKIPLocalMICFailures */ - uint32_t tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ - uint32_t tkipreplay_mcst; /* TKIPReplays */ - uint32_t ccmpfmterr_mcst; /* CCMPFormatErrors */ - uint32_t ccmpreplay_mcst; /* CCMPReplays */ - uint32_t ccmpundec_mcst; /* CCMPDecryptErrors */ - uint32_t fourwayfail_mcst; /* FourWayHandshakeFailures */ - uint32_t wepundec_mcst; /* dot11WEPUndecryptableCount */ - uint32_t wepicverr_mcst; /* dot11WEPICVErrorCount */ - uint32_t decsuccess_mcst; /* DecryptSuccessCount */ - uint32_t tkipicverr_mcst; /* TKIPICVErrorCount */ - uint32_t wepexcluded_mcst; /* dot11WEPExcludedCount */ + uint32_t dma_hang; /* count for dma hang */ + uint32_t reinit; /* count for reinit */ - uint32_t dma_hang; /* count for dma hang */ - uint32_t reinit; /* count for reinit */ + uint32_t pstatxucast; /* count of ucast frames xmitted on all psta assoc */ + uint32_t pstatxnoassoc; /* count of txnoassoc frames xmitted on all psta assoc */ + uint32_t pstarxucast; /* count of ucast frames received on all psta assoc */ + uint32_t pstarxbcmc; /* count of bcmc frames received on all psta */ + uint32_t pstatxbcmc; /* count of bcmc frames transmitted on all psta */ - uint32_t pstatxucast; /* count of ucast frames xmitted on all psta assoc */ - uint32_t pstatxnoassoc; /* count of txnoassoc frames xmitted on all psta assoc */ - uint32_t pstarxucast; /* count of ucast frames received on all psta assoc */ - uint32_t pstarxbcmc; /* count of bcmc frames received on all psta */ - uint32_t pstatxbcmc; /* count of bcmc frames transmitted on all psta */ + uint32_t cso_passthrough; /* hw cso required but passthrough */ + uint32_t cso_normal; /* hw cso hdr for normal process */ + uint32_t chained; /* number of frames chained */ + uint32_t chainedsz1; /* number of chain size 1 frames */ + uint32_t unchained; /* number of frames not chained */ + uint32_t maxchainsz; /* max chain size so far */ + uint32_t currchainsz; /* current chain size */ - uint32_t cso_passthrough; /* hw cso required but passthrough */ - uint32_t cso_normal; /* hw cso hdr for normal process */ - uint32_t chained; /* number of frames chained */ - uint32_t chainedsz1; /* number of chain size 1 frames */ - uint32_t unchained; /* number of frames not chained */ - uint32_t maxchainsz; /* max chain size so far */ - uint32_t currchainsz; /* current chain size */ - - uint32_t rxdrop20s; /* drop secondary cnt */ + uint32_t rxdrop20s; /* drop secondary cnt */ } wl_cnt_ver_eight_t; typedef struct { - uint16_t version; - uint16_t length; - uint32_t rxampdu_sgi; - uint32_t rxampdu_stbc; - uint32_t rxmpdu_sgi; - uint32_t rxmpdu_stbc; - uint32_t rxmcs0_40M; - uint32_t rxmcs1_40M; - uint32_t rxmcs2_40M; - uint32_t rxmcs3_40M; - uint32_t rxmcs4_40M; - uint32_t rxmcs5_40M; - uint32_t rxmcs6_40M; - uint32_t rxmcs7_40M; - uint32_t rxmcs32_40M; - uint32_t txfrmsnt_20Mlo; - uint32_t txfrmsnt_20Mup; - uint32_t txfrmsnt_40M; - uint32_t rx_20ul; + uint16_t version; + uint16_t length; + uint32_t rxampdu_sgi; + uint32_t rxampdu_stbc; + uint32_t rxmpdu_sgi; + uint32_t rxmpdu_stbc; + uint32_t rxmcs0_40M; + uint32_t rxmcs1_40M; + uint32_t rxmcs2_40M; + uint32_t rxmcs3_40M; + uint32_t rxmcs4_40M; + uint32_t rxmcs5_40M; + uint32_t rxmcs6_40M; + uint32_t rxmcs7_40M; + uint32_t rxmcs32_40M; + uint32_t txfrmsnt_20Mlo; + uint32_t txfrmsnt_20Mup; + uint32_t txfrmsnt_40M; + uint32_t rx_20ul; } wl_cnt_ext_t; #define WL_RXDIV_STATS_T_VERSION 1 typedef struct { - uint16_t version; - uint16_t length; - uint32_t rxant[4]; + uint16_t version; + uint16_t length; + uint32_t rxant[4]; } wl_rxdiv_stats_t; #define WL_DELTA_STATS_T_VERSION 1 typedef struct { - uint16_t version; - uint16_t length; - uint32_t txframe; - uint32_t txbyte; - uint32_t txretrans; - uint32_t txfail; - uint32_t rxframe; - uint32_t rxbyte; - uint32_t rx1mbps; - uint32_t rx2mbps; - uint32_t rx5mbps5; - uint32_t rx6mbps; - uint32_t rx9mbps; - uint32_t rx11mbps; - uint32_t rx12mbps; - uint32_t rx18mbps; - uint32_t rx24mbps; - uint32_t rx36mbps; - uint32_t rx48mbps; - uint32_t rx54mbps; - uint32_t rx108mbps; - uint32_t rx162mbps; - uint32_t rx216mbps; - uint32_t rx270mbps; - uint32_t rx324mbps; - uint32_t rx378mbps; - uint32_t rx432mbps; - uint32_t rx486mbps; - uint32_t rx540mbps; + uint16_t version; + uint16_t length; + uint32_t txframe; + uint32_t txbyte; + uint32_t txretrans; + uint32_t txfail; + uint32_t rxframe; + uint32_t rxbyte; + uint32_t rx1mbps; + uint32_t rx2mbps; + uint32_t rx5mbps5; + uint32_t rx6mbps; + uint32_t rx9mbps; + uint32_t rx11mbps; + uint32_t rx12mbps; + uint32_t rx18mbps; + uint32_t rx24mbps; + uint32_t rx36mbps; + uint32_t rx48mbps; + uint32_t rx54mbps; + uint32_t rx108mbps; + uint32_t rx162mbps; + uint32_t rx216mbps; + uint32_t rx270mbps; + uint32_t rx324mbps; + uint32_t rx378mbps; + uint32_t rx432mbps; + uint32_t rx486mbps; + uint32_t rx540mbps; } wl_delta_stats_t; #define WL_WME_CNT_VERSION 1 typedef struct { - uint32_t packets; - uint32_t bytes; + uint32_t packets; + uint32_t bytes; } wl_traffic_stats_t; #define AC_COUNT 4 typedef struct { - uint16_t version; - uint16_t length; - wl_traffic_stats_t tx[AC_COUNT]; - wl_traffic_stats_t tx_failed[AC_COUNT]; - wl_traffic_stats_t rx[AC_COUNT]; - wl_traffic_stats_t rx_failed[AC_COUNT]; - wl_traffic_stats_t forward[AC_COUNT]; - wl_traffic_stats_t tx_expired[AC_COUNT]; + uint16_t version; + uint16_t length; + wl_traffic_stats_t tx[AC_COUNT]; + wl_traffic_stats_t tx_failed[AC_COUNT]; + wl_traffic_stats_t rx[AC_COUNT]; + wl_traffic_stats_t rx_failed[AC_COUNT]; + wl_traffic_stats_t forward[AC_COUNT]; + wl_traffic_stats_t tx_expired[AC_COUNT]; } wl_wme_cnt_t; -typedef struct wl_mkeep_alive_pkt { - uint16_t version; /* Version for mkeep_alive */ - uint16_t length; /* length of fixed parameters */ - uint32_t period_msec; /* repeat interval msecs */ - uint16_t len_bytes; /* packet length */ - uint8_t keep_alive_id; /* 0 - 3 for N = 4 */ - uint8_t data[1]; /* Packet data */ +typedef struct wl_mkeep_alive_pkt +{ + uint16_t version; /* Version for mkeep_alive */ + uint16_t length; /* length of fixed parameters */ + uint32_t period_msec; /* repeat interval msecs */ + uint16_t len_bytes; /* packet length */ + uint8_t keep_alive_id; /* 0 - 3 for N = 4 */ + uint8_t data[1]; /* Packet data */ } wl_mkeep_alive_pkt_t; #define WL_MKEEP_ALIVE_VERSION 1 @@ -2204,32 +2210,32 @@ typedef struct wl_mkeep_alive_pkt { struct ampdu_tid_control { - uint8_t tid; - uint8_t enable; + uint8_t tid; + uint8_t enable; }; struct wl_msglevel2 { - uint32_t low; - uint32_t high; + uint32_t low; + uint32_t high; }; struct ampdu_ea_tid { - struct ether_addr ea; - uint8_t tid; + struct ether_addr ea; + uint8_t tid; }; struct ampdu_retry_tid { - uint8_t tid; - uint8_t retry; + uint8_t tid; + uint8_t retry; }; struct ampdu_ba_sizes { - uint8_t ba_tx_wsize; - uint8_t ba_rx_wsize; + uint8_t ba_tx_wsize; + uint8_t ba_rx_wsize; }; #define DPT_DISCOVERY_MANUAL 0x01 @@ -2245,9 +2251,9 @@ struct ampdu_ba_sizes #define DPT_MANUAL_EP_DELETE 3 typedef struct dpt_iovar { - struct ether_addr ea; - uint8_t mode; - uint32_t pad; + struct ether_addr ea; + uint8_t mode; + uint32_t pad; } dpt_iovar_t; #define DPT_STATUS_ACTIVE 0x01 #define DPT_STATUS_AES 0x02 @@ -2255,64 +2261,64 @@ typedef struct dpt_iovar #define DPT_FNAME_LEN 48 typedef struct dpt_status { - uint8_t status; - uint8_t fnlen; - uint8_t name[DPT_FNAME_LEN]; - uint32_t rssi; - sta_info_t sta; + uint8_t status; + uint8_t fnlen; + uint8_t name[DPT_FNAME_LEN]; + uint32_t rssi; + sta_info_t sta; } dpt_status_t; typedef struct dpt_list { - uint32_t num; - dpt_status_t status[1]; + uint32_t num; + dpt_status_t status[1]; } dpt_list_t; typedef struct dpt_fname { - uint8_t len; - uint8_t name[DPT_FNAME_LEN]; + uint8_t len; + uint8_t name[DPT_FNAME_LEN]; } dpt_fname_t; #define BDD_FNAME_LEN 32 typedef struct bdd_fname { - uint8_t len; - uint8_t name[BDD_FNAME_LEN]; + uint8_t len; + uint8_t name[BDD_FNAME_LEN]; } bdd_fname_t; struct ts_list { - int32_t count; - struct tsinfo_arg tsinfo[1]; + int32_t count; + struct tsinfo_arg tsinfo[1]; }; typedef struct tspec_arg { - uint16_t version; - uint16_t length; - uint32_t flag; - struct tsinfo_arg tsinfo; - uint16_t nom_msdu_size; - uint16_t max_msdu_size; - uint32_t min_srv_interval; - uint32_t max_srv_interval; - uint32_t inactivity_interval; - uint32_t suspension_interval; - uint32_t srv_start_time; - uint32_t min_data_rate; - uint32_t mean_data_rate; - uint32_t peak_data_rate; - uint32_t max_burst_size; - uint32_t delay_bound; - uint32_t min_phy_rate; - uint16_t surplus_bw; - uint16_t medium_time; - uint8_t dialog_token; + uint16_t version; + uint16_t length; + uint32_t flag; + struct tsinfo_arg tsinfo; + uint16_t nom_msdu_size; + uint16_t max_msdu_size; + uint32_t min_srv_interval; + uint32_t max_srv_interval; + uint32_t inactivity_interval; + uint32_t suspension_interval; + uint32_t srv_start_time; + uint32_t min_data_rate; + uint32_t mean_data_rate; + uint32_t peak_data_rate; + uint32_t max_burst_size; + uint32_t delay_bound; + uint32_t min_phy_rate; + uint16_t surplus_bw; + uint16_t medium_time; + uint8_t dialog_token; } tspec_arg_t; typedef struct tspec_per_sta_arg { - struct ether_addr ea; - struct tspec_arg ts; + struct ether_addr ea; + struct tspec_arg ts; } tspec_per_sta_arg_t; typedef struct wme_max_bandwidth { - uint32_t ac[AC_COUNT]; + uint32_t ac[AC_COUNT]; } wme_max_bandwidth_t; #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t)) #define TSPEC_ARG_VERSION 2 @@ -2328,15 +2334,15 @@ typedef struct wme_max_bandwidth #define WL_LIFETIME_MAX 0xFFFF typedef struct wl_lifetime { - uint32_t ac; - uint32_t lifetime; + uint32_t ac; + uint32_t lifetime; } wl_lifetime_t; typedef struct wl_chan_switch { - uint8_t mode; - uint8_t count; - wl_chanspec_t chspec; - uint8_t reg; + uint8_t mode; + uint8_t count; + wl_chanspec_t chspec; + uint8_t reg; } wl_chan_switch_t; #define WLC_ROAM_TRIGGER_DEFAULT 0 @@ -2346,7 +2352,7 @@ typedef struct wl_chan_switch enum { - PFN_LIST_ORDER, PFN_RSSI + PFN_LIST_ORDER, PFN_RSSI }; #define SORT_CRITERIA_BIT 0 @@ -2363,21 +2369,21 @@ enum typedef struct wl_pfn_param { - int32_t version; - int32_t scan_freq; - int32_t lost_network_timeout; - int16_t flags; - int16_t rssi_margin; + int32_t version; + int32_t scan_freq; + int32_t lost_network_timeout; + int16_t flags; + int16_t rssi_margin; } wl_pfn_param_t; typedef struct wl_pfn { - wlc_ssid_t ssid; - int32_t bss_type; - int32_t infra; - int32_t auth; - uint32_t wpa_auth; - int32_t wsec; + wlc_ssid_t ssid; + int32_t bss_type; + int32_t infra; + int32_t auth; + uint32_t wpa_auth; + int32_t wsec; } wl_pfn_t; #define TOE_TX_CSUM_OL 0x00000001 @@ -2388,25 +2394,25 @@ typedef struct wl_pfn struct toe_ol_stats_t { - uint32_t tx_summed; - uint32_t tx_iph_fill; - uint32_t tx_tcp_fill; - uint32_t tx_udp_fill; - uint32_t tx_icmp_fill; - uint32_t rx_iph_good; - uint32_t rx_iph_bad; - uint32_t rx_tcp_good; - uint32_t rx_tcp_bad; - uint32_t rx_udp_good; - uint32_t rx_udp_bad; - uint32_t rx_icmp_good; - uint32_t rx_icmp_bad; - uint32_t tx_tcp_errinj; - uint32_t tx_udp_errinj; - uint32_t tx_icmp_errinj; - uint32_t rx_tcp_errinj; - uint32_t rx_udp_errinj; - uint32_t rx_icmp_errinj; + uint32_t tx_summed; + uint32_t tx_iph_fill; + uint32_t tx_tcp_fill; + uint32_t tx_udp_fill; + uint32_t tx_icmp_fill; + uint32_t rx_iph_good; + uint32_t rx_iph_bad; + uint32_t rx_tcp_good; + uint32_t rx_tcp_bad; + uint32_t rx_udp_good; + uint32_t rx_udp_bad; + uint32_t rx_icmp_good; + uint32_t rx_icmp_bad; + uint32_t tx_tcp_errinj; + uint32_t tx_udp_errinj; + uint32_t tx_icmp_errinj; + uint32_t rx_tcp_errinj; + uint32_t rx_udp_errinj; + uint32_t rx_icmp_errinj; }; #define ARP_OL_AGENT 0x00000001 @@ -2419,52 +2425,52 @@ struct toe_ol_stats_t struct arp_ol_stats_t { - uint32_t host_ip_entries; - uint32_t host_ip_overflow; - uint32_t arp_table_entries; - uint32_t arp_table_overflow; - uint32_t host_request; - uint32_t host_reply; - uint32_t host_service; - uint32_t peer_request; - uint32_t peer_request_drop; - uint32_t peer_reply; - uint32_t peer_reply_drop; - uint32_t peer_service; + uint32_t host_ip_entries; + uint32_t host_ip_overflow; + uint32_t arp_table_entries; + uint32_t arp_table_overflow; + uint32_t host_request; + uint32_t host_reply; + uint32_t host_service; + uint32_t peer_request; + uint32_t peer_request_drop; + uint32_t peer_reply; + uint32_t peer_reply_drop; + uint32_t peer_service; }; typedef struct wl_keep_alive_pkt { - uint32_t period_msec; - uint16_t len_bytes; - uint8_t data[1]; + uint32_t period_msec; + uint16_t len_bytes; + uint8_t data[1]; } wl_keep_alive_pkt_t; #define WL_KEEP_ALIVE_FIXED_LEN offsetof(wl_keep_alive_pkt_t, data) typedef enum wl_pkt_filter_type { - WL_PKT_FILTER_TYPE_PATTERN_MATCH + WL_PKT_FILTER_TYPE_PATTERN_MATCH } wl_pkt_filter_type_t; #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t typedef struct wl_pkt_filter_pattern { - uint32_t offset; - uint32_t size_bytes; - uint8_t mask_and_pattern[1]; + uint32_t offset; + uint32_t size_bytes; + uint8_t mask_and_pattern[1]; } wl_pkt_filter_pattern_t; typedef struct wl_pkt_filter { - uint32_t id; - uint32_t type; - uint32_t negate_match; - union - { - wl_pkt_filter_pattern_t pattern; - } u; + uint32_t id; + uint32_t type; + uint32_t negate_match; + union + { + wl_pkt_filter_pattern_t pattern; + } u; } wl_pkt_filter_t; #define WL_PKT_FILTER_FIXED_LEN offsetof(wl_pkt_filter_t, u) @@ -2472,37 +2478,37 @@ typedef struct wl_pkt_filter typedef struct wl_pkt_filter_enable { - uint32_t id; - uint32_t enable; + uint32_t id; + uint32_t enable; } wl_pkt_filter_enable_t; typedef struct wl_pkt_filter_list { - uint32_t num; - wl_pkt_filter_t filter[1]; + uint32_t num; + wl_pkt_filter_t filter[1]; } wl_pkt_filter_list_t; #define WL_PKT_FILTER_LIST_FIXED_LEN offsetof(wl_pkt_filter_list_t, filter) typedef struct wl_pkt_filter_stats { - uint32_t num_pkts_matched; - uint32_t num_pkts_forwarded; - uint32_t num_pkts_discarded; + uint32_t num_pkts_matched; + uint32_t num_pkts_forwarded; + uint32_t num_pkts_discarded; } wl_pkt_filter_stats_t; typedef struct wl_seq_cmd_ioctl { - uint32_t cmd; - uint32_t len; + uint32_t cmd; + uint32_t len; } wl_seq_cmd_ioctl_t; #define WL_SEQ_CMD_ALIGN_BYTES 4 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \ - (((cmd) == WLC_GET_MAGIC) || \ - ((cmd) == WLC_GET_VERSION) || \ - ((cmd) == WLC_GET_AP) || \ - ((cmd) == WLC_GET_INSTANCE)) + (((cmd) == WLC_GET_MAGIC) || \ + ((cmd) == WLC_GET_VERSION) || \ + ((cmd) == WLC_GET_AP) || \ + ((cmd) == WLC_GET_INSTANCE)) #define WL_PKTENG_PER_TX_START 0x01 #define WL_PKTENG_PER_TX_STOP 0x02 #define WL_PKTENG_PER_RX_START 0x04 @@ -2514,13 +2520,13 @@ typedef struct wl_seq_cmd_ioctl typedef struct wl_pkteng { - uint32_t flags; - uint32_t delay; - uint32_t nframes; - uint32_t length; - uint8_t seqno; - struct ether_addr dest; - struct ether_addr src; + uint32_t flags; + uint32_t delay; + uint32_t nframes; + uint32_t length; + uint8_t seqno; + struct ether_addr dest; + struct ether_addr src; } wl_pkteng_t; #define NUM_80211b_RATES 4 @@ -2530,10 +2536,10 @@ typedef struct wl_pkteng typedef struct wl_pkteng_stats { - uint32_t lostfrmcnt; - int32_t rssi; - int32_t snr; - uint16_t rxpktcnt[NUM_80211_RATES + 1]; + uint32_t lostfrmcnt; + int32_t rssi; + int32_t snr; + uint16_t rxpktcnt[NUM_80211_RATES + 1]; } wl_pkteng_stats_t; #define WL_WOWL_MAGIC (1 << 0) @@ -2547,29 +2553,29 @@ typedef struct wl_pkteng_stats typedef struct { - uint32_t masksize; - uint32_t offset; - uint32_t patternoffset; - uint32_t patternsize; + uint32_t masksize; + uint32_t offset; + uint32_t patternoffset; + uint32_t patternsize; } wl_wowl_pattern_t; typedef struct { - uint32_t count; - wl_wowl_pattern_t pattern[1]; + uint32_t count; + wl_wowl_pattern_t pattern[1]; } wl_wowl_pattern_list_t; typedef struct { - uint8_t pci_wakeind; - uint16_t ucode_wakeind; + uint8_t pci_wakeind; + uint16_t ucode_wakeind; } wl_wowl_wakeind_t; typedef struct wl_txrate_class { - uint8_t init_rate; - uint8_t min_rate; - uint8_t max_rate; + uint8_t init_rate; + uint8_t min_rate; + uint8_t max_rate; } wl_txrate_class_t; #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 100 @@ -2596,13 +2602,13 @@ typedef struct wl_txrate_class typedef struct wl_obss_scan_arg { - int16_t passive_dwell; - int16_t active_dwell; - int16_t bss_widthscan_interval; - int16_t passive_total; - int16_t active_total; - int16_t chanwidth_transition_delay; - int16_t activity_threshold; + int16_t passive_dwell; + int16_t active_dwell; + int16_t bss_widthscan_interval; + int16_t passive_total; + int16_t active_total; + int16_t chanwidth_transition_delay; + int16_t activity_threshold; } wl_obss_scan_arg_t; #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t) @@ -2614,18 +2620,18 @@ typedef struct wl_obss_scan_arg typedef struct wl_action_obss_coex_req { - uint8_t info; - uint8_t num; - uint8_t ch_list[1]; + uint8_t info; + uint8_t num; + uint8_t ch_list[1]; } wl_action_obss_coex_req_t; #define MAX_RSSI_LEVELS 8 typedef struct wl_rssi_event { - uint32_t rate_limit_msec; - uint8_t num_rssi_levels; - int8_t rssi_levels[MAX_RSSI_LEVELS]; + uint32_t rate_limit_msec; + uint8_t num_rssi_levels; + int8_t rssi_levels[MAX_RSSI_LEVELS]; } wl_rssi_event_t; #define WLFEATURE_DISABLE_11N 0x00000001 @@ -2641,20 +2647,20 @@ typedef struct wl_rssi_event typedef struct sta_prbreq_wps_ie_hdr { - struct ether_addr staAddr; - uint16_t ieLen; + struct ether_addr staAddr; + uint16_t ieLen; } sta_prbreq_wps_ie_hdr_t; typedef struct sta_prbreq_wps_ie_data { - sta_prbreq_wps_ie_hdr_t hdr; - uint8_t ieData[1]; + sta_prbreq_wps_ie_hdr_t hdr; + uint8_t ieData[1]; } sta_prbreq_wps_ie_data_t; typedef struct sta_prbreq_wps_ie_list { - uint32_t totLen; - uint8_t ieDataList[1]; + uint32_t totLen; + uint8_t ieDataList[1]; } sta_prbreq_wps_ie_list_t; /* EDCF related items from 802.11.h */ @@ -2681,10 +2687,11 @@ typedef struct sta_prbreq_wps_ie_list #define EDCF_TXOP_MAX 65535 /* TXOP maximum value */ #define EDCF_TXOP2USEC(txop) ((txop) << 5) -struct edcf_acparam { - uint8_t ACI; - uint8_t ECW; - uint16_t TXOP; /* stored in network order (ls octet first) */ +struct edcf_acparam +{ + uint8_t ACI; + uint8_t ECW; + uint16_t TXOP; /* stored in network order (ls octet first) */ } ; typedef struct edcf_acparam edcf_acparam_t; @@ -2696,139 +2703,139 @@ typedef struct edcf_acparam edcf_acparam_t; */ typedef enum { - WLC_E_NONE = -1, - WLC_E_SET_SSID = 0 /** indicates status of set SSID */, - WLC_E_JOIN = 1, /** differentiates join IBSS from found (WLC_E_START) IBSS */ - WLC_E_START = 2, /** STA founded an IBSS or AP started a BSS */ - WLC_E_AUTH = 3, /** 802.11 AUTH request */ - WLC_E_AUTH_IND = 4, /** 802.11 AUTH indication */ - WLC_E_DEAUTH = 5, /** 802.11 DEAUTH request */ - WLC_E_DEAUTH_IND = 6, /** 802.11 DEAUTH indication */ - WLC_E_ASSOC = 7, /** 802.11 ASSOC request */ - WLC_E_ASSOC_IND = 8, /** 802.11 ASSOC indication */ - WLC_E_REASSOC = 9, /** 802.11 REASSOC request */ - WLC_E_REASSOC_IND = 10, /** 802.11 REASSOC indication */ - WLC_E_DISASSOC = 11, /** 802.11 DISASSOC request */ - WLC_E_DISASSOC_IND = 12, /** 802.11 DISASSOC indication */ - WLC_E_QUIET_START = 13, /** 802.11h Quiet period started */ - WLC_E_QUIET_END = 14, /** 802.11h Quiet period ended */ - WLC_E_BEACON_RX = 15, /** BEACONS received/lost indication */ - WLC_E_LINK = 16, /** generic link indication */ - WLC_E_MIC_ERROR = 17, /** TKIP MIC error occurred */ - WLC_E_NDIS_LINK = 18, /** NDIS style link indication */ - WLC_E_ROAM = 19, /** roam attempt occurred: indicate status & reason */ - WLC_E_TXFAIL = 20, /** change in dot11FailedCount (txfail) */ - WLC_E_PMKID_CACHE = 21, /** WPA2 pmkid cache indication */ - WLC_E_RETROGRADE_TSF = 22, /** current AP's TSF value went backward */ - WLC_E_PRUNE = 23, /** AP was pruned from join list for reason */ - WLC_E_AUTOAUTH = 24, /** report AutoAuth table entry match for join attempt */ - WLC_E_EAPOL_MSG = 25, /** Event encapsulating an EAPOL message */ - WLC_E_SCAN_COMPLETE = 26, /** Scan results are ready or scan was aborted */ - WLC_E_ADDTS_IND = 27, /** indicate to host addts fail/success */ - WLC_E_DELTS_IND = 28, /** indicate to host delts fail/success */ - WLC_E_BCNSENT_IND = 29, /** indicate to host of beacon transmit */ - WLC_E_BCNRX_MSG = 30, /** Send the received beacon up to the host */ - WLC_E_BCNLOST_MSG = 31, /** indicate to host loss of beacon */ - WLC_E_ROAM_PREP = 32, /** before attempting to roam */ - WLC_E_PFN_NET_FOUND = 33, /** PFN network found event */ - WLC_E_PFN_NET_LOST = 34, /** PFN network lost event */ - WLC_E_RESET_COMPLETE = 35, - WLC_E_JOIN_START = 36, - WLC_E_ROAM_START = 37, - WLC_E_ASSOC_START = 38, - WLC_E_IBSS_ASSOC = 39, - WLC_E_RADIO = 40, - WLC_E_PSM_WATCHDOG = 41, /** PSM microcode watchdog fired */ - WLC_E_CCX_ASSOC_START = 42, /** CCX association start */ - WLC_E_CCX_ASSOC_ABORT = 43, /** CCX association abort */ - WLC_E_PROBREQ_MSG = 44, /** probe request received */ - WLC_E_SCAN_CONFIRM_IND = 45, - WLC_E_PSK_SUP = 46, /** WPA Handshake */ - WLC_E_COUNTRY_CODE_CHANGED = 47, - WLC_E_EXCEEDED_MEDIUM_TIME = 48, /** WMMAC excedded medium time */ - WLC_E_ICV_ERROR = 49, /** WEP ICV error occurred */ - WLC_E_UNICAST_DECODE_ERROR = 50, /** Unsupported unicast encrypted frame */ - WLC_E_MULTICAST_DECODE_ERROR = 51, /** Unsupported multicast encrypted frame */ - WLC_E_TRACE = 52, - WLC_E_BTA_HCI_EVENT = 53, /** BT-AMP HCI event */ - WLC_E_IF = 54, /** I/F change (for wlan host notification) */ - WLC_E_P2P_DISC_LISTEN_COMPLETE = 55, /** P2P Discovery listen state expires */ - WLC_E_RSSI = 56, /** indicate RSSI change based on configured levels */ - WLC_E_PFN_SCAN_COMPLETE = 57, /** PFN completed scan of network list */ - WLC_E_EXTLOG_MSG = 58, - WLC_E_ACTION_FRAME = 59, /** Action frame reception */ - WLC_E_ACTION_FRAME_COMPLETE = 60, /** Action frame Tx complete */ - WLC_E_PRE_ASSOC_IND = 61, /** assoc request received */ - WLC_E_PRE_REASSOC_IND = 62, /** re-assoc request received */ - WLC_E_CHANNEL_ADOPTED = 63, /** channel adopted (xxx: obsoleted) */ - WLC_E_AP_STARTED = 64, /** AP started */ - WLC_E_DFS_AP_STOP = 65, /** AP stopped due to DFS */ - WLC_E_DFS_AP_RESUME = 66, /** AP resumed due to DFS */ - WLC_E_WAI_STA_EVENT = 67, /** WAI stations event */ - WLC_E_WAI_MSG = 68, /** event encapsulating an WAI message */ - WLC_E_ESCAN_RESULT = 69, /** escan result event */ - WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE = 70, /** action frame off channel complete */ /* NOTE - This used to be WLC_E_WAKE_EVENT */ - WLC_E_PROBRESP_MSG = 71, /** probe response received */ - WLC_E_P2P_PROBREQ_MSG = 72, /** P2P Probe request received */ - WLC_E_DCS_REQUEST = 73, - WLC_E_FIFO_CREDIT_MAP = 74, /** credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */ - WLC_E_ACTION_FRAME_RX = 75, /** Received action frame event WITH wl_event_rx_frame_data_t header */ - WLC_E_WAKE_EVENT = 76, /** Wake Event timer fired, used for wake WLAN test mode */ - WLC_E_RM_COMPLETE = 77, /** Radio measurement complete */ - WLC_E_HTSFSYNC = 78, /** Synchronize TSF with the host */ - WLC_E_OVERLAY_REQ = 79, /** request an overlay IOCTL/iovar from the host */ - WLC_E_CSA_COMPLETE_IND = 80, - WLC_E_EXCESS_PM_WAKE_EVENT = 81, /** excess PM Wake Event to inform host */ - WLC_E_PFN_SCAN_NONE = 82, /** no PFN networks around */ - WLC_E_PFN_SCAN_ALLGONE = 83, /** last found PFN network gets lost */ - WLC_E_GTK_PLUMBED = 84, - WLC_E_ASSOC_IND_NDIS = 85, /** 802.11 ASSOC indication for NDIS only */ - WLC_E_REASSOC_IND_NDIS = 86, /** 802.11 REASSOC indication for NDIS only */ - WLC_E_ASSOC_REQ_IE = 87, - WLC_E_ASSOC_RESP_IE = 88, - WLC_E_ASSOC_RECREATED = 89, /** association recreated on resume */ - WLC_E_ACTION_FRAME_RX_NDIS = 90, /** rx action frame event for NDIS only */ - WLC_E_AUTH_REQ = 91, /** authentication request received */ - WLC_E_TDLS_PEER_EVENT = 92, /** discovered peer, connected/disconnected peer */ - WLC_E_SPEEDY_RECREATE_FAIL = 93, /** fast assoc recreation failed */ - WLC_E_NATIVE = 94, /** port-specific event and payload (e.g. NDIS) */ - WLC_E_PKTDELAY_IND = 95, /** event for tx pkt delay suddently jump */ - WLC_E_AWDL_AW = 96, /** AWDL AW period starts */ - WLC_E_AWDL_ROLE = 97, /** AWDL Master/Slave/NE master role event */ - WLC_E_AWDL_EVENT = 98, /** Generic AWDL event */ - WLC_E_NIC_AF_TXS = 99, /** NIC AF txstatus */ - WLC_E_NIC_NIC_REPORT = 100, /** NIC period report */ - WLC_E_BEACON_FRAME_RX = 101, - WLC_E_SERVICE_FOUND = 102, /** desired service found */ - WLC_E_GAS_FRAGMENT_RX = 103, /** GAS fragment received */ - WLC_E_GAS_COMPLETE = 104, /** GAS sessions all complete */ - WLC_E_P2PO_ADD_DEVICE = 105, /** New device found by p2p offload */ - WLC_E_P2PO_DEL_DEVICE = 106, /** device has been removed by p2p offload */ - WLC_E_WNM_STA_SLEEP = 107, /** WNM event to notify STA enter sleep mode */ - WLC_E_TXFAIL_THRESH = 108, /** Indication of MAC tx failures (exhaustion of 802.11 retries) exceeding threshold(s) */ - WLC_E_PROXD = 109, /** Proximity Detection event */ - WLC_E_IBSS_COALESCE = 110, /** IBSS Coalescing */ - WLC_E_AWDL_RX_PRB_RESP = 111, /** AWDL RX Probe response */ - WLC_E_AWDL_RX_ACT_FRAME = 112, /** AWDL RX Action Frames */ - WLC_E_AWDL_WOWL_NULLPKT = 113, /** AWDL Wowl nulls */ - WLC_E_AWDL_PHYCAL_STATUS = 114, /** AWDL Phycal status */ - WLC_E_AWDL_OOB_AF_STATUS = 115, /** AWDL OOB AF status */ - WLC_E_AWDL_SCAN_STATUS = 116, /** Interleaved Scan status */ - WLC_E_AWDL_AW_START = 117, /** AWDL AW Start */ - WLC_E_AWDL_AW_END = 118, /** AWDL AW End */ - WLC_E_AWDL_AW_EXT = 119, /** AWDL AW Extensions */ - WLC_E_AWDL_PEER_CACHE_CONTROL = 120, - WLC_E_CSA_START_IND = 121, - WLC_E_CSA_DONE_IND = 122, - WLC_E_CSA_FAILURE_IND = 123, - WLC_E_CCA_CHAN_QUAL = 124, /** CCA based channel quality report */ - WLC_E_BSSID = 125, /** to report change in BSSID while roaming */ - WLC_E_TX_STAT_ERROR = 126, /** tx error indication */ - WLC_E_BCMC_CREDIT_SUPPORT = 127, /** credit check for BCMC supported */ - WLC_E_PSTA_PRIMARY_INTF_IND = 128, /** psta primary interface indication */ - WLC_E_LAST = 129, /** highest val + 1 for range checking */ + WLC_E_NONE = -1, + WLC_E_SET_SSID = 0 /** indicates status of set SSID */, + WLC_E_JOIN = 1, /** differentiates join IBSS from found (WLC_E_START) IBSS */ + WLC_E_START = 2, /** STA founded an IBSS or AP started a BSS */ + WLC_E_AUTH = 3, /** 802.11 AUTH request */ + WLC_E_AUTH_IND = 4, /** 802.11 AUTH indication */ + WLC_E_DEAUTH = 5, /** 802.11 DEAUTH request */ + WLC_E_DEAUTH_IND = 6, /** 802.11 DEAUTH indication */ + WLC_E_ASSOC = 7, /** 802.11 ASSOC request */ + WLC_E_ASSOC_IND = 8, /** 802.11 ASSOC indication */ + WLC_E_REASSOC = 9, /** 802.11 REASSOC request */ + WLC_E_REASSOC_IND = 10, /** 802.11 REASSOC indication */ + WLC_E_DISASSOC = 11, /** 802.11 DISASSOC request */ + WLC_E_DISASSOC_IND = 12, /** 802.11 DISASSOC indication */ + WLC_E_QUIET_START = 13, /** 802.11h Quiet period started */ + WLC_E_QUIET_END = 14, /** 802.11h Quiet period ended */ + WLC_E_BEACON_RX = 15, /** BEACONS received/lost indication */ + WLC_E_LINK = 16, /** generic link indication */ + WLC_E_MIC_ERROR = 17, /** TKIP MIC error occurred */ + WLC_E_NDIS_LINK = 18, /** NDIS style link indication */ + WLC_E_ROAM = 19, /** roam attempt occurred: indicate status & reason */ + WLC_E_TXFAIL = 20, /** change in dot11FailedCount (txfail) */ + WLC_E_PMKID_CACHE = 21, /** WPA2 pmkid cache indication */ + WLC_E_RETROGRADE_TSF = 22, /** current AP's TSF value went backward */ + WLC_E_PRUNE = 23, /** AP was pruned from join list for reason */ + WLC_E_AUTOAUTH = 24, /** report AutoAuth table entry match for join attempt */ + WLC_E_EAPOL_MSG = 25, /** Event encapsulating an EAPOL message */ + WLC_E_SCAN_COMPLETE = 26, /** Scan results are ready or scan was aborted */ + WLC_E_ADDTS_IND = 27, /** indicate to host addts fail/success */ + WLC_E_DELTS_IND = 28, /** indicate to host delts fail/success */ + WLC_E_BCNSENT_IND = 29, /** indicate to host of beacon transmit */ + WLC_E_BCNRX_MSG = 30, /** Send the received beacon up to the host */ + WLC_E_BCNLOST_MSG = 31, /** indicate to host loss of beacon */ + WLC_E_ROAM_PREP = 32, /** before attempting to roam */ + WLC_E_PFN_NET_FOUND = 33, /** PFN network found event */ + WLC_E_PFN_NET_LOST = 34, /** PFN network lost event */ + WLC_E_RESET_COMPLETE = 35, + WLC_E_JOIN_START = 36, + WLC_E_ROAM_START = 37, + WLC_E_ASSOC_START = 38, + WLC_E_IBSS_ASSOC = 39, + WLC_E_RADIO = 40, + WLC_E_PSM_WATCHDOG = 41, /** PSM microcode watchdog fired */ + WLC_E_CCX_ASSOC_START = 42, /** CCX association start */ + WLC_E_CCX_ASSOC_ABORT = 43, /** CCX association abort */ + WLC_E_PROBREQ_MSG = 44, /** probe request received */ + WLC_E_SCAN_CONFIRM_IND = 45, + WLC_E_PSK_SUP = 46, /** WPA Handshake */ + WLC_E_COUNTRY_CODE_CHANGED = 47, + WLC_E_EXCEEDED_MEDIUM_TIME = 48, /** WMMAC excedded medium time */ + WLC_E_ICV_ERROR = 49, /** WEP ICV error occurred */ + WLC_E_UNICAST_DECODE_ERROR = 50, /** Unsupported unicast encrypted frame */ + WLC_E_MULTICAST_DECODE_ERROR = 51, /** Unsupported multicast encrypted frame */ + WLC_E_TRACE = 52, + WLC_E_BTA_HCI_EVENT = 53, /** BT-AMP HCI event */ + WLC_E_IF = 54, /** I/F change (for wlan host notification) */ + WLC_E_P2P_DISC_LISTEN_COMPLETE = 55, /** P2P Discovery listen state expires */ + WLC_E_RSSI = 56, /** indicate RSSI change based on configured levels */ + WLC_E_PFN_SCAN_COMPLETE = 57, /** PFN completed scan of network list */ + WLC_E_EXTLOG_MSG = 58, + WLC_E_ACTION_FRAME = 59, /** Action frame reception */ + WLC_E_ACTION_FRAME_COMPLETE = 60, /** Action frame Tx complete */ + WLC_E_PRE_ASSOC_IND = 61, /** assoc request received */ + WLC_E_PRE_REASSOC_IND = 62, /** re-assoc request received */ + WLC_E_CHANNEL_ADOPTED = 63, /** channel adopted (xxx: obsoleted) */ + WLC_E_AP_STARTED = 64, /** AP started */ + WLC_E_DFS_AP_STOP = 65, /** AP stopped due to DFS */ + WLC_E_DFS_AP_RESUME = 66, /** AP resumed due to DFS */ + WLC_E_WAI_STA_EVENT = 67, /** WAI stations event */ + WLC_E_WAI_MSG = 68, /** event encapsulating an WAI message */ + WLC_E_ESCAN_RESULT = 69, /** escan result event */ + WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE = 70, /** action frame off channel complete */ /* NOTE - This used to be WLC_E_WAKE_EVENT */ + WLC_E_PROBRESP_MSG = 71, /** probe response received */ + WLC_E_P2P_PROBREQ_MSG = 72, /** P2P Probe request received */ + WLC_E_DCS_REQUEST = 73, + WLC_E_FIFO_CREDIT_MAP = 74, /** credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */ + WLC_E_ACTION_FRAME_RX = 75, /** Received action frame event WITH wl_event_rx_frame_data_t header */ + WLC_E_WAKE_EVENT = 76, /** Wake Event timer fired, used for wake WLAN test mode */ + WLC_E_RM_COMPLETE = 77, /** Radio measurement complete */ + WLC_E_HTSFSYNC = 78, /** Synchronize TSF with the host */ + WLC_E_OVERLAY_REQ = 79, /** request an overlay IOCTL/iovar from the host */ + WLC_E_CSA_COMPLETE_IND = 80, + WLC_E_EXCESS_PM_WAKE_EVENT = 81, /** excess PM Wake Event to inform host */ + WLC_E_PFN_SCAN_NONE = 82, /** no PFN networks around */ + WLC_E_PFN_SCAN_ALLGONE = 83, /** last found PFN network gets lost */ + WLC_E_GTK_PLUMBED = 84, + WLC_E_ASSOC_IND_NDIS = 85, /** 802.11 ASSOC indication for NDIS only */ + WLC_E_REASSOC_IND_NDIS = 86, /** 802.11 REASSOC indication for NDIS only */ + WLC_E_ASSOC_REQ_IE = 87, + WLC_E_ASSOC_RESP_IE = 88, + WLC_E_ASSOC_RECREATED = 89, /** association recreated on resume */ + WLC_E_ACTION_FRAME_RX_NDIS = 90, /** rx action frame event for NDIS only */ + WLC_E_AUTH_REQ = 91, /** authentication request received */ + WLC_E_TDLS_PEER_EVENT = 92, /** discovered peer, connected/disconnected peer */ + WLC_E_SPEEDY_RECREATE_FAIL = 93, /** fast assoc recreation failed */ + WLC_E_NATIVE = 94, /** port-specific event and payload (e.g. NDIS) */ + WLC_E_PKTDELAY_IND = 95, /** event for tx pkt delay suddently jump */ + WLC_E_AWDL_AW = 96, /** AWDL AW period starts */ + WLC_E_AWDL_ROLE = 97, /** AWDL Master/Slave/NE master role event */ + WLC_E_AWDL_EVENT = 98, /** Generic AWDL event */ + WLC_E_NIC_AF_TXS = 99, /** NIC AF txstatus */ + WLC_E_NIC_NIC_REPORT = 100, /** NIC period report */ + WLC_E_BEACON_FRAME_RX = 101, + WLC_E_SERVICE_FOUND = 102, /** desired service found */ + WLC_E_GAS_FRAGMENT_RX = 103, /** GAS fragment received */ + WLC_E_GAS_COMPLETE = 104, /** GAS sessions all complete */ + WLC_E_P2PO_ADD_DEVICE = 105, /** New device found by p2p offload */ + WLC_E_P2PO_DEL_DEVICE = 106, /** device has been removed by p2p offload */ + WLC_E_WNM_STA_SLEEP = 107, /** WNM event to notify STA enter sleep mode */ + WLC_E_TXFAIL_THRESH = 108, /** Indication of MAC tx failures (exhaustion of 802.11 retries) exceeding threshold(s) */ + WLC_E_PROXD = 109, /** Proximity Detection event */ + WLC_E_IBSS_COALESCE = 110, /** IBSS Coalescing */ + WLC_E_AWDL_RX_PRB_RESP = 111, /** AWDL RX Probe response */ + WLC_E_AWDL_RX_ACT_FRAME = 112, /** AWDL RX Action Frames */ + WLC_E_AWDL_WOWL_NULLPKT = 113, /** AWDL Wowl nulls */ + WLC_E_AWDL_PHYCAL_STATUS = 114, /** AWDL Phycal status */ + WLC_E_AWDL_OOB_AF_STATUS = 115, /** AWDL OOB AF status */ + WLC_E_AWDL_SCAN_STATUS = 116, /** Interleaved Scan status */ + WLC_E_AWDL_AW_START = 117, /** AWDL AW Start */ + WLC_E_AWDL_AW_END = 118, /** AWDL AW End */ + WLC_E_AWDL_AW_EXT = 119, /** AWDL AW Extensions */ + WLC_E_AWDL_PEER_CACHE_CONTROL = 120, + WLC_E_CSA_START_IND = 121, + WLC_E_CSA_DONE_IND = 122, + WLC_E_CSA_FAILURE_IND = 123, + WLC_E_CCA_CHAN_QUAL = 124, /** CCA based channel quality report */ + WLC_E_BSSID = 125, /** to report change in BSSID while roaming */ + WLC_E_TX_STAT_ERROR = 126, /** tx error indication */ + WLC_E_BCMC_CREDIT_SUPPORT = 127, /** credit check for BCMC supported */ + WLC_E_PSTA_PRIMARY_INTF_IND = 128, /** psta primary interface indication */ + WLC_E_LAST = 129, /** highest val + 1 for range checking */ - WLC_E_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */ + WLC_E_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */ } wl_event_num_t; #define BCMF_EVENT_COUNT WLC_E_LAST @@ -2843,68 +2850,68 @@ typedef enum */ typedef enum { - WLC_E_STATUS_SUCCESS = 0, /** operation was successful */ - WLC_E_STATUS_FAIL = 1, /** operation failed */ - WLC_E_STATUS_TIMEOUT = 2, /** operation timed out */ - WLC_E_STATUS_NO_NETWORKS = 3, /** failed due to no matching network found */ - WLC_E_STATUS_ABORT = 4, /** operation was aborted */ - WLC_E_STATUS_NO_ACK = 5, /** protocol failure: packet not ack'd */ - WLC_E_STATUS_UNSOLICITED = 6, /** AUTH or ASSOC packet was unsolicited */ - WLC_E_STATUS_ATTEMPT = 7, /** attempt to assoc to an auto auth configuration */ - WLC_E_STATUS_PARTIAL = 8, /** scan results are incomplete */ - WLC_E_STATUS_NEWSCAN = 9, /** scan aborted by another scan */ - WLC_E_STATUS_NEWASSOC = 10, /** scan aborted due to assoc in progress */ - WLC_E_STATUS_11HQUIET = 11, /** 802.11h quiet period started */ - WLC_E_STATUS_SUPPRESS = 12, /** user disabled scanning (WLC_SET_SCANSUPPRESS) */ - WLC_E_STATUS_NOCHANS = 13, /** no allowable channels to scan */ - WLC_E_STATUS_CCXFASTRM = 14, /** scan aborted due to CCX fast roam */ - WLC_E_STATUS_CS_ABORT = 15, /** abort channel select */ + WLC_E_STATUS_SUCCESS = 0, /** operation was successful */ + WLC_E_STATUS_FAIL = 1, /** operation failed */ + WLC_E_STATUS_TIMEOUT = 2, /** operation timed out */ + WLC_E_STATUS_NO_NETWORKS = 3, /** failed due to no matching network found */ + WLC_E_STATUS_ABORT = 4, /** operation was aborted */ + WLC_E_STATUS_NO_ACK = 5, /** protocol failure: packet not ack'd */ + WLC_E_STATUS_UNSOLICITED = 6, /** AUTH or ASSOC packet was unsolicited */ + WLC_E_STATUS_ATTEMPT = 7, /** attempt to assoc to an auto auth configuration */ + WLC_E_STATUS_PARTIAL = 8, /** scan results are incomplete */ + WLC_E_STATUS_NEWSCAN = 9, /** scan aborted by another scan */ + WLC_E_STATUS_NEWASSOC = 10, /** scan aborted due to assoc in progress */ + WLC_E_STATUS_11HQUIET = 11, /** 802.11h quiet period started */ + WLC_E_STATUS_SUPPRESS = 12, /** user disabled scanning (WLC_SET_SCANSUPPRESS) */ + WLC_E_STATUS_NOCHANS = 13, /** no allowable channels to scan */ + WLC_E_STATUS_CCXFASTRM = 14, /** scan aborted due to CCX fast roam */ + WLC_E_STATUS_CS_ABORT = 15, /** abort channel select */ - /* for WLC_SUP messages */ - WLC_SUP_DISCONNECTED = 0 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_CONNECTING = 1 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_IDREQUIRED = 2 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_AUTHENTICATING = 3 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_AUTHENTICATED = 4 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_KEYXCHANGE = 5 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_KEYED = 6 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_TIMEOUT = 7 + WLC_SUP_STATUS_OFFSET, - WLC_SUP_LAST_BASIC_STATE = 8 + WLC_SUP_STATUS_OFFSET, - /* Extended supplicant authentication states */ - WLC_SUP_KEYXCHANGE_WAIT_M1 = (int) WLC_SUP_AUTHENTICATED + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg M1 */ - WLC_SUP_KEYXCHANGE_PREP_M2 = (int) WLC_SUP_KEYXCHANGE + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg M2 */ - WLC_SUP_KEYXCHANGE_WAIT_M3 = (int) WLC_SUP_LAST_BASIC_STATE + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg M3 */ - WLC_SUP_KEYXCHANGE_PREP_M4 = 9 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg M4 */ - WLC_SUP_KEYXCHANGE_WAIT_G1 = 10 + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg G1 */ - WLC_SUP_KEYXCHANGE_PREP_G2 = 11 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg G2 */ + /* for WLC_SUP messages */ + WLC_SUP_DISCONNECTED = 0 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_CONNECTING = 1 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_IDREQUIRED = 2 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_AUTHENTICATING = 3 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_AUTHENTICATED = 4 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_KEYXCHANGE = 5 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_KEYED = 6 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_TIMEOUT = 7 + WLC_SUP_STATUS_OFFSET, + WLC_SUP_LAST_BASIC_STATE = 8 + WLC_SUP_STATUS_OFFSET, + /* Extended supplicant authentication states */ + WLC_SUP_KEYXCHANGE_WAIT_M1 = (int) WLC_SUP_AUTHENTICATED + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg M1 */ + WLC_SUP_KEYXCHANGE_PREP_M2 = (int) WLC_SUP_KEYXCHANGE + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg M2 */ + WLC_SUP_KEYXCHANGE_WAIT_M3 = (int) WLC_SUP_LAST_BASIC_STATE + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg M3 */ + WLC_SUP_KEYXCHANGE_PREP_M4 = 9 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg M4 */ + WLC_SUP_KEYXCHANGE_WAIT_G1 = 10 + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg G1 */ + WLC_SUP_KEYXCHANGE_PREP_G2 = 11 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg G2 */ - WLC_DOT11_SC_SUCCESS = 0 + WLC_DOT11_SC_STATUS_OFFSET, /* Successful */ - WLC_DOT11_SC_FAILURE = 1 + WLC_DOT11_SC_STATUS_OFFSET, /* Unspecified failure */ - WLC_DOT11_SC_CAP_MISMATCH = 10 + WLC_DOT11_SC_STATUS_OFFSET, /* Cannot support all requested capabilities in the Capability Information field */ - WLC_DOT11_SC_REASSOC_FAIL = 11 + WLC_DOT11_SC_STATUS_OFFSET, /* Reassociation denied due to inability to confirm that association exists */ - WLC_DOT11_SC_ASSOC_FAIL = 12 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to reason outside the scope of this standard */ - WLC_DOT11_SC_AUTH_MISMATCH = 13 + WLC_DOT11_SC_STATUS_OFFSET, /* Responding station does not support the specified authentication algorithm */ - WLC_DOT11_SC_AUTH_SEQ = 14 + WLC_DOT11_SC_STATUS_OFFSET, /* Received an Authentication frame with authentication transaction sequence number out of expected sequence */ - WLC_DOT11_SC_AUTH_CHALLENGE_FAIL = 15 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected because of challenge failure */ - WLC_DOT11_SC_AUTH_TIMEOUT = 16 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected due to timeout waiting for next frame in sequence */ - WLC_DOT11_SC_ASSOC_BUSY_FAIL = 17 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because AP is unable to handle additional associated stations */ - WLC_DOT11_SC_ASSOC_RATE_MISMATCH = 18 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter */ - WLC_DOT11_SC_ASSOC_SHORT_REQUIRED = 19 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Preamble option */ - WLC_DOT11_SC_ASSOC_PBCC_REQUIRED = 20 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the PBCC Modulation option */ - WLC_DOT11_SC_ASSOC_AGILITY_REQUIRED = 21 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Channel Agility option */ - WLC_DOT11_SC_ASSOC_SPECTRUM_REQUIRED = 22 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because Spectrum Management capability is required. */ - WLC_DOT11_SC_ASSOC_BAD_POWER_CAP = 23 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because the info in the Power Cap element is unacceptable. */ - WLC_DOT11_SC_ASSOC_BAD_SUP_CHANNELS = 24 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because the info in the Supported Channel element is unacceptable */ - WLC_DOT11_SC_ASSOC_SHORTSLOT_REQUIRED = 25 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Slot Time option */ - WLC_DOT11_SC_ASSOC_ERPBCC_REQUIRED = 26 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the ER-PBCC Modulation option */ - WLC_DOT11_SC_ASSOC_DSSOFDM_REQUIRED = 27 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the DSS-OFDM option */ - WLC_DOT11_SC_DECLINED = 37 + WLC_DOT11_SC_STATUS_OFFSET, /* request declined */ - WLC_DOT11_SC_INVALID_PARAMS = 38 + WLC_DOT11_SC_STATUS_OFFSET, /* One or more params have invalid values */ - WLC_DOT11_SC_INVALID_AKMP = 43 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid AKMP */ - WLC_DOT11_SC_INVALID_MDID = 54 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid MDID */ - WLC_DOT11_SC_INVALID_FTIE = 55 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid FTIE */ + WLC_DOT11_SC_SUCCESS = 0 + WLC_DOT11_SC_STATUS_OFFSET, /* Successful */ + WLC_DOT11_SC_FAILURE = 1 + WLC_DOT11_SC_STATUS_OFFSET, /* Unspecified failure */ + WLC_DOT11_SC_CAP_MISMATCH = 10 + WLC_DOT11_SC_STATUS_OFFSET, /* Cannot support all requested capabilities in the Capability Information field */ + WLC_DOT11_SC_REASSOC_FAIL = 11 + WLC_DOT11_SC_STATUS_OFFSET, /* Reassociation denied due to inability to confirm that association exists */ + WLC_DOT11_SC_ASSOC_FAIL = 12 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to reason outside the scope of this standard */ + WLC_DOT11_SC_AUTH_MISMATCH = 13 + WLC_DOT11_SC_STATUS_OFFSET, /* Responding station does not support the specified authentication algorithm */ + WLC_DOT11_SC_AUTH_SEQ = 14 + WLC_DOT11_SC_STATUS_OFFSET, /* Received an Authentication frame with authentication transaction sequence number out of expected sequence */ + WLC_DOT11_SC_AUTH_CHALLENGE_FAIL = 15 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected because of challenge failure */ + WLC_DOT11_SC_AUTH_TIMEOUT = 16 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected due to timeout waiting for next frame in sequence */ + WLC_DOT11_SC_ASSOC_BUSY_FAIL = 17 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because AP is unable to handle additional associated stations */ + WLC_DOT11_SC_ASSOC_RATE_MISMATCH = 18 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter */ + WLC_DOT11_SC_ASSOC_SHORT_REQUIRED = 19 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Preamble option */ + WLC_DOT11_SC_ASSOC_PBCC_REQUIRED = 20 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the PBCC Modulation option */ + WLC_DOT11_SC_ASSOC_AGILITY_REQUIRED = 21 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Channel Agility option */ + WLC_DOT11_SC_ASSOC_SPECTRUM_REQUIRED = 22 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because Spectrum Management capability is required. */ + WLC_DOT11_SC_ASSOC_BAD_POWER_CAP = 23 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because the info in the Power Cap element is unacceptable. */ + WLC_DOT11_SC_ASSOC_BAD_SUP_CHANNELS = 24 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because the info in the Supported Channel element is unacceptable */ + WLC_DOT11_SC_ASSOC_SHORTSLOT_REQUIRED = 25 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Slot Time option */ + WLC_DOT11_SC_ASSOC_ERPBCC_REQUIRED = 26 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the ER-PBCC Modulation option */ + WLC_DOT11_SC_ASSOC_DSSOFDM_REQUIRED = 27 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the DSS-OFDM option */ + WLC_DOT11_SC_DECLINED = 37 + WLC_DOT11_SC_STATUS_OFFSET, /* request declined */ + WLC_DOT11_SC_INVALID_PARAMS = 38 + WLC_DOT11_SC_STATUS_OFFSET, /* One or more params have invalid values */ + WLC_DOT11_SC_INVALID_AKMP = 43 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid AKMP */ + WLC_DOT11_SC_INVALID_MDID = 54 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid MDID */ + WLC_DOT11_SC_INVALID_FTIE = 55 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid FTIE */ - WLC_E_STATUS_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */ + WLC_E_STATUS_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */ } wl_event_status_t; #define WLC_E_PRUNE_REASON_OFFSET (256) @@ -2918,82 +2925,82 @@ typedef enum */ typedef enum { - /* roam reason codes */ - WLC_E_REASON_INITIAL_ASSOC = 0, /** initial assoc */ - WLC_E_REASON_LOW_RSSI = 1, /** roamed due to low RSSI */ - WLC_E_REASON_DEAUTH = 2, /** roamed due to DEAUTH indication */ - WLC_E_REASON_DISASSOC = 3, /** roamed due to DISASSOC indication */ - WLC_E_REASON_BCNS_LOST = 4, /** roamed due to lost beacons */ - WLC_E_REASON_FAST_ROAM_FAILED = 5, /** roamed due to fast roam failure */ - WLC_E_REASON_DIRECTED_ROAM = 6, /** roamed due to request by AP */ - WLC_E_REASON_TSPEC_REJECTED = 7, /** roamed due to TSPEC rejection */ - WLC_E_REASON_BETTER_AP = 8, /** roamed due to finding better AP */ + /* roam reason codes */ + WLC_E_REASON_INITIAL_ASSOC = 0, /** initial assoc */ + WLC_E_REASON_LOW_RSSI = 1, /** roamed due to low RSSI */ + WLC_E_REASON_DEAUTH = 2, /** roamed due to DEAUTH indication */ + WLC_E_REASON_DISASSOC = 3, /** roamed due to DISASSOC indication */ + WLC_E_REASON_BCNS_LOST = 4, /** roamed due to lost beacons */ + WLC_E_REASON_FAST_ROAM_FAILED = 5, /** roamed due to fast roam failure */ + WLC_E_REASON_DIRECTED_ROAM = 6, /** roamed due to request by AP */ + WLC_E_REASON_TSPEC_REJECTED = 7, /** roamed due to TSPEC rejection */ + WLC_E_REASON_BETTER_AP = 8, /** roamed due to finding better AP */ - /* prune reason codes */ - WLC_E_PRUNE_ENCR_MISMATCH = 1 + WLC_E_PRUNE_REASON_OFFSET, /** encryption mismatch */ - WLC_E_PRUNE_BCAST_BSSID = 2 + WLC_E_PRUNE_REASON_OFFSET, /** AP uses a broadcast BSSID */ - WLC_E_PRUNE_MAC_DENY = 3 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is in AP's MAC deny list */ - WLC_E_PRUNE_MAC_NA = 4 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is not in AP's MAC allow list */ - WLC_E_PRUNE_REG_PASSV = 5 + WLC_E_PRUNE_REASON_OFFSET, /** AP not allowed due to regulatory restriction */ - WLC_E_PRUNE_SPCT_MGMT = 6 + WLC_E_PRUNE_REASON_OFFSET, /** AP does not support STA locale spectrum mgmt */ - WLC_E_PRUNE_RADAR = 7 + WLC_E_PRUNE_REASON_OFFSET, /** AP is on a radar channel of STA locale */ - WLC_E_RSN_MISMATCH = 8 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support AP's RSN */ - WLC_E_PRUNE_NO_COMMON_RATES = 9 + WLC_E_PRUNE_REASON_OFFSET, /** No rates in common with AP */ - WLC_E_PRUNE_BASIC_RATES = 10 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support all basic rates of BSS */ - WLC_E_PRUNE_CCXFAST_PREVAP = 11 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune previous AP */ - WLC_E_PRUNE_CIPHER_NA = 12 + WLC_E_PRUNE_REASON_OFFSET, /** BSS's cipher not supported */ - WLC_E_PRUNE_KNOWN_STA = 13 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a STA */ - WLC_E_PRUNE_CCXFAST_DROAM = 14 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune unqualified AP */ - WLC_E_PRUNE_WDS_PEER = 15 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a WDS peer */ - WLC_E_PRUNE_QBSS_LOAD = 16 + WLC_E_PRUNE_REASON_OFFSET, /** QBSS LOAD - AAC is too low */ - WLC_E_PRUNE_HOME_AP = 17 + WLC_E_PRUNE_REASON_OFFSET, /** prune home AP */ - WLC_E_PRUNE_AP_BLOCKED = 18 + WLC_E_PRUNE_REASON_OFFSET, /** prune blocked AP */ - WLC_E_PRUNE_NO_DIAG_SUPPORT = 19 + WLC_E_PRUNE_REASON_OFFSET, /** prune due to diagnostic mode not supported */ + /* prune reason codes */ + WLC_E_PRUNE_ENCR_MISMATCH = 1 + WLC_E_PRUNE_REASON_OFFSET, /** encryption mismatch */ + WLC_E_PRUNE_BCAST_BSSID = 2 + WLC_E_PRUNE_REASON_OFFSET, /** AP uses a broadcast BSSID */ + WLC_E_PRUNE_MAC_DENY = 3 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is in AP's MAC deny list */ + WLC_E_PRUNE_MAC_NA = 4 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is not in AP's MAC allow list */ + WLC_E_PRUNE_REG_PASSV = 5 + WLC_E_PRUNE_REASON_OFFSET, /** AP not allowed due to regulatory restriction */ + WLC_E_PRUNE_SPCT_MGMT = 6 + WLC_E_PRUNE_REASON_OFFSET, /** AP does not support STA locale spectrum mgmt */ + WLC_E_PRUNE_RADAR = 7 + WLC_E_PRUNE_REASON_OFFSET, /** AP is on a radar channel of STA locale */ + WLC_E_RSN_MISMATCH = 8 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support AP's RSN */ + WLC_E_PRUNE_NO_COMMON_RATES = 9 + WLC_E_PRUNE_REASON_OFFSET, /** No rates in common with AP */ + WLC_E_PRUNE_BASIC_RATES = 10 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support all basic rates of BSS */ + WLC_E_PRUNE_CCXFAST_PREVAP = 11 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune previous AP */ + WLC_E_PRUNE_CIPHER_NA = 12 + WLC_E_PRUNE_REASON_OFFSET, /** BSS's cipher not supported */ + WLC_E_PRUNE_KNOWN_STA = 13 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a STA */ + WLC_E_PRUNE_CCXFAST_DROAM = 14 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune unqualified AP */ + WLC_E_PRUNE_WDS_PEER = 15 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a WDS peer */ + WLC_E_PRUNE_QBSS_LOAD = 16 + WLC_E_PRUNE_REASON_OFFSET, /** QBSS LOAD - AAC is too low */ + WLC_E_PRUNE_HOME_AP = 17 + WLC_E_PRUNE_REASON_OFFSET, /** prune home AP */ + WLC_E_PRUNE_AP_BLOCKED = 18 + WLC_E_PRUNE_REASON_OFFSET, /** prune blocked AP */ + WLC_E_PRUNE_NO_DIAG_SUPPORT = 19 + WLC_E_PRUNE_REASON_OFFSET, /** prune due to diagnostic mode not supported */ - /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */ - WLC_E_SUP_OTHER = 0 + WLC_E_SUP_REASON_OFFSET, /** Other reason */ - WLC_E_SUP_DECRYPT_KEY_DATA = 1 + WLC_E_SUP_REASON_OFFSET, /** Decryption of key data failed */ - WLC_E_SUP_BAD_UCAST_WEP128 = 2 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP128 */ - WLC_E_SUP_BAD_UCAST_WEP40 = 3 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP40 */ - WLC_E_SUP_UNSUP_KEY_LEN = 4 + WLC_E_SUP_REASON_OFFSET, /** Unsupported key length */ - WLC_E_SUP_PW_KEY_CIPHER = 5 + WLC_E_SUP_REASON_OFFSET, /** Unicast cipher mismatch in pairwise key */ - WLC_E_SUP_MSG3_TOO_MANY_IE = 6 + WLC_E_SUP_REASON_OFFSET, /** WPA IE contains > 1 RSN IE in key msg 3 */ - WLC_E_SUP_MSG3_IE_MISMATCH = 7 + WLC_E_SUP_REASON_OFFSET, /** WPA IE mismatch in key message 3 */ - WLC_E_SUP_NO_INSTALL_FLAG = 8 + WLC_E_SUP_REASON_OFFSET, /** INSTALL flag unset in 4-way msg */ - WLC_E_SUP_MSG3_NO_GTK = 9 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from msg 3 */ - WLC_E_SUP_GRP_KEY_CIPHER = 10 + WLC_E_SUP_REASON_OFFSET, /** Multicast cipher mismatch in group key */ - WLC_E_SUP_GRP_MSG1_NO_GTK = 11 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from group msg 1 */ - WLC_E_SUP_GTK_DECRYPT_FAIL = 12 + WLC_E_SUP_REASON_OFFSET, /** GTK decrypt failure */ - WLC_E_SUP_SEND_FAIL = 13 + WLC_E_SUP_REASON_OFFSET, /** message send failure */ - WLC_E_SUP_DEAUTH = 14 + WLC_E_SUP_REASON_OFFSET, /** received FC_DEAUTH */ - WLC_E_SUP_WPA_PSK_TMO = 15 + WLC_E_SUP_REASON_OFFSET, /** WPA PSK 4-way handshake timeout */ + /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */ + WLC_E_SUP_OTHER = 0 + WLC_E_SUP_REASON_OFFSET, /** Other reason */ + WLC_E_SUP_DECRYPT_KEY_DATA = 1 + WLC_E_SUP_REASON_OFFSET, /** Decryption of key data failed */ + WLC_E_SUP_BAD_UCAST_WEP128 = 2 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP128 */ + WLC_E_SUP_BAD_UCAST_WEP40 = 3 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP40 */ + WLC_E_SUP_UNSUP_KEY_LEN = 4 + WLC_E_SUP_REASON_OFFSET, /** Unsupported key length */ + WLC_E_SUP_PW_KEY_CIPHER = 5 + WLC_E_SUP_REASON_OFFSET, /** Unicast cipher mismatch in pairwise key */ + WLC_E_SUP_MSG3_TOO_MANY_IE = 6 + WLC_E_SUP_REASON_OFFSET, /** WPA IE contains > 1 RSN IE in key msg 3 */ + WLC_E_SUP_MSG3_IE_MISMATCH = 7 + WLC_E_SUP_REASON_OFFSET, /** WPA IE mismatch in key message 3 */ + WLC_E_SUP_NO_INSTALL_FLAG = 8 + WLC_E_SUP_REASON_OFFSET, /** INSTALL flag unset in 4-way msg */ + WLC_E_SUP_MSG3_NO_GTK = 9 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from msg 3 */ + WLC_E_SUP_GRP_KEY_CIPHER = 10 + WLC_E_SUP_REASON_OFFSET, /** Multicast cipher mismatch in group key */ + WLC_E_SUP_GRP_MSG1_NO_GTK = 11 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from group msg 1 */ + WLC_E_SUP_GTK_DECRYPT_FAIL = 12 + WLC_E_SUP_REASON_OFFSET, /** GTK decrypt failure */ + WLC_E_SUP_SEND_FAIL = 13 + WLC_E_SUP_REASON_OFFSET, /** message send failure */ + WLC_E_SUP_DEAUTH = 14 + WLC_E_SUP_REASON_OFFSET, /** received FC_DEAUTH */ + WLC_E_SUP_WPA_PSK_TMO = 15 + WLC_E_SUP_REASON_OFFSET, /** WPA PSK 4-way handshake timeout */ - DOT11_RC_RESERVED = 0 + WLC_E_DOT11_RC_REASON_OFFSET, /* d11 RC reserved */ - DOT11_RC_UNSPECIFIED = 1 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unspecified reason */ - DOT11_RC_AUTH_INVAL = 2 + WLC_E_DOT11_RC_REASON_OFFSET, /* Previous authentication no longer valid */ - DOT11_RC_DEAUTH_LEAVING = 3 + WLC_E_DOT11_RC_REASON_OFFSET, /* Deauthenticated because sending station is leaving (or has left) IBSS or ESS */ - DOT11_RC_INACTIVITY = 4 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated due to inactivity */ - DOT11_RC_BUSY = 5 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because AP is unable to handle all currently associated stations */ - DOT11_RC_INVAL_CLASS_2 = 6 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 2 frame received from nonauthenticated station */ - DOT11_RC_INVAL_CLASS_3 = 7 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 3 frame received from nonassociated station */ - DOT11_RC_DISASSOC_LEAVING = 8 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because sending station is leaving (or has left) BSS */ - DOT11_RC_NOT_AUTH = 9 + WLC_E_DOT11_RC_REASON_OFFSET, /* Station requesting (re)association is not * authenticated with responding station */ - DOT11_RC_BAD_PC = 10 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable power capability element */ - DOT11_RC_BAD_CHANNELS = 11 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable supported channels element */ - /* 12 is unused */ - /* XXX 13-23 are WPA/802.11i reason codes defined in proto/wpa.h */ - /* 32-39 are QSTA specific reasons added in 11e */ - DOT11_RC_UNSPECIFIED_QOS = 32 + WLC_E_DOT11_RC_REASON_OFFSET, /* unspecified QoS-related reason */ - DOT11_RC_INSUFFCIENT_BW = 33 + WLC_E_DOT11_RC_REASON_OFFSET, /* QAP lacks sufficient bandwidth */ - DOT11_RC_EXCESSIVE_FRAMES = 34 + WLC_E_DOT11_RC_REASON_OFFSET, /* excessive number of frames need ack */ - DOT11_RC_TX_OUTSIDE_TXOP = 35 + WLC_E_DOT11_RC_REASON_OFFSET, /* transmitting outside the limits of txop */ - DOT11_RC_LEAVING_QBSS = 36 + WLC_E_DOT11_RC_REASON_OFFSET, /* QSTA is leaving the QBSS (or restting) */ - DOT11_RC_BAD_MECHANISM = 37 + WLC_E_DOT11_RC_REASON_OFFSET, /* does not want to use the mechanism */ - DOT11_RC_SETUP_NEEDED = 38 + WLC_E_DOT11_RC_REASON_OFFSET, /* mechanism needs a setup */ - DOT11_RC_TIMEOUT = 39 + WLC_E_DOT11_RC_REASON_OFFSET, /* timeout */ - DOT11_RC_MAX = 23 + WLC_E_DOT11_RC_REASON_OFFSET, /* Reason codes > 23 are reserved */ + DOT11_RC_RESERVED = 0 + WLC_E_DOT11_RC_REASON_OFFSET, /* d11 RC reserved */ + DOT11_RC_UNSPECIFIED = 1 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unspecified reason */ + DOT11_RC_AUTH_INVAL = 2 + WLC_E_DOT11_RC_REASON_OFFSET, /* Previous authentication no longer valid */ + DOT11_RC_DEAUTH_LEAVING = 3 + WLC_E_DOT11_RC_REASON_OFFSET, /* Deauthenticated because sending station is leaving (or has left) IBSS or ESS */ + DOT11_RC_INACTIVITY = 4 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated due to inactivity */ + DOT11_RC_BUSY = 5 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because AP is unable to handle all currently associated stations */ + DOT11_RC_INVAL_CLASS_2 = 6 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 2 frame received from nonauthenticated station */ + DOT11_RC_INVAL_CLASS_3 = 7 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 3 frame received from nonassociated station */ + DOT11_RC_DISASSOC_LEAVING = 8 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because sending station is leaving (or has left) BSS */ + DOT11_RC_NOT_AUTH = 9 + WLC_E_DOT11_RC_REASON_OFFSET, /* Station requesting (re)association is not * authenticated with responding station */ + DOT11_RC_BAD_PC = 10 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable power capability element */ + DOT11_RC_BAD_CHANNELS = 11 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable supported channels element */ + /* 12 is unused */ + /* XXX 13-23 are WPA/802.11i reason codes defined in proto/wpa.h */ + /* 32-39 are QSTA specific reasons added in 11e */ + DOT11_RC_UNSPECIFIED_QOS = 32 + WLC_E_DOT11_RC_REASON_OFFSET, /* unspecified QoS-related reason */ + DOT11_RC_INSUFFCIENT_BW = 33 + WLC_E_DOT11_RC_REASON_OFFSET, /* QAP lacks sufficient bandwidth */ + DOT11_RC_EXCESSIVE_FRAMES = 34 + WLC_E_DOT11_RC_REASON_OFFSET, /* excessive number of frames need ack */ + DOT11_RC_TX_OUTSIDE_TXOP = 35 + WLC_E_DOT11_RC_REASON_OFFSET, /* transmitting outside the limits of txop */ + DOT11_RC_LEAVING_QBSS = 36 + WLC_E_DOT11_RC_REASON_OFFSET, /* QSTA is leaving the QBSS (or restting) */ + DOT11_RC_BAD_MECHANISM = 37 + WLC_E_DOT11_RC_REASON_OFFSET, /* does not want to use the mechanism */ + DOT11_RC_SETUP_NEEDED = 38 + WLC_E_DOT11_RC_REASON_OFFSET, /* mechanism needs a setup */ + DOT11_RC_TIMEOUT = 39 + WLC_E_DOT11_RC_REASON_OFFSET, /* timeout */ + DOT11_RC_MAX = 23 + WLC_E_DOT11_RC_REASON_OFFSET, /* Reason codes > 23 are reserved */ - WLC_E_REASON_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */ + WLC_E_REASON_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */ } wl_event_reason_t; #endif /* __DRIVERS_WIRELESS_IEEE80211_BCMF_IOCTL_H */ diff --git a/drivers/wireless/ieee80211/bcmf_netdev.c b/drivers/wireless/ieee80211/bcmf_netdev.c index fafae13bb25..0d7e38c9358 100644 --- a/drivers/wireless/ieee80211/bcmf_netdev.c +++ b/drivers/wireless/ieee80211/bcmf_netdev.c @@ -755,9 +755,10 @@ static int bcmf_ifdown(FAR struct net_driver_s *dev) static void bcmf_txavail_work(FAR void *arg) { - // wlinfo("Entry\n"); FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s *)arg; + // wlinfo("Entry\n"); + /* Lock the network and serialize driver operations if necessary. * NOTE: Serialization is only required in the case where the driver work * is performed on an LP worker thread and where more than one LP worker @@ -991,23 +992,23 @@ static int bcmf_ioctl(FAR struct net_driver_s *dev, int cmd, switch (cmd) { case SIOCSIWSCAN: - ret = bcmf_wl_start_scan(priv, (struct ifreq*)arg); + ret = bcmf_wl_start_scan(priv, (struct ifreq *)arg); break; case SIOCGIWSCAN: - ret = bcmf_wl_get_scan_results(priv, (struct ifreq*)arg); + ret = bcmf_wl_get_scan_results(priv, (struct ifreq *)arg); break; case SIOCSIFHWADDR: /* Set device MAC address */ - ret = bcmf_wl_set_mac_address(priv, (struct ifreq*)arg); + ret = bcmf_wl_set_mac_address(priv, (struct ifreq *)arg); break; case SIOCSIWAUTH: - ret = bcmf_wl_set_auth_param(priv, (struct iwreq*)arg); + ret = bcmf_wl_set_auth_param(priv, (struct iwreq *)arg); break; case SIOCSIWENCODEEXT: - ret = bcmf_wl_set_encode_ext(priv, (struct iwreq*)arg); + ret = bcmf_wl_set_encode_ext(priv, (struct iwreq *)arg); break; case SIOCSIWFREQ: /* Set channel/frequency (Hz) */ @@ -1021,7 +1022,7 @@ static int bcmf_ioctl(FAR struct net_driver_s *dev, int cmd, break; case SIOCSIWMODE: /* Set operation mode */ - ret = bcmf_wl_set_mode(priv, (struct iwreq*)arg); + ret = bcmf_wl_set_mode(priv, (struct iwreq *)arg); break; case SIOCGIWMODE: /* Get operation mode */ @@ -1040,7 +1041,7 @@ static int bcmf_ioctl(FAR struct net_driver_s *dev, int cmd, break; case SIOCSIWESSID: /* Set ESSID (network name) */ - ret = bcmf_wl_set_ssid(priv, (struct iwreq*)arg); + ret = bcmf_wl_set_ssid(priv, (struct iwreq *)arg); break; case SIOCGIWESSID: /* Get ESSID */ diff --git a/drivers/wireless/ieee80211/bcmf_sdio.c b/drivers/wireless/ieee80211/bcmf_sdio.c index 4d6324090a1..74339037954 100644 --- a/drivers/wireless/ieee80211/bcmf_sdio.c +++ b/drivers/wireless/ieee80211/bcmf_sdio.c @@ -114,7 +114,8 @@ static int bcmf_sdio_find_block_size(unsigned int size); FAR struct bcmf_dev_s *g_sdio_priv; /* Buffer pool for SDIO bus interface - This pool is shared between all driver devices */ + * This pool is shared between all driver devices + */ static struct bcmf_sdio_frame g_pktframes[BCMF_PKT_POOL_SIZE]; @@ -126,11 +127,12 @@ static struct bcmf_sdio_frame g_pktframes[BCMF_PKT_POOL_SIZE]; int bcmf_oob_irq(int irq, FAR void *context, FAR void *arg) { - FAR struct bcmf_sdio_dev_s *sbus = (struct bcmf_sdio_dev_s*)arg; + FAR struct bcmf_sdio_dev_s *sbus = (struct bcmf_sdio_dev_s *)arg; if (sbus->ready) { /* Signal bmcf thread */ + sbus->irq_pending = true; sem_post(&sbus->thread_signal); @@ -360,7 +362,7 @@ int bcmf_bus_setup_interrupts(FAR struct bcmf_sdio_dev_s *sbus) /* Configure gpio interrupt pin */ - bcmf_board_setup_oob_irq(sbus->minor, bcmf_oob_irq, (void*)sbus); + bcmf_board_setup_oob_irq(sbus->minor, bcmf_oob_irq, (void *)sbus); /* Enable function 2 interrupt */ @@ -455,16 +457,18 @@ int bcmf_sdio_find_block_size(unsigned int size) { int ret = 0; int size_copy = size; - while (size_copy) { - size_copy >>= 1; - ret++; - } + while (size_copy) + { + size_copy >>= 1; + ret++; + } if (size & (size-1)) { - return 1<tx_queue); sq_init(&sbus->rx_queue); sq_init(&sbus->free_queue); @@ -599,6 +604,7 @@ int bcmf_bus_sdio_initialize(FAR struct bcmf_dev_s *priv, { goto exit_free_bus; } + if ((ret = sem_setprotocol(&sbus->thread_signal, SEM_PRIO_NONE)) != OK) { goto exit_free_bus; @@ -708,7 +714,7 @@ int bcmf_chipinitialize(FAR struct bcmf_sdio_dev_s *sbus) #ifdef CONFIG_IEEE80211_BROADCOM_BCM43362 case SDIO_DEVICE_ID_BROADCOM_43362: wlinfo("bcm43362 chip detected\n"); - sbus->chip = (struct bcmf_sdio_chip*)&bcmf_43362_config_sdio; + sbus->chip = (struct bcmf_sdio_chip *)&bcmf_43362_config_sdio; break; #endif default: @@ -720,8 +726,8 @@ int bcmf_chipinitialize(FAR struct bcmf_sdio_dev_s *sbus) void bcmf_sdio_waitdog_timeout(int argc, wdparm_t arg1, ...) { - FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s*)arg1; - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s *)arg1; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; /* Notify bcmf thread */ @@ -733,7 +739,7 @@ int bcmf_sdio_thread(int argc, char **argv) { int ret; FAR struct bcmf_dev_s *priv = g_sdio_priv; - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; wlinfo("Enter\n"); @@ -788,7 +794,8 @@ int bcmf_sdio_thread(int argc, char **argv) do { ret = bcmf_sdpcm_readframe(priv); - } while (ret == OK); + } + while (ret == OK); if (ret == -ENODATA) { @@ -803,7 +810,8 @@ int bcmf_sdio_thread(int argc, char **argv) do { ret = bcmf_sdpcm_sendframe(priv); - } while (ret == OK); + } + while (ret == OK); /* Check if RX frames are available */ @@ -825,10 +833,10 @@ int bcmf_sdio_thread(int argc, char **argv) return 0; } -struct bcmf_sdio_frame* bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, +struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, bool block, bool tx) { - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; struct bcmf_sdio_frame *sframe; dq_entry_t *entry = NULL; @@ -879,7 +887,7 @@ void bcmf_sdio_free_frame(FAR struct bcmf_dev_s *priv, struct bcmf_sdio_frame *sframe) { // wlinfo("free %p\n", sframe); - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; if (sem_wait(&sbus->queue_mutex)) { @@ -893,4 +901,4 @@ void bcmf_sdio_free_frame(FAR struct bcmf_dev_s *priv, sbus->tx_queue_count -= 1; } sem_post(&sbus->queue_mutex); -} \ No newline at end of file +} diff --git a/drivers/wireless/ieee80211/bcmf_sdio.h b/drivers/wireless/ieee80211/bcmf_sdio.h index d21365a1c46..692b1a92516 100644 --- a/drivers/wireless/ieee80211/bcmf_sdio.h +++ b/drivers/wireless/ieee80211/bcmf_sdio.h @@ -106,12 +106,13 @@ struct bcmf_sdio_dev_s /* Structure used to manage SDIO frames */ -struct bcmf_sdio_frame { - struct bcmf_frame_s header; - bool tx; - dq_entry_t list_entry; - uint8_t data[HEADER_SIZE + MAX_NET_DEV_MTU + - CONFIG_NET_GUARDSIZE]; +struct bcmf_sdio_frame +{ + struct bcmf_frame_s header; + bool tx; + dq_entry_t list_entry; + uint8_t data[HEADER_SIZE + MAX_NET_DEV_MTU + + CONFIG_NET_GUARDSIZE]; }; /**************************************************************************** @@ -137,7 +138,7 @@ int bcmf_read_reg(FAR struct bcmf_sdio_dev_s *sbus, uint8_t function, int bcmf_write_reg(FAR struct bcmf_sdio_dev_s *sbus, uint8_t function, uint32_t address, uint8_t reg); -struct bcmf_sdio_frame* bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, +struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, bool block, bool tx); void bcmf_sdio_free_frame(FAR struct bcmf_dev_s *priv, diff --git a/drivers/wireless/ieee80211/bcmf_sdio_core.h b/drivers/wireless/ieee80211/bcmf_sdio_core.h index eb4f4a98036..6131b1be3aa 100644 --- a/drivers/wireless/ieee80211/bcmf_sdio_core.h +++ b/drivers/wireless/ieee80211/bcmf_sdio_core.h @@ -1,4 +1,4 @@ -/* +/**************************************************************************** * Copyright (c) 2011 Broadcom Corporation * * Permission to use, copy, modify, and/or distribute this software for any @@ -12,7 +12,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ + * + ****************************************************************************/ #ifndef __DRIVERS_WIRELESS_IEEE80211_BCMF_SDIO_CORE_H #define __DRIVERS_WIRELESS_IEEE80211_BCMF_SDIO_CORE_H @@ -26,6 +27,7 @@ #endif /* SDIO device ID */ + #define SDIO_DEVICE_ID_BROADCOM_43143 43143 #define SDIO_DEVICE_ID_BROADCOM_43241 0x4324 #define SDIO_DEVICE_ID_BROADCOM_4329 0x4329 @@ -34,10 +36,10 @@ #define SDIO_DEVICE_ID_BROADCOM_4335_4339 0x4335 #define SDIO_DEVICE_ID_BROADCOM_43362 43362 -/* - * Core reg address translation. +/* Core reg address translation. * Both macro's returns a 32 bits byte address on the backplane bus. */ + #define CORE_CC_REG(base, field) \ (base + offsetof(struct chipcregs, field)) #define CORE_BUS_REG(base, field) \ @@ -68,152 +70,157 @@ #define SMB_USE_OOB (1 << 2) /* Use OOB Wakeup */ #define SMB_DEV_INT (1 << 3) /* Miscellaneous Interrupt */ -enum { - CHIPCOMMON_CORE_ID = 0, - DOT11MAC_CORE_ID, - SDIOD_CORE_ID, - WLAN_ARMCM3_CORE_ID, - SOCSRAM_CORE_ID, - MAX_CORE_ID +enum +{ + CHIPCOMMON_CORE_ID = 0, + DOT11MAC_CORE_ID, + SDIOD_CORE_ID, + WLAN_ARMCM3_CORE_ID, + SOCSRAM_CORE_ID, + MAX_CORE_ID }; -struct chip_core_info { - uint16_t id; - uint16_t rev; - uint32_t base; - uint32_t wrapbase; - uint32_t caps; - uint32_t cib; +struct chip_core_info +{ + uint16_t id; + uint16_t rev; + uint32_t base; + uint32_t wrapbase; + uint32_t caps; + uint32_t cib; }; -struct sbconfig { - uint8_t PAD[0xf00]; - uint32_t PAD[2]; - uint32_t sbipsflag; /* initiator port ocp slave flag */ - uint32_t PAD[3]; - uint32_t sbtpsflag; /* target port ocp slave flag */ - uint32_t PAD[11]; - uint32_t sbtmerrloga; /* (sonics >= 2.3) */ - uint32_t PAD; - uint32_t sbtmerrlog; /* (sonics >= 2.3) */ - uint32_t PAD[3]; - uint32_t sbadmatch3; /* address match3 */ - uint32_t PAD; - uint32_t sbadmatch2; /* address match2 */ - uint32_t PAD; - uint32_t sbadmatch1; /* address match1 */ - uint32_t PAD[7]; - uint32_t sbimstate; /* initiator agent state */ - uint32_t sbintvec; /* interrupt mask */ - uint32_t sbtmstatelow; /* target state */ - uint32_t sbtmstatehigh; /* target state */ - uint32_t sbbwa0; /* bandwidth allocation table0 */ - uint32_t PAD; - uint32_t sbimconfiglow; /* initiator configuration */ - uint32_t sbimconfighigh; /* initiator configuration */ - uint32_t sbadmatch0; /* address match0 */ - uint32_t PAD; - uint32_t sbtmconfiglow; /* target configuration */ - uint32_t sbtmconfighigh; /* target configuration */ - uint32_t sbbconfig; /* broadcast configuration */ - uint32_t PAD; - uint32_t sbbstate; /* broadcast state */ - uint32_t PAD[3]; - uint32_t sbactcnfg; /* activate configuration */ - uint32_t PAD[3]; - uint32_t sbflagst; /* current sbflags */ - uint32_t PAD[3]; - uint32_t sbidlow; /* identification */ - uint32_t sbidhigh; /* identification */ +struct sbconfig +{ + uint8_t PAD[0xf00]; + uint32_t PAD[2]; + uint32_t sbipsflag; /* initiator port ocp slave flag */ + uint32_t PAD[3]; + uint32_t sbtpsflag; /* target port ocp slave flag */ + uint32_t PAD[11]; + uint32_t sbtmerrloga; /* (sonics >= 2.3) */ + uint32_t PAD; + uint32_t sbtmerrlog; /* (sonics >= 2.3) */ + uint32_t PAD[3]; + uint32_t sbadmatch3; /* address match3 */ + uint32_t PAD; + uint32_t sbadmatch2; /* address match2 */ + uint32_t PAD; + uint32_t sbadmatch1; /* address match1 */ + uint32_t PAD[7]; + uint32_t sbimstate; /* initiator agent state */ + uint32_t sbintvec; /* interrupt mask */ + uint32_t sbtmstatelow; /* target state */ + uint32_t sbtmstatehigh; /* target state */ + uint32_t sbbwa0; /* bandwidth allocation table0 */ + uint32_t PAD; + uint32_t sbimconfiglow; /* initiator configuration */ + uint32_t sbimconfighigh; /* initiator configuration */ + uint32_t sbadmatch0; /* address match0 */ + uint32_t PAD; + uint32_t sbtmconfiglow; /* target configuration */ + uint32_t sbtmconfighigh; /* target configuration */ + uint32_t sbbconfig; /* broadcast configuration */ + uint32_t PAD; + uint32_t sbbstate; /* broadcast state */ + uint32_t PAD[3]; + uint32_t sbactcnfg; /* activate configuration */ + uint32_t PAD[3]; + uint32_t sbflagst; /* current sbflags */ + uint32_t PAD[3]; + uint32_t sbidlow; /* identification */ + uint32_t sbidhigh; /* identification */ }; /* sdio core registers */ -struct sdpcmd_regs { - uint32_t corecontrol; /* 0x00, rev8 */ - uint32_t corestatus; /* rev8 */ - uint32_t PAD[1]; - uint32_t biststatus; /* rev8 */ - /* PCMCIA access */ - uint16_t pcmciamesportaladdr; /* 0x010, rev8 */ - uint16_t PAD[1]; - uint16_t pcmciamesportalmask; /* rev8 */ - uint16_t PAD[1]; - uint16_t pcmciawrframebc; /* rev8 */ - uint16_t PAD[1]; - uint16_t pcmciaunderflowtimer; /* rev8 */ - uint16_t PAD[1]; +struct sdpcmd_regs +{ + uint32_t corecontrol; /* 0x00, rev8 */ + uint32_t corestatus; /* rev8 */ + uint32_t PAD[1]; + uint32_t biststatus; /* rev8 */ - /* interrupt */ - uint32_t intstatus; /* 0x020, rev8 */ - uint32_t hostintmask; /* rev8 */ - uint32_t intmask; /* rev8 */ - uint32_t sbintstatus; /* rev8 */ - uint32_t sbintmask; /* rev8 */ - uint32_t funcintmask; /* rev4 */ - uint32_t PAD[2]; - uint32_t tosbmailbox; /* 0x040, rev8 */ - uint32_t tohostmailbox; /* rev8 */ - uint32_t tosbmailboxdata; /* rev8 */ - uint32_t tohostmailboxdata; /* rev8 */ + /* PCMCIA access */ + uint16_t pcmciamesportaladdr; /* 0x010, rev8 */ + uint16_t PAD[1]; + uint16_t pcmciamesportalmask; /* rev8 */ + uint16_t PAD[1]; + uint16_t pcmciawrframebc; /* rev8 */ + uint16_t PAD[1]; + uint16_t pcmciaunderflowtimer; /* rev8 */ + uint16_t PAD[1]; - /* synchronized access to registers in SDIO clock domain */ - uint32_t sdioaccess; /* 0x050, rev8 */ - uint32_t PAD[3]; + /* interrupt */ + uint32_t intstatus; /* 0x020, rev8 */ + uint32_t hostintmask; /* rev8 */ + uint32_t intmask; /* rev8 */ + uint32_t sbintstatus; /* rev8 */ + uint32_t sbintmask; /* rev8 */ + uint32_t funcintmask; /* rev4 */ + uint32_t PAD[2]; + uint32_t tosbmailbox; /* 0x040, rev8 */ + uint32_t tohostmailbox; /* rev8 */ + uint32_t tosbmailboxdata; /* rev8 */ + uint32_t tohostmailboxdata; /* rev8 */ - /* PCMCIA frame control */ - uint8_t pcmciaframectrl; /* 0x060, rev8 */ - uint8_t PAD[3]; - uint8_t pcmciawatermark; /* rev8 */ - uint8_t PAD[155]; + /* synchronized access to registers in SDIO clock domain */ + uint32_t sdioaccess; /* 0x050, rev8 */ + uint32_t PAD[3]; - /* interrupt batching control */ - uint32_t intrcvlazy; /* 0x100, rev8 */ - uint32_t PAD[3]; + /* PCMCIA frame control */ + uint8_t pcmciaframectrl; /* 0x060, rev8 */ + uint8_t PAD[3]; + uint8_t pcmciawatermark; /* rev8 */ + uint8_t PAD[155]; - /* counters */ - uint32_t cmd52rd; /* 0x110, rev8 */ - uint32_t cmd52wr; /* rev8 */ - uint32_t cmd53rd; /* rev8 */ - uint32_t cmd53wr; /* rev8 */ - uint32_t abort; /* rev8 */ - uint32_t datacrcerror; /* rev8 */ - uint32_t rdoutofsync; /* rev8 */ - uint32_t wroutofsync; /* rev8 */ - uint32_t writebusy; /* rev8 */ - uint32_t readwait; /* rev8 */ - uint32_t readterm; /* rev8 */ - uint32_t writeterm; /* rev8 */ - uint32_t PAD[40]; - uint32_t clockctlstatus; /* rev8 */ - uint32_t PAD[7]; + /* interrupt batching control */ + uint32_t intrcvlazy; /* 0x100, rev8 */ + uint32_t PAD[3]; - uint32_t PAD[128]; /* DMA engines */ + /* counters */ + uint32_t cmd52rd; /* 0x110, rev8 */ + uint32_t cmd52wr; /* rev8 */ + uint32_t cmd53rd; /* rev8 */ + uint32_t cmd53wr; /* rev8 */ + uint32_t abort; /* rev8 */ + uint32_t datacrcerror; /* rev8 */ + uint32_t rdoutofsync; /* rev8 */ + uint32_t wroutofsync; /* rev8 */ + uint32_t writebusy; /* rev8 */ + uint32_t readwait; /* rev8 */ + uint32_t readterm; /* rev8 */ + uint32_t writeterm; /* rev8 */ + uint32_t PAD[40]; + uint32_t clockctlstatus; /* rev8 */ + uint32_t PAD[7]; - /* SDIO/PCMCIA CIS region */ - char cis[512]; /* 0x400-0x5ff, rev6 */ + uint32_t PAD[128]; /* DMA engines */ - /* PCMCIA function control registers */ - char pcmciafcr[256]; /* 0x600-6ff, rev6 */ - uint16_t PAD[55]; + /* SDIO/PCMCIA CIS region */ + char cis[512]; /* 0x400-0x5ff, rev6 */ - /* PCMCIA backplane access */ - uint16_t backplanecsr; /* 0x76E, rev6 */ - uint16_t backplaneaddr0; /* rev6 */ - uint16_t backplaneaddr1; /* rev6 */ - uint16_t backplaneaddr2; /* rev6 */ - uint16_t backplaneaddr3; /* rev6 */ - uint16_t backplanedata0; /* rev6 */ - uint16_t backplanedata1; /* rev6 */ - uint16_t backplanedata2; /* rev6 */ - uint16_t backplanedata3; /* rev6 */ - uint16_t PAD[31]; + /* PCMCIA function control registers */ + char pcmciafcr[256]; /* 0x600-6ff, rev6 */ + uint16_t PAD[55]; - /* sprom "size" & "blank" info */ - uint16_t spromstatus; /* 0x7BE, rev2 */ - uint32_t PAD[464]; + /* PCMCIA backplane access */ + uint16_t backplanecsr; /* 0x76E, rev6 */ + uint16_t backplaneaddr0; /* rev6 */ + uint16_t backplaneaddr1; /* rev6 */ + uint16_t backplaneaddr2; /* rev6 */ + uint16_t backplaneaddr3; /* rev6 */ + uint16_t backplanedata0; /* rev6 */ + uint16_t backplanedata1; /* rev6 */ + uint16_t backplanedata2; /* rev6 */ + uint16_t backplanedata3; /* rev6 */ + uint16_t PAD[31]; - uint16_t PAD[0x80]; + /* sprom "size" & "blank" info */ + uint16_t spromstatus; /* 0x7BE, rev2 */ + uint32_t PAD[464]; + + uint16_t PAD[0x80]; }; #endif /* __DRIVERS_WIRELESS_IEEE80211_BCMF_SDIO_CORE_H */ diff --git a/drivers/wireless/ieee80211/bcmf_sdio_regs.h b/drivers/wireless/ieee80211/bcmf_sdio_regs.h index c92898af532..6959968524a 100644 --- a/drivers/wireless/ieee80211/bcmf_sdio_regs.h +++ b/drivers/wireless/ieee80211/bcmf_sdio_regs.h @@ -1,4 +1,4 @@ -/* +/**************************************************************************** * Copyright (c) 2010 Broadcom Corporation * * Permission to use, copy, modify, and/or distribute this software for any @@ -12,7 +12,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ + * + ****************************************************************************/ #ifndef __DRIVERS_WIRELESS_IEEE80211_BCMF_SDIO_REGS_H #define __DRIVERS_WIRELESS_IEEE80211_BCMF_SDIO_REGS_H @@ -24,28 +25,35 @@ #define SDIOD_FBR_SIZE 0x100 /* io_en */ + #define SDIO_FUNC_ENABLE_1 0x02 #define SDIO_FUNC_ENABLE_2 0x04 /* io_rdys */ + #define SDIO_FUNC_READY_1 0x02 #define SDIO_FUNC_READY_2 0x04 /* intr_status */ + #define INTR_STATUS_FUNC1 0x2 #define INTR_STATUS_FUNC2 0x4 /* Maximum number of I/O funcs */ + #define SDIOD_MAX_IOFUNCS 7 /* mask of register map */ + #define REG_F0_REG_MASK 0x7FF #define REG_F1_MISC_MASK 0x1FFFF /* as of sdiod rev 0, supports 3 functions */ + #define SBSDIO_NUM_FUNCTION 3 /* function 0 vendor specific CCCR registers */ + #define SDIO_CCCR_BRCM_CARDCAP 0xf0 #define SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT 0x02 #define SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT 0x04 @@ -61,74 +69,140 @@ /* function 1 miscellaneous registers */ /* sprom command and status */ + #define SBSDIO_SPROM_CS 0x10000 + /* sprom info register */ + #define SBSDIO_SPROM_INFO 0x10001 + /* sprom indirect access data byte 0 */ + #define SBSDIO_SPROM_DATA_LOW 0x10002 + /* sprom indirect access data byte 1 */ + #define SBSDIO_SPROM_DATA_HIGH 0x10003 + /* sprom indirect access addr byte 0 */ + #define SBSDIO_SPROM_ADDR_LOW 0x10004 + /* sprom indirect access addr byte 0 */ + #define SBSDIO_SPROM_ADDR_HIGH 0x10005 + /* xtal_pu (gpio) output */ + #define SBSDIO_CHIP_CTRL_DATA 0x10006 + /* xtal_pu (gpio) enable */ + #define SBSDIO_CHIP_CTRL_EN 0x10007 + /* rev < 7, watermark for sdio device */ + #define SBSDIO_WATERMARK 0x10008 + /* control busy signal generation */ + #define SBSDIO_DEVICE_CTL 0x10009 + /* SB Address Window Low (b15) */ + #define SBSDIO_FUNC1_SBADDRLOW 0x1000A + /* SB Address Window Mid (b23:b16) */ + #define SBSDIO_FUNC1_SBADDRMID 0x1000B -/* SB Address Window High (b31:b24) */ + +/* SB Address Window High (b31:b24) */ + #define SBSDIO_FUNC1_SBADDRHIGH 0x1000C + /* Frame Control (frame term/abort) */ + #define SBSDIO_FUNC1_FRAMECTRL 0x1000D + /* Read Frame Terminate */ + #define SFC_RF_TERM (1 << 0) + /* Write Frame Terminate */ + #define SFC_WF_TERM (1 << 1) + /* CRC error for write out of sync */ + #define SFC_CRC4WOOS (1 << 2) + /* Abort all in-progress frames */ + #define SFC_ABORTALL (1 << 3) + /* ChipClockCSR (ALP/HT ctl/status) */ + #define SBSDIO_FUNC1_CHIPCLKCSR 0x1000E + /* Force ALP request to backplane */ + #define SBSDIO_FORCE_ALP 0x01 + /* Force HT request to backplane */ + #define SBSDIO_FORCE_HT 0x02 + /* Force ILP request to backplane */ + #define SBSDIO_FORCE_ILP 0x04 + /* Make ALP ready (power up xtal) */ + #define SBSDIO_ALP_AVAIL_REQ 0x08 + /* Make HT ready (power up PLL) */ + #define SBSDIO_HT_AVAIL_REQ 0x10 + /* Squelch clock requests from HW */ + #define SBSDIO_FORCE_HW_CLKREQ_OFF 0x20 + /* Status: ALP is ready */ + #define SBSDIO_ALP_AVAIL 0x40 + /* Status: HT is ready */ + #define SBSDIO_HT_AVAIL 0x80 /* SdioPullUp (on cmd, d0-d2) */ + #define SBSDIO_FUNC1_SDIOPULLUP 0x1000F + /* Write Frame Byte Count Low */ + #define SBSDIO_FUNC1_WFRAMEBCLO 0x10019 + /* Write Frame Byte Count High */ + #define SBSDIO_FUNC1_WFRAMEBCHI 0x1001A + /* Read Frame Byte Count Low */ + #define SBSDIO_FUNC1_RFRAMEBCLO 0x1001B + /* Read Frame Byte Count High */ + #define SBSDIO_FUNC1_RFRAMEBCHI 0x1001C + /* MesBusyCtl (rev 11) */ + #define SBSDIO_FUNC1_MESBUSYCTRL 0x1001D + /* Sdio Core Rev 12 */ + #define SBSDIO_FUNC1_WAKEUPCTRL 0x1001E #define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK 0x1 #define SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT 0 @@ -155,9 +229,12 @@ /* function 1 OCP space */ /* sb offset addr is <= 15 bits, 32k */ + #define SBSDIO_SB_OFT_ADDR_MASK 0x07FFF #define SBSDIO_SB_OFT_ADDR_LIMIT 0x08000 + /* with b15, maps to 32-bit SB access */ + #define SBSDIO_SB_ACCESS_2_4B_FLAG 0x08000 /* valid bits in SBSDIO_FUNC1_SBADDRxxx regs */ diff --git a/drivers/wireless/ieee80211/bcmf_sdpcm.c b/drivers/wireless/ieee80211/bcmf_sdpcm.c index 065dafb61b8..f3346325b92 100644 --- a/drivers/wireless/ieee80211/bcmf_sdpcm.c +++ b/drivers/wireless/ieee80211/bcmf_sdpcm.c @@ -152,7 +152,7 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv) uint16_t len, checksum; struct bcmf_sdpcm_header *header; struct bcmf_sdio_frame *sframe; - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; /* Request free frame buffer */ @@ -164,11 +164,11 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv) return -EAGAIN; } - header = (struct bcmf_sdpcm_header*)sframe->data; + header = (struct bcmf_sdpcm_header *)sframe->data; /* Read header */ - ret = bcmf_transfer_bytes(sbus, false, 2, 0, (uint8_t*)header, 4); + ret = bcmf_transfer_bytes(sbus, false, 2, 0, (uint8_t *)header, 4); if (ret != OK) { wlinfo("failread size\n"); @@ -203,7 +203,7 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv) /* Read remaining frame data */ - ret = bcmf_transfer_bytes(sbus, false, 2, 0, (uint8_t*)header+4, len - 4); + ret = bcmf_transfer_bytes(sbus, false, 2, 0, (uint8_t *)header + 4, len - 4); if (ret != OK) { ret = -EIO; @@ -211,7 +211,7 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv) } // wlinfo("Receive frame %p %d\n", sframe, len); - // bcmf_hexdump((uint8_t*)header, header->size, (unsigned int)header); + // bcmf_hexdump((uint8_t *)header, header->size, (unsigned int)header); /* Process and validate header */ @@ -289,7 +289,7 @@ int bcmf_sdpcm_sendframe(FAR struct bcmf_dev_s *priv) dq_entry_t *entry; struct bcmf_sdio_frame *sframe; struct bcmf_sdpcm_header *header; - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; if (sbus->tx_queue.tail == NULL) { @@ -313,7 +313,7 @@ int bcmf_sdpcm_sendframe(FAR struct bcmf_dev_s *priv) entry = sbus->tx_queue.tail; sframe = container_of(entry, struct bcmf_sdio_frame, list_entry); - header = (struct bcmf_sdpcm_header*)sframe->header.base; + header = (struct bcmf_sdpcm_header *)sframe->header.base; /* Set frame sequence id */ @@ -361,9 +361,9 @@ exit_abort: int bcmf_sdpcm_queue_frame(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s *frame, bool control) { - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; - struct bcmf_sdio_frame *sframe = (struct bcmf_sdio_frame*)frame; - struct bcmf_sdpcm_header *header = (struct bcmf_sdpcm_header*)sframe->data; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; + struct bcmf_sdio_frame *sframe = (struct bcmf_sdio_frame *)frame; + struct bcmf_sdpcm_header *header = (struct bcmf_sdpcm_header *)sframe->data; /* Prepare sw header */ @@ -399,9 +399,9 @@ int bcmf_sdpcm_queue_frame(FAR struct bcmf_dev_s *priv, return OK; } -struct bcmf_frame_s* bcmf_sdpcm_alloc_frame(FAR struct bcmf_dev_s *priv, - unsigned int len, bool block, - bool control) +struct bcmf_frame_s *bcmf_sdpcm_alloc_frame(FAR struct bcmf_dev_s *priv, + unsigned int len, bool block, + bool control) { struct bcmf_sdio_frame *sframe; unsigned int header_len = sizeof(struct bcmf_sdpcm_header); @@ -436,14 +436,14 @@ struct bcmf_frame_s* bcmf_sdpcm_alloc_frame(FAR struct bcmf_dev_s *priv, void bcmf_sdpcm_free_frame(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s *frame) { - return bcmf_sdio_free_frame(priv, (struct bcmf_sdio_frame*)frame); + return bcmf_sdio_free_frame(priv, (struct bcmf_sdio_frame *)frame); } -struct bcmf_frame_s* bcmf_sdpcm_get_rx_frame(FAR struct bcmf_dev_s *priv) +struct bcmf_frame_s *bcmf_sdpcm_get_rx_frame(FAR struct bcmf_dev_s *priv) { dq_entry_t *entry; struct bcmf_sdio_frame *sframe; - FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s*)priv->bus; + FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; if (sem_wait(&sbus->queue_mutex)) { @@ -461,4 +461,4 @@ struct bcmf_frame_s* bcmf_sdpcm_get_rx_frame(FAR struct bcmf_dev_s *priv) sframe = container_of(entry, struct bcmf_sdio_frame, list_entry); return &sframe->header; -} \ No newline at end of file +} diff --git a/drivers/wireless/ieee80211/bcmf_sdpcm.h b/drivers/wireless/ieee80211/bcmf_sdpcm.h index f1091fd5199..6144489e406 100644 --- a/drivers/wireless/ieee80211/bcmf_sdpcm.h +++ b/drivers/wireless/ieee80211/bcmf_sdpcm.h @@ -55,9 +55,10 @@ int bcmf_sdpcm_queue_frame(FAR struct bcmf_dev_s *priv, void bcmf_sdpcm_free_frame(FAR struct bcmf_dev_s *priv, struct bcmf_frame_s *frame); -struct bcmf_frame_s* bcmf_sdpcm_alloc_frame(FAR struct bcmf_dev_s *priv, - unsigned int len, bool block, bool control); +struct bcmf_frame_s *bcmf_sdpcm_alloc_frame(FAR struct bcmf_dev_s *priv, + unsigned int len, bool block, + bool control); -struct bcmf_frame_s* bcmf_sdpcm_get_rx_frame(FAR struct bcmf_dev_s *priv); +struct bcmf_frame_s *bcmf_sdpcm_get_rx_frame(FAR struct bcmf_dev_s *priv); -#endif /* __DRIVERS_WIRELESS_IEEE80211_BCMF_SDPCM_H */ \ No newline at end of file +#endif /* __DRIVERS_WIRELESS_IEEE80211_BCMF_SDPCM_H */ diff --git a/drivers/wireless/ieee80211/bcmf_utils.c b/drivers/wireless/ieee80211/bcmf_utils.c index c82908f6abb..16c42d27acc 100644 --- a/drivers/wireless/ieee80211/bcmf_utils.c +++ b/drivers/wireless/ieee80211/bcmf_utils.c @@ -68,7 +68,7 @@ void bcmf_hexdump(uint8_t *data, unsigned int len, unsigned long offset) char char_line[20]; char hex_line[64]; - for(i = 0; i < len; i++) + for (i = 0; i < len; i++) { if (char_count >= LINE_LEN) { @@ -107,9 +107,9 @@ int bcmf_sem_wait(sem_t *sem, unsigned int timeout_ms) (void)clock_gettime(CLOCK_REALTIME, &abstime); - timeout_sec = timeout_ms/1000; + timeout_sec = timeout_ms / 1000; abstime.tv_sec += timeout_sec; - abstime.tv_nsec += 1000 * 1000* (timeout_ms % 1000); + abstime.tv_nsec += 1000 * 1000 * (timeout_ms % 1000); if (abstime.tv_nsec >= 1000 * 1000 * 1000) { @@ -144,7 +144,7 @@ void bcmf_dqueue_push(dq_queue_t *queue, dq_entry_t *entry) queue->head = entry; } -dq_entry_t* bcmf_dqueue_pop_tail(dq_queue_t *queue) +dq_entry_t *bcmf_dqueue_pop_tail(dq_queue_t *queue) { dq_entry_t *entry = queue->tail; @@ -164,4 +164,4 @@ dq_entry_t* bcmf_dqueue_pop_tail(dq_queue_t *queue) } return entry; -} \ No newline at end of file +} diff --git a/drivers/wireless/ieee80211/bcmf_utils.h b/drivers/wireless/ieee80211/bcmf_utils.h index e79c44bdcf3..32fd4ca5624 100644 --- a/drivers/wireless/ieee80211/bcmf_utils.h +++ b/drivers/wireless/ieee80211/bcmf_utils.h @@ -45,7 +45,7 @@ #include #define container_of(ptr, type, member) \ - (type *)( (uint8_t *)(ptr) - offsetof(type,member) ) + (type *)((uint8_t *)(ptr) - offsetof(type, member)) /**************************************************************************** * Public Function Prototypes @@ -55,19 +55,19 @@ void bcmf_hexdump(uint8_t *data, unsigned int len, unsigned long offset); int bcmf_sem_wait(sem_t *sem, unsigned int timeout_ms); -dq_entry_t* bcmf_dqueue_pop_tail(dq_queue_t *queue); +dq_entry_t *bcmf_dqueue_pop_tail(dq_queue_t *queue); void bcmf_dqueue_push(dq_queue_t *queue, dq_entry_t *entry); static inline uint16_t bcmf_getle16(uint16_t *val) { - uint8_t *valb = (uint8_t*)val; + uint8_t *valb = (uint8_t *)val; return (uint16_t)valb[0] << 8 | (uint16_t)valb[1]; } static inline uint16_t bcmf_getle32(uint32_t *val) { - uint16_t *valw = (uint16_t*)val; - return (uint32_t)bcmf_getle16(valw)<<16 | bcmf_getle16(valw+1); + uint16_t *valw = (uint16_t *)val; + return (uint32_t)bcmf_getle16(valw) << 16 | bcmf_getle16(valw + 1); } #endif /* __DRIVERS_WIRELESS_IEEE80211_BCMF_UTILS_H */ \ No newline at end of file diff --git a/drivers/wireless/ieee80211/mmc_sdio.c b/drivers/wireless/ieee80211/mmc_sdio.c index 1848c3f72f2..88d97612e9a 100644 --- a/drivers/wireless/ieee80211/mmc_sdio.c +++ b/drivers/wireless/ieee80211/mmc_sdio.c @@ -7,43 +7,48 @@ #define SDIO_CMD53_TIMEOUT_MS 100 #define SDIO_IDLE_DELAY_MS 50 -struct __attribute__((packed)) sdio_cmd52 { - uint32_t write_data : 8; - uint32_t reserved_8 : 1; - uint32_t register_address : 17; - uint32_t reserved_26 : 1; - uint32_t raw_flag : 1; - uint32_t function_number : 3; - uint32_t rw_flag : 1; +struct __attribute__((packed)) sdio_cmd52 +{ + uint32_t write_data : 8; + uint32_t reserved_8 : 1; + uint32_t register_address : 17; + uint32_t reserved_26 : 1; + uint32_t raw_flag : 1; + uint32_t function_number : 3; + uint32_t rw_flag : 1; }; -struct __attribute__((packed)) sdio_cmd53 { - uint32_t byte_block_count : 9; - uint32_t register_address : 17; - uint32_t op_code : 1; - uint32_t block_mode : 1; - uint32_t function_number : 3; - uint32_t rw_flag : 1; +struct __attribute__((packed)) sdio_cmd53 +{ + uint32_t byte_block_count : 9; + uint32_t register_address : 17; + uint32_t op_code : 1; + uint32_t block_mode : 1; + uint32_t function_number : 3; + uint32_t rw_flag : 1; }; -struct __attribute__((packed)) sdio_resp_R5 { - uint32_t data : 8; - struct { - uint32_t out_of_range : 1; - uint32_t function_number : 1; - uint32_t rfu : 1; - uint32_t error : 1; - uint32_t io_current_state : 2; - uint32_t illegal_command : 1; - uint32_t com_crc_error : 1; - } flags; - uint32_t reserved_16 : 16; +struct __attribute__((packed)) sdio_resp_R5 +{ + uint32_t data : 8; + struct + { + uint32_t out_of_range : 1; + uint32_t function_number : 1; + uint32_t rfu : 1; + uint32_t error : 1; + uint32_t io_current_state : 2; + uint32_t illegal_command : 1; + uint32_t com_crc_error : 1; + } flags; + uint32_t reserved_16 : 16; }; -union sdio_cmd5x { - uint32_t value; - struct sdio_cmd52 cmd52; - struct sdio_cmd53 cmd53; +union sdio_cmd5x +{ + uint32_t value; + struct sdio_cmd52 cmd52; + struct sdio_cmd53 cmd53; }; int sdio_sendcmdpoll(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg) @@ -70,7 +75,7 @@ int sdio_sendcmdpoll(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg) int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write, uint8_t function, uint32_t address, - uint8_t inb, uint8_t* outb) + uint8_t inb, uint8_t *outb) { union sdio_cmd5x arg; struct sdio_resp_R5 resp; @@ -96,7 +101,7 @@ int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write, /* Send CMD52 command */ sdio_sendcmdpoll(dev, SDIO_ACMD52, arg.value); - ret = SDIO_RECVR5(dev, SDIO_ACMD52, (uint32_t*)&resp); + ret = SDIO_RECVR5(dev, SDIO_ACMD52, (uint32_t *)&resp); if (ret != OK) { @@ -110,6 +115,7 @@ int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write, { return -EIO; } + if (resp.flags.function_number || resp.flags.out_of_range) { return -EINVAL; @@ -170,7 +176,7 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write, { // wlinfo("prep write %d %d\n", blocklen, nblocks); sdio_sendcmdpoll(dev, SDIO_ACMD53, (uint32_t)arg.value); - ret = SDIO_RECVR5(dev, SDIO_ACMD53, (uint32_t*)&resp); + ret = SDIO_RECVR5(dev, SDIO_ACMD53, (uint32_t *)&resp); SDIO_DMASENDSETUP(dev, buf, blocklen * nblocks); wkupevent = SDIO_EVENTWAIT(dev, SDIO_CMD53_TIMEOUT_MS); @@ -182,7 +188,7 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write, SDIO_SENDCMD(dev, SDIO_ACMD53, (uint32_t)arg.value); wkupevent = SDIO_EVENTWAIT(dev, SDIO_CMD53_TIMEOUT_MS); - ret = SDIO_RECVR5(dev, SDIO_ACMD53, (uint32_t*)&resp); + ret = SDIO_RECVR5(dev, SDIO_ACMD53, (uint32_t *)&resp); } if (ret != OK) @@ -198,11 +204,13 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write, wlerr("timeout\n"); return -ETIMEDOUT; } + if (resp.flags.error || (wkupevent & SDIOWAIT_ERROR)) { wlerr("error 1\n"); return -EIO; } + if (resp.flags.function_number || resp.flags.out_of_range) { wlerr("error 2\n"); @@ -233,7 +241,7 @@ int sdio_set_wide_bus(struct sdio_dev_s *dev) ret = sdio_io_rw_direct(dev, true, 0, SDIO_CCCR_BUS_IF, value, NULL); if (ret != OK) { - return ret; + return ret; } SDIO_WIDEBUS(dev, true);