static bool dhd_check_hang(struct net_device *net, dhd_pub_t *dhdp, int error)
{
- dhd_info_t *dhd = (dhd_info_t*)dhdp->info;
-
- if ((error == -ETIMEDOUT) || ((dhd->pub.busstate == DHD_BUS_DOWN) &&
- (!dhd->pub.dongle_reset))) {
+ if (!dhdp)
+ return FALSE;
+ if ((error == -ETIMEDOUT) || ((dhdp->busstate == DHD_BUS_DOWN) &&
+ (!dhdp->dongle_reset))) {
DHD_ERROR(("%s: Event HANG send up due to re=%d te=%d e=%d s=%d\n", __FUNCTION__,
- dhd->pub.rxcnt_timeout, dhd->pub.txcnt_timeout, error, dhd->pub.busstate));
+ dhdp->rxcnt_timeout, dhdp->txcnt_timeout, error, dhdp->busstate));
net_os_send_hang_message(net);
return TRUE;
}
kfree(default_chan_list);
}
exit:
+ if (unlikely(err)) {
+ WL_ERR(("error (%d)\n", err));
+ }
return err;
}
err = wldev_ioctl(ndev, WLC_SET_PASSIVE_SCAN,
&passive_scan, sizeof(passive_scan), false);
if (unlikely(err)) {
- WL_DBG(("error (%d)\n", err));
+ WL_ERR(("error (%d)\n", err));
return err;
}
results = (wl_scan_results_t *) wl->escan_info.escan_buf;
results->count = 0;
results->buflen = WL_SCAN_RESULTS_FIXED_SIZE;
- wl_run_escan(wl, ndev, request, WL_SCAN_ACTION_START);
+ err = wl_run_escan(wl, ndev, request, WL_SCAN_ACTION_START);
return err;
}
bool act = false;
s32 err = 0;
- WL_ERR(("Reason %d\n\n\n", reason_code));
+ WL_ERR(("Reason %d\n", reason_code));
CHECK_SYS_UP(wl);
act = *(bool *) wl_read_prof(wl, WL_PROF_ACT);
if (likely(act)) {
s32
wl_cfg80211_scan_abort(struct wl_priv *wl, struct net_device *ndev)
{
- wl_scan_params_t *params;
- s32 params_size;
+ wl_scan_params_t *params = NULL;
+ s32 params_size = 0;
s32 err = BCME_OK;
unsigned long flags;
if (params == NULL) {
WL_ERR(("scan params allocation failed \n"));
err = -ENOMEM;
- }
- /* Do a scan abort to stop the driver's scan engine */
- err = wldev_ioctl(ndev, WLC_SCAN, params, params_size, true);
- if (err < 0) {
- WL_ERR(("scan abort failed \n"));
+ } else {
+ /* Do a scan abort to stop the driver's scan engine */
+ err = wldev_ioctl(ndev, WLC_SCAN, params, params_size, true);
+ if (err < 0) {
+ WL_ERR(("scan abort failed \n"));
+ }
}
del_timer_sync(&wl->scan_timeout);
flags = dhd_os_spin_lock((dhd_pub_t *)(wl->pub));
}
wl_clr_drv_status(wl, SCANNING);
dhd_os_spin_unlock((dhd_pub_t *)(wl->pub), flags);
-
+ if (params)
+ kfree(params);
return err;
}
WL_DBG((" enter\n"));
if (wl->scan_request) {
- wl_cfg80211_scan_abort(wl, ndev);
+ wl_cfg80211_scan_abort(wl, ndev);
}
if (wl_get_drv_status(wl, CONNECTING)) {
wl_clr_drv_status(wl, CONNECTING);
if (wl->iscan_on && wl->iscan_kickstart)
return wl_wakeup_iscan(wl_to_iscan(wl));
- if (unlikely(!wl_get_drv_status(wl, SCANNING))) {
- wl_clr_drv_status(wl, SCANNING);
- WL_DBG(("Scan complete while device not scanning\n"));
- return -EINVAL;
- }
wl_clr_drv_status(wl, SCANNING);
rtnl_lock();
err = wldev_ioctl(ndev, WLC_GET_CHANNEL, &channel_inform,
bss_list->count = dtoh32(bss_list->count);
err = wl_inform_bss(wl);
- if (err)
- goto scan_done_out;
scan_done_out:
del_timer_sync(&wl->scan_timeout);
unsigned long flags;
WL_DBG(("Enter \n"));
- if (unlikely(!wl_get_drv_status(wl, SCANNING))) {
- wl_clr_drv_status(wl, SCANNING);
- WL_ERR(("Scan complete while device not scanning\n"));
- wl->scan_request = NULL;
- return;
- }
wl_clr_drv_status(wl, SCANNING);
if (wl->p2p_supported && p2p_on(wl))
wl_clr_p2p_status(wl, SCANNING);
return ret;
}
+
static __used void wl_dongle_poweron(struct wl_priv *wl)
{
-
WL_DBG(("Enter \n"));
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_ON);
static __used void wl_dongle_poweroff(struct wl_priv *wl)
{
-
-
WL_DBG(("Enter \n"));
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
wl_cfg80211_suspend(wl_to_wiphy(wl), NULL);
/* clean up dtim_skip setting */
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
}
+
static int wl_debugfs_add_netdev_params(struct wl_priv *wl)
{
char buf[10+IFNAMSIZ];