summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcmdhd
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-07-07 14:57:23 -0700
committerDmitry Shmidt <dimitrysh@google.com>2011-07-07 15:00:19 -0700
commit487ffb052891a552fecf865ad4b24bbe7945a413 (patch)
tree1ea6e181d8e3ed82c0c877f74bf725538add839b /drivers/net/wireless/bcmdhd
parent410ef5f9f09c14b3fcc7a3652ea3d2f52081bebd (diff)
net: wireless: bcmdhd: Fix private command output
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless/bcmdhd')
-rw-r--r--drivers/net/wireless/bcmdhd/wl_android.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c
index 3d6047de297..2d3ff7f14cd 100644
--- a/drivers/net/wireless/bcmdhd/wl_android.c
+++ b/drivers/net/wireless/bcmdhd/wl_android.c
@@ -306,10 +306,11 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
} else {
DHD_ERROR(("Unknown PRIVATE command %s - ignored\n", command));
snprintf(command, 3, "OK");
- bytes_written = strlen("OK") + 1;
+ bytes_written = strlen("OK");
}
if (bytes_written > 0) {
+ bytes_written++;
priv_cmd->used_len = bytes_written;
if (copy_to_user(priv_cmd->buf, command, bytes_written)) {
DHD_ERROR(("%s: failed to copy data to user buffer\n", __FUNCTION__));