bcm4329: driver updates, fixed ts leg after resume with wlan on.
This commit is contained in:
parent
a29154193a
commit
e165752c6f
@ -5,7 +5,7 @@ DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 \
|
||||
-DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS \
|
||||
-Wall -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2 \
|
||||
-DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DWLAN_PFN -DWLAN_PROTECT \
|
||||
-DBCMWAPI_WPI \
|
||||
-DBCMWAPI_WPI -DWLAN_LOW_RSSI_IND -DCSCAN -DSOFTAP_PROTECT\
|
||||
-Idrivers/net/wireless/bcm4329_204 -Idrivers/net/wireless/bcm4329_204/include
|
||||
|
||||
DHDOFILES = dhd_linux.o linux_osl.o bcmutils.o dhd_common.o dhd_custom_gpio.o \
|
||||
|
@ -2,13 +2,13 @@
|
||||
* SDIO access interface for drivers - linux specific (pci only)
|
||||
*
|
||||
* Copyright (C) 1999-2010, Broadcom Corporation
|
||||
*
|
||||
*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to you
|
||||
* under the terms of the GNU General Public License version 2 (the "GPL"),
|
||||
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
|
||||
* following added to such license:
|
||||
*
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give you
|
||||
* permission to link this software with independent modules, and to copy and
|
||||
* distribute the resulting executable under terms of your choice, provided that
|
||||
@ -16,7 +16,7 @@
|
||||
* the license of that module. An independent module is a module which is not
|
||||
* derived from this software. The special exception does not apply to any
|
||||
* modifications of the software.
|
||||
*
|
||||
*
|
||||
* Notwithstanding the above, under no circumstances may you combine this
|
||||
* software in any way with any other Broadcom software provided under a license
|
||||
* other than the GPL, without Broadcom's express prior written consent.
|
||||
@ -600,7 +600,7 @@ int bcmsdh_register_oob_intr(void * dhdp)
|
||||
return -ENODEV;
|
||||
|
||||
set_irq_wake(sdhcinfo->oob_irq, 1);
|
||||
|
||||
myprintf("irq: %d\n", sdhcinfo->oob_irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -609,6 +609,7 @@ static int dhd_set_pfn(dhd_pub_t *dhd, int enabled)
|
||||
wl_pfn_t pfn_element;
|
||||
int i;
|
||||
int config_network = 0;
|
||||
int iov_len = 0;
|
||||
/* Disable pfn */
|
||||
bcm_mkiovar("pfn", (char *)&pfn_enabled, 4, iovbuf, sizeof(iovbuf));
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
|
||||
@ -617,8 +618,9 @@ static int dhd_set_pfn(dhd_pub_t *dhd, int enabled)
|
||||
return 0;
|
||||
|
||||
/* clear pfn */
|
||||
bcm_mkiovar("pfnclear", NULL, 0, iovbuf, sizeof(iovbuf));
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
|
||||
iov_len = bcm_mkiovar("pfnclear", NULL, 0, iovbuf, sizeof(iovbuf));
|
||||
if (iov_len)
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, iov_len);
|
||||
|
||||
/* set pfn parameters */
|
||||
pfn_param.version = htod32(PFN_VERSION);
|
||||
@ -854,6 +856,9 @@ int dhd_set_pktfilter(int add, int id, int offset, char *mask, char *pattern)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define WLC_HT_WEP_RESTRICT 0x01 /* restrict HT with TKIP */
|
||||
#define WLC_HT_TKIP_RESTRICT 0x02 /* restrict HT with WEP */
|
||||
|
||||
int
|
||||
dhd_preinit_ioctls(dhd_pub_t *dhd)
|
||||
{
|
||||
@ -893,6 +898,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
|
||||
uint filter_mode = 1;
|
||||
wl_keep_alive_pkt_t keep_alive_pkt;
|
||||
wl_keep_alive_pkt_t *keep_alive_pktp;
|
||||
int ht_wsec_restrict = WLC_HT_TKIP_RESTRICT | WLC_HT_WEP_RESTRICT;
|
||||
pdhd = dhd;
|
||||
|
||||
|
||||
@ -981,6 +987,9 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
|
||||
#ifdef WLAN_PFN
|
||||
setbit(eventmask, WLC_E_PFN_NET_FOUND);
|
||||
#endif
|
||||
#ifdef WLAN_LOW_RSSI_IND
|
||||
setbit(eventmask, WLC_E_RSSI_LOW);
|
||||
#endif
|
||||
|
||||
bcm_mkiovar("event_msgs", eventmask, WL_EVENTING_MASK_LEN, iovbuf, sizeof(iovbuf));
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
|
||||
@ -1114,6 +1123,10 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
|
||||
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, buf_len);
|
||||
|
||||
/* set HT restrict */
|
||||
bcm_mkiovar("ht_wsec_restrict", (char *)&ht_wsec_restrict, 4, iovbuf, sizeof(iovbuf));
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
|
||||
|
||||
dhd_os_proto_unblock(dhd);
|
||||
return 0;
|
||||
}
|
||||
@ -1146,6 +1159,8 @@ dhd_prot_stop(dhd_pub_t *dhd)
|
||||
*/
|
||||
static unsigned int dhdhtc_power_ctrl_mask = 0;
|
||||
int dhdcdc_power_active_while_plugin = 1;
|
||||
int dhdcdc_wifiLock = 0; /* to keep wifi power mode as PM_FAST and bcn_li_dtim as 0 */
|
||||
|
||||
|
||||
int dhdhtc_update_wifi_power_mode(int is_screen_off)
|
||||
{
|
||||
@ -1166,11 +1181,11 @@ int dhdhtc_update_wifi_power_mode(int is_screen_off)
|
||||
pm_type = PM_OFF;
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM, &pm_type, sizeof(pm_type));
|
||||
} else {
|
||||
if (is_screen_off)
|
||||
if (is_screen_off && !dhdcdc_wifiLock)
|
||||
pm_type = PM_MAX;
|
||||
else
|
||||
pm_type = PM_FAST;
|
||||
myprintf("update pm: %s\n", pm_type==1?"PM_MAX":"PM_FAST");
|
||||
myprintf("update pm: %s, wifiLock: %d\n", pm_type==1?"PM_MAX":"PM_FAST", dhdcdc_wifiLock);
|
||||
dhdcdc_set_ioctl(dhd, 0, WLC_SET_PM, &pm_type, sizeof(pm_type));
|
||||
}
|
||||
|
||||
@ -1215,7 +1230,7 @@ int dhdhtc_update_dtim_listen_interval(int is_screen_off)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (wl_iw_is_during_wifi_call() || !is_screen_off)
|
||||
if (wl_iw_is_during_wifi_call() || !is_screen_off || dhdcdc_wifiLock)
|
||||
bcn_li_dtim = 0;
|
||||
else
|
||||
bcn_li_dtim = 3;
|
||||
|
@ -49,6 +49,10 @@ extern void htc_linux_periodic_wakeup_stop(void);
|
||||
|
||||
int dhd_msg_level;
|
||||
|
||||
#if defined(CSCAN)
|
||||
#include <wl_iw.h>
|
||||
#endif
|
||||
|
||||
char fw_path[MOD_PARAM_PATHLEN];
|
||||
char nv_path[MOD_PARAM_PATHLEN];
|
||||
|
||||
@ -57,6 +61,12 @@ uint32 dhd_conn_event;
|
||||
uint32 dhd_conn_status;
|
||||
uint32 dhd_conn_reason;
|
||||
|
||||
#define htod32(i) i
|
||||
#define htod16(i) i
|
||||
#define dtoh32(i) i
|
||||
#define dtoh16(i) i
|
||||
#define strtoul(nptr, endptr, base) bcm_strtoul((nptr), (endptr), (base))
|
||||
|
||||
#ifdef DHD_DEBUG
|
||||
const char dhd_version[] = "Dongle Host Driver, version " EPI_VERSION_STR "\nCompiled on "
|
||||
__DATE__ " at " __TIME__;
|
||||
@ -926,3 +936,254 @@ wl_event_to_host_order(wl_event_msg_t *evt)
|
||||
evt->datalen = ntoh32(evt->datalen);
|
||||
evt->version = ntoh16(evt->version);
|
||||
}
|
||||
|
||||
/* Androd ComboSCAN support */
|
||||
#if defined(CSCAN)
|
||||
|
||||
/*
|
||||
* data parsing from ComboScan tlv list
|
||||
*/
|
||||
int
|
||||
wl_iw_parse_data_tlv(char** list_str, void *dst, int dst_size, const char token, \
|
||||
int input_size, int *bytes_left)
|
||||
{
|
||||
char* str = *list_str;
|
||||
uint16 short_temp;
|
||||
uint32 int_temp;
|
||||
|
||||
if ((list_str == NULL) || (*list_str == NULL) ||(bytes_left == NULL) || (*bytes_left < 0)) {
|
||||
DHD_ERROR(("%s error paramters\n", __FUNCTION__));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Clean all dest bytes */
|
||||
memset(dst, 0, dst_size);
|
||||
while (*bytes_left > 0) {
|
||||
|
||||
if (str[0] != token) {
|
||||
DHD_TRACE(("%s NOT Type=%d get=%d left_parse=%d \n", __FUNCTION__, \
|
||||
token, str[0], *bytes_left));
|
||||
return -1;
|
||||
}
|
||||
|
||||
*bytes_left -= 1;
|
||||
str += 1;
|
||||
|
||||
if (input_size == 1) {
|
||||
memcpy(dst, str, input_size);
|
||||
}
|
||||
else if (input_size == 2) {
|
||||
memcpy(dst, (char *)htod16(memcpy(&short_temp, str, input_size)), \
|
||||
input_size);
|
||||
}
|
||||
else if (input_size == 4) {
|
||||
memcpy(dst, (char *)htod32(memcpy(&int_temp, str, input_size)), \
|
||||
input_size);
|
||||
}
|
||||
|
||||
*bytes_left -= input_size;
|
||||
str += input_size;
|
||||
*list_str = str;
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* channel list parsing from cscan tlv list
|
||||
*/
|
||||
int
|
||||
wl_iw_parse_channel_list_tlv(char** list_str, uint16* channel_list, \
|
||||
int channel_num, int *bytes_left)
|
||||
{
|
||||
char* str = *list_str;
|
||||
int idx = 0;
|
||||
if ((list_str == NULL) || (*list_str == NULL) ||(bytes_left == NULL) || (*bytes_left < 0)) {
|
||||
DHD_ERROR(("%s error paramters\n", __FUNCTION__));
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (*bytes_left > 0) {
|
||||
|
||||
if (str[0] != CSCAN_TLV_TYPE_CHANNEL_IE) {
|
||||
*list_str = str;
|
||||
DHD_TRACE(("End channel=%d left_parse=%d %d\n", idx, *bytes_left, str[0]));
|
||||
return idx;
|
||||
}
|
||||
/* Get proper CSCAN_TLV_TYPE_CHANNEL_IE */
|
||||
*bytes_left -= 1;
|
||||
str += 1;
|
||||
|
||||
if (str[0] == 0) {
|
||||
/* All channels */
|
||||
channel_list[idx] = 0x0;
|
||||
}
|
||||
else {
|
||||
channel_list[idx] = (uint16)str[0];
|
||||
DHD_TRACE(("%s channel=%d \n", __FUNCTION__, channel_list[idx]));
|
||||
}
|
||||
*bytes_left -= 1;
|
||||
str += 1;
|
||||
|
||||
if (idx++ > 255) {
|
||||
DHD_ERROR(("%s Too many channels \n", __FUNCTION__));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
*list_str = str;
|
||||
return idx;
|
||||
}
|
||||
|
||||
/*
|
||||
* SSIDs list parsing from cscan tlv list
|
||||
*/
|
||||
int
|
||||
wl_iw_parse_ssid_list_tlv(char** list_str, wlc_ssid_t* ssid, int max, int *bytes_left)
|
||||
{
|
||||
char* str = *list_str;
|
||||
int idx = 0;
|
||||
if ((list_str == NULL) || (*list_str == NULL) || (*bytes_left < 0)) {
|
||||
DHD_ERROR(("%s error paramters\n", __FUNCTION__));
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (*bytes_left > 0) {
|
||||
|
||||
if (str[0] != CSCAN_TLV_TYPE_SSID_IE) {
|
||||
*list_str = str;
|
||||
DHD_TRACE(("nssid=%d left_parse=%d %d\n", idx, *bytes_left, str[0]));
|
||||
return idx;
|
||||
}
|
||||
|
||||
/* Get proper CSCAN_TLV_TYPE_SSID_IE */
|
||||
*bytes_left -= 1;
|
||||
str += 1;
|
||||
|
||||
if (str[0] == 0) {
|
||||
/* Broadcast SSID */
|
||||
ssid[idx].SSID_len = 0;
|
||||
memset((char*)ssid[idx].SSID, 0x0, DOT11_MAX_SSID_LEN);
|
||||
*bytes_left -= 1;
|
||||
str += 1;
|
||||
DHD_TRACE(("BROADCAST SCAN left=%d\n", *bytes_left));
|
||||
printk (KERN_INFO"[WLAN] BROADCAST SCAN\n");
|
||||
}
|
||||
else if (str[0] <= DOT11_MAX_SSID_LEN) {
|
||||
printk (KERN_INFO"[WLAN] Specific SSID scan\n");
|
||||
/* Get proper SSID size */
|
||||
ssid[idx].SSID_len = str[0];
|
||||
*bytes_left -= 1;
|
||||
str += 1;
|
||||
|
||||
/* Get SSID */
|
||||
if (ssid[idx].SSID_len > *bytes_left) {
|
||||
DHD_ERROR(("%s out of memory range len=%d but left=%d\n", \
|
||||
__FUNCTION__, ssid[idx].SSID_len, *bytes_left));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy((char*)ssid[idx].SSID, str, ssid[idx].SSID_len);
|
||||
|
||||
*bytes_left -= ssid[idx].SSID_len;
|
||||
str += ssid[idx].SSID_len;
|
||||
DHD_TRACE(("%s :size=%d left=%d\n", (char*)ssid[idx].SSID, \
|
||||
ssid[idx].SSID_len, *bytes_left));
|
||||
}
|
||||
else {
|
||||
DHD_ERROR(("### SSID size more that %d\n", str[0]));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (idx++ > max) {
|
||||
DHD_ERROR(("%s number of SSIDs more that %d\n", __FUNCTION__, idx));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
*list_str = str;
|
||||
return idx;
|
||||
}
|
||||
|
||||
/* Parse a comma-separated list from list_str into ssid array, starting
|
||||
* at index idx. Max specifies size of the ssid array. Parses ssids
|
||||
* and returns updated idx; if idx >= max not all fit, the excess have
|
||||
* not been copied. Returns -1 on empty string, or on ssid too long.
|
||||
*/
|
||||
int
|
||||
wl_iw_parse_ssid_list(char** list_str, wlc_ssid_t* ssid, int idx, int max)
|
||||
{
|
||||
char* str, *ptr;
|
||||
|
||||
if ((list_str == NULL) || (*list_str == NULL))
|
||||
return -1;
|
||||
|
||||
for (str = *list_str; str != NULL; str = ptr) {
|
||||
|
||||
/* check for next TAG */
|
||||
if (!strncmp(str, GET_CHANNEL, strlen(GET_CHANNEL))) {
|
||||
*list_str = str + strlen(GET_CHANNEL);
|
||||
return idx;
|
||||
}
|
||||
|
||||
if ((ptr = strchr(str, ',')) != NULL) {
|
||||
*ptr++ = '\0';
|
||||
}
|
||||
|
||||
if (strlen(str) > DOT11_MAX_SSID_LEN) {
|
||||
DHD_ERROR(("ssid <%s> exceeds %d\n", str, DOT11_MAX_SSID_LEN));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strlen(str) == 0)
|
||||
ssid[idx].SSID_len = 0;
|
||||
|
||||
if (idx < max) {
|
||||
strcpy((char*)ssid[idx].SSID, str);
|
||||
ssid[idx].SSID_len = strlen(str);
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse channel list from iwpriv CSCAN
|
||||
*/
|
||||
int
|
||||
wl_iw_parse_channel_list(char** list_str, uint16* channel_list, int channel_num)
|
||||
{
|
||||
int num;
|
||||
int val;
|
||||
char* str;
|
||||
char* endptr = NULL;
|
||||
|
||||
if ((list_str == NULL)||(*list_str == NULL))
|
||||
return -1;
|
||||
|
||||
str = *list_str;
|
||||
num = 0;
|
||||
while (strncmp(str, GET_NPROBE, strlen(GET_NPROBE))) {
|
||||
val = (int)strtoul(str, &endptr, 0);
|
||||
if (endptr == str) {
|
||||
printk(KERN_INFO"could not parse channel number starting at"
|
||||
" substring \"%s\" in list:\n%s\n",
|
||||
str, *list_str);
|
||||
return -1;
|
||||
}
|
||||
str = endptr + strspn(endptr, " ,");
|
||||
|
||||
if (num == channel_num) {
|
||||
DHD_ERROR(("too many channels (more than %d) in channel list:\n%s\n",
|
||||
channel_num, *list_str));
|
||||
return -1;
|
||||
}
|
||||
|
||||
channel_list[num++] = (uint16)val;
|
||||
}
|
||||
*list_str = str;
|
||||
return num;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -99,6 +99,14 @@ int wifi_get_dot11n_enable(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wifi_get_cscan_enable(void)
|
||||
{
|
||||
if (wifi_control_data && wifi_control_data->cscan_enable) {
|
||||
return wifi_control_data->cscan_enable;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wifi_set_carddetect(int on)
|
||||
{
|
||||
myprintf("%s = %d\n", __FUNCTION__, on);
|
||||
@ -853,6 +861,8 @@ _dhd_sysioc_thread(void *data)
|
||||
}
|
||||
dhd_os_wake_unlock(&dhd->pub);
|
||||
}
|
||||
|
||||
myprintf("%s exit\n", __func__);
|
||||
complete_and_exit(&dhd->sysioc_exited, 0);
|
||||
}
|
||||
|
||||
@ -865,6 +875,14 @@ dhd_set_mac_address(struct net_device *dev, void *addr)
|
||||
struct sockaddr *sa = (struct sockaddr *)addr;
|
||||
int ifidx;
|
||||
|
||||
myprintf("enter %s\n", __func__);
|
||||
|
||||
/* BRCM: anthony, add for debug, reject if down */
|
||||
if ( !dhd->pub.up || (dhd->pub.busstate == DHD_BUS_DOWN)) {
|
||||
printk("%s: dhd is down. skip it.\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ifidx = dhd_net2idx(dhd, dev);
|
||||
if (ifidx == DHD_BAD_IF)
|
||||
return -1;
|
||||
@ -883,6 +901,15 @@ dhd_set_multicast_list(struct net_device *dev)
|
||||
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
|
||||
int ifidx;
|
||||
|
||||
|
||||
myprintf("enter %s\n", __func__);
|
||||
|
||||
/* BRCM: anthoy, add for debug, reject if down */
|
||||
if ( !dhd->pub.up || (dhd->pub.busstate == DHD_BUS_DOWN) ) {
|
||||
printk("%s: dhd is down. skip it.\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
ifidx = dhd_net2idx(dhd, dev);
|
||||
if (ifidx == DHD_BAD_IF)
|
||||
return;
|
||||
@ -1208,7 +1235,7 @@ dhd_watchdog_thread(void *data)
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
myprintf("%s exit\n", __func__);
|
||||
complete_and_exit(&dhd->watchdog_exited, 0);
|
||||
}
|
||||
|
||||
@ -1277,7 +1304,7 @@ dhd_dpc_thread(void *data)
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
myprintf("%s exit\n", __func__);
|
||||
complete_and_exit(&dhd->dpc_exited, 0);
|
||||
}
|
||||
|
||||
@ -1525,6 +1552,13 @@ dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||
int ifidx;
|
||||
bool is_set_key_cmd;
|
||||
|
||||
|
||||
/* BRCM: anthoy, add for debug, reject if down */
|
||||
if ( !dhd->pub.up || (dhd->pub.busstate == DHD_BUS_DOWN)){
|
||||
myprintf("%s: dhd is down. skip it.\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ifidx = dhd_net2idx(dhd, net);
|
||||
DHD_TRACE(("%s: ifidx %d, cmd 0x%04x\n", __FUNCTION__, ifidx, cmd));
|
||||
|
||||
@ -2418,6 +2452,11 @@ dhd_os_wd_timer(void *bus, uint wdtick)
|
||||
dhd_info_t *dhd = (dhd_info_t *)pub->info;
|
||||
static uint save_dhd_watchdog_ms = 0;
|
||||
|
||||
/* BRCM: anthony: stop timer, if bus down. */
|
||||
if (pub->busstate == DHD_BUS_DOWN) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Totally stop the timer */
|
||||
if (!wdtick && dhd->wd_timer_valid == TRUE) {
|
||||
del_timer_sync(&dhd->timer);
|
||||
|
@ -2,13 +2,13 @@
|
||||
* DHD Bus Module for SDIO
|
||||
*
|
||||
* Copyright (C) 1999-2010, Broadcom Corporation
|
||||
*
|
||||
*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to you
|
||||
* under the terms of the GNU General Public License version 2 (the "GPL"),
|
||||
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
|
||||
* following added to such license:
|
||||
*
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give you
|
||||
* permission to link this software with independent modules, and to copy and
|
||||
* distribute the resulting executable under terms of your choice, provided that
|
||||
@ -16,7 +16,7 @@
|
||||
* the license of that module. An independent module is a module which is not
|
||||
* derived from this software. The special exception does not apply to any
|
||||
* modifications of the software.
|
||||
*
|
||||
*
|
||||
* Notwithstanding the above, under no circumstances may you combine this
|
||||
* software in any way with any other Broadcom software provided under a license
|
||||
* other than the GPL, without Broadcom's express prior written consent.
|
||||
@ -2445,6 +2445,8 @@ dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
|
||||
if (enforce_mutex)
|
||||
dhd_os_sdlock(bus->dhd);
|
||||
|
||||
myprintf("%s enter\n", __func__);
|
||||
|
||||
BUS_WAKE(bus);
|
||||
|
||||
/* Enable clock for device interrupts */
|
||||
@ -3798,6 +3800,15 @@ dhdsdio_hostmail(dhd_bus_t *bus)
|
||||
return intstatus;
|
||||
}
|
||||
|
||||
#define MMC_RECOVER
|
||||
|
||||
|
||||
#ifdef MMC_RECOVER
|
||||
static uint8 prev_tx_seq = 0;
|
||||
static uint8 prev_tx_max = 0;
|
||||
static int max_equal_count = 0;
|
||||
#endif
|
||||
|
||||
static int dhdsdio_regfail = 0;
|
||||
bool
|
||||
dhdsdio_dpc(dhd_bus_t *bus)
|
||||
@ -3957,6 +3968,26 @@ clkwait:
|
||||
bcmsdh_intr_enable(sdh);
|
||||
}
|
||||
|
||||
#ifdef MMC_RECOVER
|
||||
if ((bus->tx_max == bus->tx_seq)&&(bus->tx_max == prev_tx_max)&&(bus->tx_seq == prev_tx_seq)) {
|
||||
max_equal_count++;
|
||||
myprintf("bad case, count %d\n", max_equal_count);
|
||||
myprintf("framecnt = %d\n", framecnt);
|
||||
} else {
|
||||
max_equal_count = 0;
|
||||
}
|
||||
|
||||
prev_tx_max = bus->tx_max;
|
||||
prev_tx_seq = bus->tx_seq;
|
||||
|
||||
if (max_equal_count >= 3) {
|
||||
bus->tx_seq = (bus->tx_seq + 1) % SDPCM_SEQUENCE_WRAP;
|
||||
//bus->tx_max = bus->tx_seq + 2;
|
||||
max_equal_count = 0;
|
||||
myprintf("reset count\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (DATAOK(bus) && bus->ctrl_frame_stat) {
|
||||
int ret, i;
|
||||
|
||||
@ -4102,7 +4133,7 @@ dhdsdio_isr(void *arg)
|
||||
#else
|
||||
bus->dpc_sched = TRUE;
|
||||
dhd_sched_dpc(bus->dhd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@ -5012,9 +5043,11 @@ dhdsdio_release(dhd_bus_t *bus, osl_t *osh)
|
||||
|
||||
if (bus->dhd) {
|
||||
|
||||
dhdsdio_release_dongle(bus, osh);
|
||||
|
||||
/* BRCM: anthony: move dhd_detach before dhdsdio_release_dongle
|
||||
* to avoid unnecessary commands running.
|
||||
*/
|
||||
dhd_detach(bus->dhd);
|
||||
dhdsdio_release_dongle(bus, osh);
|
||||
bus->dhd = NULL;
|
||||
}
|
||||
|
||||
@ -5311,6 +5344,91 @@ dhd_bus_set_nvram_params(struct dhd_bus * bus, const char *nvram_params)
|
||||
bus->nvram_params = nvram_params;
|
||||
}
|
||||
|
||||
#define WIFI_MAC_PARAM_STR "macaddr="
|
||||
#define WIFI_MAX_MAC_LEN 17 /* XX:XX:XX:XX:XX:XX */
|
||||
|
||||
#define NVS_LEN_OFFSET 0x0C
|
||||
#define NVS_DATA_OFFSET 0x40
|
||||
|
||||
extern unsigned char *get_wifi_nvs_ram(void);
|
||||
|
||||
static uint
|
||||
get_mac_from_wifi_nvs_ram(char* buf, unsigned int buf_len)
|
||||
{
|
||||
unsigned char *nvs_ptr;
|
||||
unsigned char *mac_ptr;
|
||||
uint len = 0;
|
||||
|
||||
if (!buf || !buf_len) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
nvs_ptr = get_wifi_nvs_ram();
|
||||
if (nvs_ptr) {
|
||||
nvs_ptr += NVS_DATA_OFFSET;
|
||||
}
|
||||
|
||||
mac_ptr = strstr(nvs_ptr, WIFI_MAC_PARAM_STR);
|
||||
if (mac_ptr) {
|
||||
mac_ptr += strlen(WIFI_MAC_PARAM_STR);
|
||||
|
||||
/* skip leading space */
|
||||
while (mac_ptr[0] == ' ') {
|
||||
mac_ptr++;
|
||||
}
|
||||
|
||||
/* locate end-of-line */
|
||||
len = 0;
|
||||
while (mac_ptr[len] != '\r' && mac_ptr[len] != '\n' &&
|
||||
mac_ptr[len] != '\0') {
|
||||
len++;
|
||||
}
|
||||
|
||||
if (len > buf_len) {
|
||||
len = buf_len;
|
||||
}
|
||||
memcpy(buf, mac_ptr, len);
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/*
|
||||
* Modify mac address attribute in buffer
|
||||
* return : length of modified buffer
|
||||
*/
|
||||
static uint
|
||||
modify_mac_attr(char* buf, unsigned buf_len, char *mac, unsigned int mac_len)
|
||||
{
|
||||
unsigned char *mac_ptr;
|
||||
uint len;
|
||||
|
||||
if (!buf || !mac) {
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
mac_ptr = strstr(buf, WIFI_MAC_PARAM_STR);
|
||||
if (mac_ptr) {
|
||||
mac_ptr += strlen(WIFI_MAC_PARAM_STR);
|
||||
|
||||
/* locate end-of-line */
|
||||
len = 0;
|
||||
while (mac_ptr[len] != '\r' && mac_ptr[len] != '\n' &&
|
||||
mac_ptr[len] != '\0') {
|
||||
len++;
|
||||
}
|
||||
|
||||
if (len != mac_len) {
|
||||
/* shift remaining data */
|
||||
memmove(&mac_ptr[mac_len + 1], &mac_ptr[len + 1], buf_len - len);
|
||||
buf_len = buf_len - len + mac_len;
|
||||
}
|
||||
memcpy(mac_ptr, mac, mac_len);
|
||||
}
|
||||
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
static int
|
||||
dhdsdio_download_nvram(struct dhd_bus *bus)
|
||||
{
|
||||
@ -5322,6 +5440,9 @@ dhdsdio_download_nvram(struct dhd_bus *bus)
|
||||
char *nv_path;
|
||||
bool nvram_file_exists;
|
||||
|
||||
char mac[WIFI_MAX_MAC_LEN];
|
||||
unsigned mac_len;
|
||||
|
||||
nv_path = bus->nv_path;
|
||||
|
||||
nvram_file_exists = ((nv_path != NULL) && (nv_path[0] != '\0'));
|
||||
@ -5344,6 +5465,11 @@ dhdsdio_download_nvram(struct dhd_bus *bus)
|
||||
/* Download variables */
|
||||
if (nvram_file_exists) {
|
||||
len = dhd_os_get_image_block(memblock, MEMBLOCK, image);
|
||||
|
||||
mac_len = get_mac_from_wifi_nvs_ram(mac, WIFI_MAX_MAC_LEN);
|
||||
if (mac_len > 0) {
|
||||
len = modify_mac_attr(memblock, len, mac, mac_len);
|
||||
}
|
||||
}
|
||||
else {
|
||||
len = strlen(bus->nvram_params);
|
||||
@ -5564,7 +5690,7 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
|
||||
#if !defined(IGNORE_ETH0_DOWN)
|
||||
/* Restore flow control */
|
||||
dhd_txflowcontrol(bus->dhd, 0, OFF);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DHD_TRACE(("%s: WLAN ON DONE\n", __FUNCTION__));
|
||||
} else
|
||||
|
@ -2,13 +2,13 @@
|
||||
* Broadcom Event protocol definitions
|
||||
*
|
||||
* Copyright (C) 1999-2009, Broadcom Corporation
|
||||
*
|
||||
*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to you
|
||||
* under the terms of the GNU General Public License version 2 (the "GPL"),
|
||||
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
|
||||
* following added to such license:
|
||||
*
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give you
|
||||
* permission to link this software with independent modules, and to copy and
|
||||
* distribute the resulting executable under terms of your choice, provided that
|
||||
@ -16,7 +16,7 @@
|
||||
* the license of that module. An independent module is a module which is not
|
||||
* derived from this software. The special exception does not apply to any
|
||||
* modifications of the software.
|
||||
*
|
||||
*
|
||||
* Notwithstanding the above, under no circumstances may you combine this
|
||||
* software in any way with any other Broadcom software provided under a license
|
||||
* other than the GPL, without Broadcom's express prior written consent.
|
||||
@ -41,26 +41,26 @@
|
||||
|
||||
#include <packed_section_start.h>
|
||||
|
||||
#define BCM_EVENT_MSG_VERSION 1
|
||||
#define BCM_MSG_IFNAME_MAX 16
|
||||
#define BCM_EVENT_MSG_VERSION 1
|
||||
#define BCM_MSG_IFNAME_MAX 16
|
||||
|
||||
|
||||
#define WLC_EVENT_MSG_LINK 0x01
|
||||
#define WLC_EVENT_MSG_FLUSHTXQ 0x02
|
||||
#define WLC_EVENT_MSG_GROUP 0x04
|
||||
#define WLC_EVENT_MSG_LINK 0x01
|
||||
#define WLC_EVENT_MSG_FLUSHTXQ 0x02
|
||||
#define WLC_EVENT_MSG_GROUP 0x04
|
||||
|
||||
|
||||
typedef BWL_PRE_PACKED_STRUCT struct
|
||||
{
|
||||
uint16 version;
|
||||
uint16 flags;
|
||||
uint32 event_type;
|
||||
uint32 status;
|
||||
uint32 reason;
|
||||
uint32 auth_type;
|
||||
uint32 datalen;
|
||||
struct ether_addr addr;
|
||||
char ifname[BCM_MSG_IFNAME_MAX];
|
||||
uint16 flags;
|
||||
uint32 event_type;
|
||||
uint32 status;
|
||||
uint32 reason;
|
||||
uint32 auth_type;
|
||||
uint32 datalen;
|
||||
struct ether_addr addr;
|
||||
char ifname[BCM_MSG_IFNAME_MAX];
|
||||
} BWL_POST_PACKED_STRUCT wl_event_msg_t;
|
||||
|
||||
|
||||
@ -68,145 +68,146 @@ typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
|
||||
struct ether_header eth;
|
||||
bcmeth_hdr_t bcm_hdr;
|
||||
wl_event_msg_t event;
|
||||
|
||||
|
||||
} BWL_POST_PACKED_STRUCT bcm_event_t;
|
||||
|
||||
#define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
|
||||
|
||||
|
||||
#define WLC_E_SET_SSID 0
|
||||
#define WLC_E_JOIN 1
|
||||
#define WLC_E_START 2
|
||||
#define WLC_E_AUTH 3
|
||||
#define WLC_E_AUTH_IND 4
|
||||
#define WLC_E_DEAUTH 5
|
||||
#define WLC_E_DEAUTH_IND 6
|
||||
#define WLC_E_ASSOC 7
|
||||
#define WLC_E_ASSOC_IND 8
|
||||
#define WLC_E_REASSOC 9
|
||||
#define WLC_E_REASSOC_IND 10
|
||||
#define WLC_E_DISASSOC 11
|
||||
#define WLC_E_DISASSOC_IND 12
|
||||
#define WLC_E_QUIET_START 13
|
||||
#define WLC_E_QUIET_END 14
|
||||
#define WLC_E_BEACON_RX 15
|
||||
#define WLC_E_LINK 16
|
||||
#define WLC_E_MIC_ERROR 17
|
||||
#define WLC_E_NDIS_LINK 18
|
||||
#define WLC_E_ROAM 19
|
||||
#define WLC_E_TXFAIL 20
|
||||
#define WLC_E_PMKID_CACHE 21
|
||||
#define WLC_E_RETROGRADE_TSF 22
|
||||
#define WLC_E_PRUNE 23
|
||||
#define WLC_E_AUTOAUTH 24
|
||||
#define WLC_E_EAPOL_MSG 25
|
||||
#define WLC_E_SCAN_COMPLETE 26
|
||||
#define WLC_E_ADDTS_IND 27
|
||||
#define WLC_E_DELTS_IND 28
|
||||
#define WLC_E_BCNSENT_IND 29
|
||||
#define WLC_E_BCNRX_MSG 30
|
||||
#define WLC_E_BCNLOST_MSG 31
|
||||
#define WLC_E_ROAM_PREP 32
|
||||
#define WLC_E_PFN_NET_FOUND 33
|
||||
#define WLC_E_PFN_NET_LOST 34
|
||||
#define WLC_E_SET_SSID 0
|
||||
#define WLC_E_JOIN 1
|
||||
#define WLC_E_START 2
|
||||
#define WLC_E_AUTH 3
|
||||
#define WLC_E_AUTH_IND 4
|
||||
#define WLC_E_DEAUTH 5
|
||||
#define WLC_E_DEAUTH_IND 6
|
||||
#define WLC_E_ASSOC 7
|
||||
#define WLC_E_ASSOC_IND 8
|
||||
#define WLC_E_REASSOC 9
|
||||
#define WLC_E_REASSOC_IND 10
|
||||
#define WLC_E_DISASSOC 11
|
||||
#define WLC_E_DISASSOC_IND 12
|
||||
#define WLC_E_QUIET_START 13
|
||||
#define WLC_E_QUIET_END 14
|
||||
#define WLC_E_BEACON_RX 15
|
||||
#define WLC_E_LINK 16
|
||||
#define WLC_E_MIC_ERROR 17
|
||||
#define WLC_E_NDIS_LINK 18
|
||||
#define WLC_E_ROAM 19
|
||||
#define WLC_E_TXFAIL 20
|
||||
#define WLC_E_PMKID_CACHE 21
|
||||
#define WLC_E_RETROGRADE_TSF 22
|
||||
#define WLC_E_PRUNE 23
|
||||
#define WLC_E_AUTOAUTH 24
|
||||
#define WLC_E_EAPOL_MSG 25
|
||||
#define WLC_E_SCAN_COMPLETE 26
|
||||
#define WLC_E_ADDTS_IND 27
|
||||
#define WLC_E_DELTS_IND 28
|
||||
#define WLC_E_BCNSENT_IND 29
|
||||
#define WLC_E_BCNRX_MSG 30
|
||||
#define WLC_E_BCNLOST_MSG 31
|
||||
#define WLC_E_ROAM_PREP 32
|
||||
#define WLC_E_PFN_NET_FOUND 33
|
||||
#define WLC_E_PFN_NET_LOST 34
|
||||
#define WLC_E_RESET_COMPLETE 35
|
||||
#define WLC_E_JOIN_START 36
|
||||
#define WLC_E_ROAM_START 37
|
||||
#define WLC_E_ASSOC_START 38
|
||||
#define WLC_E_IBSS_ASSOC 39
|
||||
#define WLC_E_RADIO 40
|
||||
#define WLC_E_PSM_WATCHDOG 41
|
||||
#define WLC_E_PROBREQ_MSG 44
|
||||
#define WLC_E_PSM_WATCHDOG 41
|
||||
#define WLC_E_PROBREQ_MSG 44
|
||||
#define WLC_E_SCAN_CONFIRM_IND 45
|
||||
#define WLC_E_PSK_SUP 46
|
||||
#define WLC_E_PSK_SUP 46
|
||||
#define WLC_E_COUNTRY_CODE_CHANGED 47
|
||||
#define WLC_E_EXCEEDED_MEDIUM_TIME 48
|
||||
#define WLC_E_ICV_ERROR 49
|
||||
#define WLC_E_UNICAST_DECODE_ERROR 50
|
||||
#define WLC_E_MULTICAST_DECODE_ERROR 51
|
||||
#define WLC_E_EXCEEDED_MEDIUM_TIME 48
|
||||
#define WLC_E_ICV_ERROR 49
|
||||
#define WLC_E_UNICAST_DECODE_ERROR 50
|
||||
#define WLC_E_MULTICAST_DECODE_ERROR 51
|
||||
#define WLC_E_TRACE 52
|
||||
#define WLC_E_IF 54
|
||||
#define WLC_E_IF 54
|
||||
#define WLC_E_ASSOCREQ_IE 55 /* penguin, Send up assoc ie */
|
||||
#define WLC_E_RSSI 56
|
||||
#define WLC_E_PFN_SCAN_COMPLETE 57
|
||||
#define WLC_E_ACTION_FRAME 58
|
||||
#define WLC_E_ACTION_FRAME_COMPLETE 59
|
||||
#define WLC_E_RSSI 56
|
||||
#define WLC_E_PFN_SCAN_COMPLETE 57
|
||||
#define WLC_E_ACTION_FRAME 58
|
||||
#define WLC_E_ACTION_FRAME_COMPLETE 59
|
||||
#define WLC_E_RSSI_LOW 60 /* penguin, Send up rssi low event */
|
||||
|
||||
#define WLC_E_ESCAN_RESULT 69
|
||||
#define WLC_E_WAKE_EVENT 70
|
||||
#define WLC_E_LAST 71
|
||||
|
||||
#define WLC_E_ESCAN_RESULT 69
|
||||
#define WLC_E_WAKE_EVENT 70
|
||||
#define WLC_E_LAST 71
|
||||
|
||||
|
||||
|
||||
#define WLC_E_STATUS_SUCCESS 0
|
||||
#define WLC_E_STATUS_FAIL 1
|
||||
#define WLC_E_STATUS_TIMEOUT 2
|
||||
#define WLC_E_STATUS_NO_NETWORKS 3
|
||||
#define WLC_E_STATUS_ABORT 4
|
||||
#define WLC_E_STATUS_NO_ACK 5
|
||||
#define WLC_E_STATUS_UNSOLICITED 6
|
||||
#define WLC_E_STATUS_ATTEMPT 7
|
||||
#define WLC_E_STATUS_PARTIAL 8
|
||||
#define WLC_E_STATUS_NEWSCAN 9
|
||||
#define WLC_E_STATUS_NEWASSOC 10
|
||||
#define WLC_E_STATUS_11HQUIET 11
|
||||
#define WLC_E_STATUS_SUPPRESS 12
|
||||
#define WLC_E_STATUS_NOCHANS 13
|
||||
#define WLC_E_STATUS_CCXFASTRM 14
|
||||
#define WLC_E_STATUS_CS_ABORT 15
|
||||
|
||||
#define WLC_E_STATUS_SUCCESS 0
|
||||
#define WLC_E_STATUS_FAIL 1
|
||||
#define WLC_E_STATUS_TIMEOUT 2
|
||||
#define WLC_E_STATUS_NO_NETWORKS 3
|
||||
#define WLC_E_STATUS_ABORT 4
|
||||
#define WLC_E_STATUS_NO_ACK 5
|
||||
#define WLC_E_STATUS_UNSOLICITED 6
|
||||
#define WLC_E_STATUS_ATTEMPT 7
|
||||
#define WLC_E_STATUS_PARTIAL 8
|
||||
#define WLC_E_STATUS_NEWSCAN 9
|
||||
#define WLC_E_STATUS_NEWASSOC 10
|
||||
#define WLC_E_STATUS_11HQUIET 11
|
||||
#define WLC_E_STATUS_SUPPRESS 12
|
||||
#define WLC_E_STATUS_NOCHANS 13
|
||||
#define WLC_E_STATUS_CCXFASTRM 14
|
||||
#define WLC_E_STATUS_CS_ABORT 15
|
||||
|
||||
|
||||
#define WLC_E_REASON_INITIAL_ASSOC 0
|
||||
#define WLC_E_REASON_LOW_RSSI 1
|
||||
#define WLC_E_REASON_DEAUTH 2
|
||||
#define WLC_E_REASON_DISASSOC 3
|
||||
#define WLC_E_REASON_BCNS_LOST 4
|
||||
#define WLC_E_REASON_FAST_ROAM_FAILED 5
|
||||
#define WLC_E_REASON_DIRECTED_ROAM 6
|
||||
#define WLC_E_REASON_TSPEC_REJECTED 7
|
||||
#define WLC_E_REASON_BETTER_AP 8
|
||||
#define WLC_E_REASON_INITIAL_ASSOC 0
|
||||
#define WLC_E_REASON_LOW_RSSI 1
|
||||
#define WLC_E_REASON_DEAUTH 2
|
||||
#define WLC_E_REASON_DISASSOC 3
|
||||
#define WLC_E_REASON_BCNS_LOST 4
|
||||
#define WLC_E_REASON_FAST_ROAM_FAILED 5
|
||||
#define WLC_E_REASON_DIRECTED_ROAM 6
|
||||
#define WLC_E_REASON_TSPEC_REJECTED 7
|
||||
#define WLC_E_REASON_BETTER_AP 8
|
||||
|
||||
|
||||
#define WLC_E_PRUNE_ENCR_MISMATCH 1
|
||||
#define WLC_E_PRUNE_BCAST_BSSID 2
|
||||
#define WLC_E_PRUNE_MAC_DENY 3
|
||||
#define WLC_E_PRUNE_MAC_NA 4
|
||||
#define WLC_E_PRUNE_REG_PASSV 5
|
||||
#define WLC_E_PRUNE_SPCT_MGMT 6
|
||||
#define WLC_E_PRUNE_RADAR 7
|
||||
#define WLC_E_RSN_MISMATCH 8
|
||||
#define WLC_E_PRUNE_NO_COMMON_RATES 9
|
||||
#define WLC_E_PRUNE_BASIC_RATES 10
|
||||
#define WLC_E_PRUNE_CIPHER_NA 12
|
||||
#define WLC_E_PRUNE_KNOWN_STA 13
|
||||
#define WLC_E_PRUNE_WDS_PEER 15
|
||||
#define WLC_E_PRUNE_QBSS_LOAD 16
|
||||
#define WLC_E_PRUNE_HOME_AP 17
|
||||
#define WLC_E_PRUNE_ENCR_MISMATCH 1
|
||||
#define WLC_E_PRUNE_BCAST_BSSID 2
|
||||
#define WLC_E_PRUNE_MAC_DENY 3
|
||||
#define WLC_E_PRUNE_MAC_NA 4
|
||||
#define WLC_E_PRUNE_REG_PASSV 5
|
||||
#define WLC_E_PRUNE_SPCT_MGMT 6
|
||||
#define WLC_E_PRUNE_RADAR 7
|
||||
#define WLC_E_RSN_MISMATCH 8
|
||||
#define WLC_E_PRUNE_NO_COMMON_RATES 9
|
||||
#define WLC_E_PRUNE_BASIC_RATES 10
|
||||
#define WLC_E_PRUNE_CIPHER_NA 12
|
||||
#define WLC_E_PRUNE_KNOWN_STA 13
|
||||
#define WLC_E_PRUNE_WDS_PEER 15
|
||||
#define WLC_E_PRUNE_QBSS_LOAD 16
|
||||
#define WLC_E_PRUNE_HOME_AP 17
|
||||
|
||||
|
||||
#define WLC_E_SUP_OTHER 0
|
||||
#define WLC_E_SUP_DECRYPT_KEY_DATA 1
|
||||
#define WLC_E_SUP_BAD_UCAST_WEP128 2
|
||||
#define WLC_E_SUP_BAD_UCAST_WEP40 3
|
||||
#define WLC_E_SUP_UNSUP_KEY_LEN 4
|
||||
#define WLC_E_SUP_PW_KEY_CIPHER 5
|
||||
#define WLC_E_SUP_MSG3_TOO_MANY_IE 6
|
||||
#define WLC_E_SUP_MSG3_IE_MISMATCH 7
|
||||
#define WLC_E_SUP_NO_INSTALL_FLAG 8
|
||||
#define WLC_E_SUP_MSG3_NO_GTK 9
|
||||
#define WLC_E_SUP_GRP_KEY_CIPHER 10
|
||||
#define WLC_E_SUP_GRP_MSG1_NO_GTK 11
|
||||
#define WLC_E_SUP_GTK_DECRYPT_FAIL 12
|
||||
#define WLC_E_SUP_SEND_FAIL 13
|
||||
#define WLC_E_SUP_DEAUTH 14
|
||||
#define WLC_E_SUP_WPA_PSK_TMO 15
|
||||
#define WLC_E_SUP_OTHER 0
|
||||
#define WLC_E_SUP_DECRYPT_KEY_DATA 1
|
||||
#define WLC_E_SUP_BAD_UCAST_WEP128 2
|
||||
#define WLC_E_SUP_BAD_UCAST_WEP40 3
|
||||
#define WLC_E_SUP_UNSUP_KEY_LEN 4
|
||||
#define WLC_E_SUP_PW_KEY_CIPHER 5
|
||||
#define WLC_E_SUP_MSG3_TOO_MANY_IE 6
|
||||
#define WLC_E_SUP_MSG3_IE_MISMATCH 7
|
||||
#define WLC_E_SUP_NO_INSTALL_FLAG 8
|
||||
#define WLC_E_SUP_MSG3_NO_GTK 9
|
||||
#define WLC_E_SUP_GRP_KEY_CIPHER 10
|
||||
#define WLC_E_SUP_GRP_MSG1_NO_GTK 11
|
||||
#define WLC_E_SUP_GTK_DECRYPT_FAIL 12
|
||||
#define WLC_E_SUP_SEND_FAIL 13
|
||||
#define WLC_E_SUP_DEAUTH 14
|
||||
#define WLC_E_SUP_WPA_PSK_TMO 15
|
||||
|
||||
|
||||
#define WLC_E_IF_ADD 1
|
||||
#define WLC_E_IF_DEL 2
|
||||
#define WLC_E_IF_ADD 1
|
||||
#define WLC_E_IF_DEL 2
|
||||
|
||||
|
||||
#include <packed_section_end.h>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -360,8 +360,7 @@ osl_pktfree_static(osl_t *osh, void *p, bool send)
|
||||
|
||||
for (i = 0; i < MAX_STATIC_PKT_NUM*2; i++)
|
||||
{
|
||||
if ( (i < MAX_STATIC_PKT_NUM && p == bcm_static_skb->skb_4k[i]) ||
|
||||
(i >= MAX_STATIC_PKT_NUM && p == bcm_static_skb->skb_8k[i-MAX_STATIC_PKT_NUM]) )
|
||||
if (p == bcm_static_skb->skb_4k[i])
|
||||
{
|
||||
down(&bcm_static_skb->osl_pkt_sem);
|
||||
bcm_static_skb->pkt_use[i] = 0;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,17 @@
|
||||
#include <proto/ethernet.h>
|
||||
#include <wlioctl.h>
|
||||
|
||||
#define WL_SCAN_PARAMS_SSID_MAX 10
|
||||
#define GET_SSID "SSID="
|
||||
#define GET_CHANNEL "CH="
|
||||
#define GET_NPROBE "NPROBE="
|
||||
#define GET_ACTIVE_ASSOC_DWELL "ACTIVE="
|
||||
#define GET_PASSIVE_ASSOC_DWELL "PASSIVE="
|
||||
#define GET_HOME_DWELL "HOME="
|
||||
#define GET_SCAN_TYPE "TYPE="
|
||||
|
||||
#define BAND_GET_CMD "BANDGET"
|
||||
#define BAND_SET_CMD "BANDSET"
|
||||
|
||||
#define WL_IW_RSSI_MINVAL -200
|
||||
#define WL_IW_RSSI_NO_SIGNAL -91
|
||||
@ -61,12 +72,9 @@
|
||||
#define AP_LPB_CMD (SIOCIWFIRSTPRIV+23)
|
||||
#define WL_AP_STOP (SIOCIWFIRSTPRIV+25)
|
||||
#define WL_FW_RELOAD (SIOCIWFIRSTPRIV+27)
|
||||
#if 0
|
||||
#define WL_AP_SPARE2 (SIOCIWFIRSTPRIV+29)
|
||||
#else
|
||||
#define WL_SET_AP_TXPWR (SIOCIWFIRSTPRIV+29)
|
||||
#endif
|
||||
#define WL_AP_SPARE3 (SIOCIWFIRSTPRIV+31)
|
||||
#define WL_COMBO_SCAN (SIOCIWFIRSTPRIV+29)
|
||||
//#define WL_AP_SPARE2 (SIOCIWFIRSTPRIV+29)
|
||||
#define WL_SET_AP_TXPWR (SIOCIWFIRSTPRIV+31)
|
||||
#define G_SCAN_RESULTS (8*1024)
|
||||
#define WE_ADD_EVENT_FIX 0x80
|
||||
#define G_WLAN_SET_ON 0
|
||||
@ -196,4 +204,40 @@ extern int net_os_wake_lock_timeout_enable(struct net_device *dev);
|
||||
iwe_stream_add_point(stream, ends, iwe, extra)
|
||||
#endif
|
||||
|
||||
#if defined(CSCAN)
|
||||
|
||||
typedef struct cscan_tlv {
|
||||
char prefix;
|
||||
char version;
|
||||
char subver;
|
||||
char reserved;
|
||||
} cscan_tlv_t;
|
||||
|
||||
#define CSCAN_COMMAND "CSCAN "
|
||||
#define CSCAN_TLV_PREFIX 'S'
|
||||
#define CSCAN_TLV_VERSION 1
|
||||
#define CSCAN_TLV_SUBVERSION 0
|
||||
#define CSCAN_TLV_TYPE_SSID_IE 'S'
|
||||
#define CSCAN_TLV_TYPE_CHANNEL_IE 'C'
|
||||
#define CSCAN_TLV_TYPE_NPROBE_IE 'N'
|
||||
#define CSCAN_TLV_TYPE_ACTIVE_IE 'A'
|
||||
#define CSCAN_TLV_TYPE_PASSIVE_IE 'P'
|
||||
#define CSCAN_TLV_TYPE_HOME_IE 'H'
|
||||
#define CSCAN_TLV_TYPE_STYPE_IE 'T'
|
||||
|
||||
extern int wl_iw_parse_channel_list_tlv(char** list_str, uint16* channel_list, \
|
||||
int channel_num, int *bytes_left);
|
||||
|
||||
extern int wl_iw_parse_data_tlv(char** list_str, void *dst, int dst_size, \
|
||||
const char token, int input_size, int *bytes_left);
|
||||
|
||||
extern int wl_iw_parse_ssid_list_tlv(char** list_str, wlc_ssid_t* ssid, \
|
||||
int max, int *bytes_left);
|
||||
|
||||
extern int wl_iw_parse_ssid_list(char** list_str, wlc_ssid_t* ssid, int idx, int max);
|
||||
|
||||
extern int wl_iw_parse_channel_list(char** list_str, uint16* channel_list, int channel_num);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -29,6 +29,7 @@ struct wifi_platform_data {
|
||||
int (*set_carddetect)(int val);
|
||||
void *(*mem_prealloc)(int section, unsigned long size);
|
||||
int dot11n_enable;
|
||||
int cscan_enable;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user