summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-06-30 09:54:27 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:38:45 -0800
commitec61f6a51706b656c8ad39991d956f5f7040da9f (patch)
tree7a3a809e612ba19b960c960655cbe3e3cd499aa0
parent483404fc95909aecd23b80bb641ac0f213b82070 (diff)
net: wireless: bcmdhd: Add private start/stop commands
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--drivers/net/wireless/bcmdhd/wl_android.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c
index 79fdb080e4bf..196ccf3d89ca 100644
--- a/drivers/net/wireless/bcmdhd/wl_android.c
+++ b/drivers/net/wireless/bcmdhd/wl_android.c
@@ -255,13 +255,21 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
if (strnicmp(command, CMD_START, strlen(CMD_START)) == 0) {
DHD_INFO(("%s, Received regular START command\n", __FUNCTION__));
- g_wifi_on = 1;
+ bytes_written = wl_android_wifi_on(net);
+ }
+ else if (strnicmp(command, CMD_SETFWPATH, strlen(CMD_SETFWPATH)) == 0) {
+ bytes_written = wl_android_set_fwpath(net, command, priv_cmd->total_len);
}
- if (!g_wifi_on) {
+ if (!g_wifi_on) {
+ DHD_ERROR(("%s: Ignore private cmd \"%s\" - iface %s is down\n",
+ __FUNCTION__, command, ifr->ifr_name));
+ ret = 0;
+ goto exit;
}
+
if (strnicmp(command, CMD_STOP, strlen(CMD_STOP)) == 0) {
- /* TBD: STOP */
+ bytes_written = wl_android_wifi_off(net);
}
else if (strnicmp(command, CMD_SCAN_ACTIVE, strlen(CMD_SCAN_ACTIVE)) == 0) {
/* TBD: SCAN-ACTIVE */
@@ -292,9 +300,6 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
}
else if (strnicmp(command, CMD_SETSUSPENDOPT, strlen(CMD_SETSUSPENDOPT)) == 0) {
bytes_written = wl_android_set_suspendopt(net, command, priv_cmd->total_len);
- }
- else if (strnicmp(command, CMD_SETFWPATH, strlen(CMD_SETFWPATH)) == 0) {
- bytes_written = wl_android_set_fwpath(net, command, priv_cmd->total_len);
} else {
DHD_ERROR(("Unknown PRIVATE command %s - ignored\n", command));
snprintf(command, 3, "OK");