Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248989
b: refs/heads/master
c: e4551c7
h: refs/heads/master
i:
  248987: fd87442
v: v3
  • Loading branch information
Luis R. Rodriguez authored and Greg Kroah-Hartman committed Apr 5, 2011
1 parent 230930a commit 8c4db4f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1ccd0868efcb7607d2cdf41341542928e066219
refs/heads/master: e4551c7bb19c2f094eaabbcd610ab3dfd2ee86a0
68 changes: 48 additions & 20 deletions trunk/drivers/staging/ath6kl/os/linux/ar6000_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,52 @@ init_netdev(struct net_device *dev, char *name)
return;
}

static int __ath6kl_init_netdev(struct net_device *dev)
{
int r;

rtnl_lock();
r = ar6000_init(dev);
rtnl_unlock();

if (r) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_init\n"));
return r;
}

return 0;
}

#ifdef HTC_RAW_INTERFACE
static int ath6kl_init_netdev_wmi(struct net_device *dev)
{
if (!eppingtest && bypasswmi)
return 0;

return __ath6kl_init_netdev(dev);
}
#else
static int ath6kl_init_netdev_wmi(struct net_device *dev)
{
return __ath6kl_init_netdev(dev);
}
#endif

static int ath6kl_init_netdev(struct ar6_softc *ar)
{
int r;

r = ar6000_sysfs_bmi_get_config(ar, wlaninitmode);
if (r) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("ar6000_avail: "
"ar6000_sysfs_bmi_get_config failed\n"));
return r;
}

return ath6kl_init_netdev_wmi(ar->arNetDev);
}

/*
* HTC Event handlers
*/
Expand Down Expand Up @@ -1788,26 +1834,8 @@ ar6000_avail_ev(void *context, void *hif_handle)
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("BMI enabled: %d\n", wlaninitmode));
if ((wlaninitmode == WLAN_INIT_MODE_UDEV) ||
(wlaninitmode == WLAN_INIT_MODE_DRV)) {
do {
r = ar6000_sysfs_bmi_get_config(ar, wlaninitmode);
if (r) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n"));
break;
}
#ifdef HTC_RAW_INTERFACE
if (!eppingtest && bypasswmi) {
break; /* Don't call ar6000_init for ART */
}
#endif
rtnl_lock();
r = ar6000_init(dev);
rtnl_unlock();
if (r) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_init\n"));
}
} while (false);

if (r)
r = ath6kl_init_netdev(ar);
if (r)
goto avail_ev_failed;
}

Expand Down

0 comments on commit 8c4db4f

Please sign in to comment.