Commit eb60cfa9 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman

ath6kl: remove BMIENABLE_SET define

Leave the code in place as this is always defined statically.
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ab891115
...@@ -126,7 +126,6 @@ ccflags-y += -DWAPI_ENABLE ...@@ -126,7 +126,6 @@ ccflags-y += -DWAPI_ENABLE
ccflags-y += -DCHECKSUM_OFFLOAD ccflags-y += -DCHECKSUM_OFFLOAD
ccflags-y += -DWLAN_HEADERS ccflags-y += -DWLAN_HEADERS
ccflags-y += -DINIT_MODE_DRV_ENABLED ccflags-y += -DINIT_MODE_DRV_ENABLED
ccflags-y += -DBMIENABLE_SET
obj-$(CONFIG_ATH6K_LEGACY) := ath6kl.o obj-$(CONFIG_ATH6K_LEGACY) := ath6kl.o
ath6kl-y += htc2/AR6000/ar6k.o ath6kl-y += htc2/AR6000/ar6k.o
......
...@@ -37,7 +37,6 @@ char fwpath[256] = "/system/wifi"; ...@@ -37,7 +37,6 @@ char fwpath[256] = "/system/wifi";
int wowledon; int wowledon;
unsigned int enablelogcat; unsigned int enablelogcat;
extern int bmienable;
extern struct net_device *ar6000_devices[]; extern struct net_device *ar6000_devices[];
extern char ifname[]; extern char ifname[];
...@@ -309,7 +308,6 @@ static void android_late_resume(struct early_suspend *h) ...@@ -309,7 +308,6 @@ static void android_late_resume(struct early_suspend *h)
void android_module_init(OSDRV_CALLBACKS *osdrvCallbacks) void android_module_init(OSDRV_CALLBACKS *osdrvCallbacks)
{ {
bmienable = 1;
if (ifname[0] == '\0') if (ifname[0] == '\0')
strcpy(ifname, def_ifname); strcpy(ifname, def_ifname);
#ifdef CONFIG_HAS_EARLYSUSPEND #ifdef CONFIG_HAS_EARLYSUSPEND
......
...@@ -118,7 +118,6 @@ struct hci_transport_callbacks ar6kHciTransCallbacks = { NULL }; ...@@ -118,7 +118,6 @@ struct hci_transport_callbacks ar6kHciTransCallbacks = { NULL };
#endif #endif
unsigned int processDot11Hdr = 0; unsigned int processDot11Hdr = 0;
int bmienable = BMIENABLE_DEFAULT;
char ifname[IFNAMSIZ] = {0,}; char ifname[IFNAMSIZ] = {0,};
...@@ -164,7 +163,6 @@ unsigned int eppingtest=0; ...@@ -164,7 +163,6 @@ unsigned int eppingtest=0;
module_param_string(ifname, ifname, sizeof(ifname), 0644); module_param_string(ifname, ifname, sizeof(ifname), 0644);
module_param(wlaninitmode, int, 0644); module_param(wlaninitmode, int, 0644);
module_param(bmienable, int, 0644);
module_param(bypasswmi, bool, 0644); module_param(bypasswmi, bool, 0644);
module_param(debuglevel, uint, 0644); module_param(debuglevel, uint, 0644);
module_param(tspecCompliance, int, 0644); module_param(tspecCompliance, int, 0644);
...@@ -1719,9 +1717,7 @@ ar6000_avail_ev(void *context, void *hif_handle) ...@@ -1719,9 +1717,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
BMIInit(); BMIInit();
if (bmienable) {
ar6000_sysfs_bmi_init(ar); ar6000_sysfs_bmi_init(ar);
}
{ {
struct bmi_target_info targ_info; struct bmi_target_info targ_info;
...@@ -1791,18 +1787,12 @@ ar6000_avail_ev(void *context, void *hif_handle) ...@@ -1791,18 +1787,12 @@ ar6000_avail_ev(void *context, void *hif_handle)
/* when the module is unloaded. */ /* when the module is unloaded. */
ar6000_devices[device_index] = dev; ar6000_devices[device_index] = dev;
/* Don't install the init function if BMI is requested */
if (!bmienable) {
ar6000_netdev_ops.ndo_init = ar6000_init;
} else {
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("BMI enabled: %d\n", wlaninitmode)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("BMI enabled: %d\n", wlaninitmode));
if ((wlaninitmode == WLAN_INIT_MODE_UDEV) || if ((wlaninitmode == WLAN_INIT_MODE_UDEV) ||
(wlaninitmode == WLAN_INIT_MODE_DRV)) (wlaninitmode == WLAN_INIT_MODE_DRV)) {
{
int status = 0; int status = 0;
do { do {
if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != 0) if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != 0) {
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n"));
break; break;
} }
...@@ -1824,7 +1814,6 @@ ar6000_avail_ev(void *context, void *hif_handle) ...@@ -1824,7 +1814,6 @@ ar6000_avail_ev(void *context, void *hif_handle)
goto avail_ev_failed; goto avail_ev_failed;
} }
} }
}
/* This runs the init function if registered */ /* This runs the init function if registered */
if (register_netdev(dev)) { if (register_netdev(dev)) {
...@@ -1843,11 +1832,8 @@ ar6000_avail_ev(void *context, void *hif_handle) ...@@ -1843,11 +1832,8 @@ ar6000_avail_ev(void *context, void *hif_handle)
(unsigned long)ar)); (unsigned long)ar));
avail_ev_failed : avail_ev_failed :
if (init_status) { if (init_status)
if (bmienable) {
ar6000_sysfs_bmi_deinit(ar); ar6000_sysfs_bmi_deinit(ar);
}
}
return init_status; return init_status;
} }
...@@ -2120,9 +2106,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister) ...@@ -2120,9 +2106,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister)
/* cleanup any allocated AMSDU buffers */ /* cleanup any allocated AMSDU buffers */
ar6000_cleanup_amsdu_rxbufs(ar); ar6000_cleanup_amsdu_rxbufs(ar);
if (bmienable) {
ar6000_sysfs_bmi_deinit(ar); ar6000_sysfs_bmi_deinit(ar);
}
/* Cleanup BMI */ /* Cleanup BMI */
BMICleanup(); BMICleanup();
......
...@@ -227,12 +227,6 @@ typedef enum _AR6K_BIN_FILE { ...@@ -227,12 +227,6 @@ typedef enum _AR6K_BIN_FILE {
#define SETUPBTDEV_DEFAULT 0 #define SETUPBTDEV_DEFAULT 0
#endif /* SETUPBTDEV_ENABLED */ #endif /* SETUPBTDEV_ENABLED */
#ifdef BMIENABLE_SET
#define BMIENABLE_DEFAULT 1
#else
#define BMIENABLE_DEFAULT 0
#endif /* BMIENABLE_SET */
#ifdef ENABLEUARTPRINT_SET #ifdef ENABLEUARTPRINT_SET
#define ENABLEUARTPRINT_DEFAULT 1 #define ENABLEUARTPRINT_DEFAULT 1
#else #else
......
...@@ -33,7 +33,6 @@ u32 tcmdRxFreq; ...@@ -33,7 +33,6 @@ u32 tcmdRxFreq;
extern unsigned int wmitimeout; extern unsigned int wmitimeout;
extern A_WAITQUEUE_HEAD arEvent; extern A_WAITQUEUE_HEAD arEvent;
extern int tspecCompliance; extern int tspecCompliance;
extern int bmienable;
extern int loghci; extern int loghci;
static int static int
...@@ -2105,16 +2104,9 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2105,16 +2104,9 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
#endif /* CONFIG_HOST_TCMD_SUPPORT */ #endif /* CONFIG_HOST_TCMD_SUPPORT */
case AR6000_XIOCTL_BMI_DONE: case AR6000_XIOCTL_BMI_DONE:
if(bmienable)
{
rtnl_lock(); /* ar6000_init expects to be called holding rtnl lock */ rtnl_lock(); /* ar6000_init expects to be called holding rtnl lock */
ret = ar6000_init(dev); ret = ar6000_init(dev);
rtnl_unlock(); rtnl_unlock();
}
else
{
ret = BMIDone(hifDevice);
}
break; break;
case AR6000_XIOCTL_BMI_READ_MEMORY: case AR6000_XIOCTL_BMI_READ_MEMORY:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment