BCM4329 Updates
/drivers/net/wireless/bcm4329_204/wl_iw.c
blob:b0c3128b989a344f06e42608a7d98921209c3f53 -> blob:0edf540f5e41799e55bde81f0e4f4d5b2e5331ca
--- drivers/net/wireless/bcm4329_204/wl_iw.c
+++ drivers/net/wireless/bcm4329_204/wl_iw.c
@@ -6545,7 +6545,7 @@ get_channel_retry:
else {
WL_ERROR(("can't get auto channel sel, err = %d, \
chosen = %d\n", ret, chosen));
- return -1;
+ chosen = 6; /*Alan: Set default channel when get auto channel failed*/
}
}
if ((chosen == 1) && (!rescan++)) {
@@ -8663,7 +8663,13 @@ static int ap_fail_count = 0;
static int
_ap_protect_sysioc_thread(void *data)
{
+#if 0
int isup;
+#else
+ char iovbuf[WL_EVENTING_MASK_LEN + 12]; /* Room for "event_msgs" + '\0' + bitvec */
+ static unsigned int txphyerr = 0;
+ unsigned int curr_txphyerr = 0;
+#endif
int ret = 0;
DAEMONIZE("ap_sysioc");
@@ -8679,14 +8685,32 @@ _ap_protect_sysioc_thread(void *data)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
rtnl_lock();
#endif
+#if 0
if ((ret = dev_wlc_ioctl(priv_dev, WLC_GET_UP, &isup, sizeof(isup))) != 0)
ap_fail_count++;
else
ap_fail_count = 0;
+#else
+ strcpy(iovbuf, "txphyerr");
+ if ((ret = dev_wlc_ioctl(priv_dev, WLC_GET_VAR, iovbuf, sizeof(iovbuf))) < 0)
+ ap_fail_count++;
+ else {
+ curr_txphyerr = *(unsigned int*)iovbuf;
+ //myprintf("%s: curr_txphyerr(%d)/txphyerr(%d)\n", __FUNCTION__, curr_txphyerr, txphyerr);
+ if ( (curr_txphyerr - txphyerr) > 5000 ) {
+ myprintf("%s: curr_txphyerr(%d) is over txphyerr (%d). fail count + 1\n", __FUNCTION__, curr_txphyerr, txphyerr);
+ ap_fail_count++;
+ } else {
+ ap_fail_count = 0;
+ }
+ txphyerr = curr_txphyerr;
+ }
+#endif
if (ap_fail_count == AP_MAX_FAIL_COUNT) {
wl_iw_restart(priv_dev);
wl_iw_ap_restart();
+ txphyerr = 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))