From: Dmitry Shmidt Date: Thu, 7 Jul 2011 21:57:23 +0000 (-0700) Subject: net: wireless: bcmdhd: Fix private command output X-Git-Tag: 2.1b_release~2528 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7059c88c329d0dec17d33f569f013a4470b5439b;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git net: wireless: bcmdhd: Fix private command output Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c index 3d6047d..2d3ff7f 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__));