iwlwifi: mvm: make debugfs write() operations write up to count bytes
authorDjalal Harouni <tixxdz@opendz.org>
Sat, 24 Aug 2013 13:35:53 +0000 (14:35 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 2 Oct 2013 16:00:42 +0000 (18:00 +0200)
commit0e9d84ea89a588a6ed7b4e9809cd4a8af0bb6a88
treea93dd18de32e6ddeb6e56467cd590d852e2ca6e6
parent6a524f487c61a08ec7552fcf004e8b3fcf6badf0
iwlwifi: mvm: make debugfs write() operations write up to count bytes

Some debugfs write() operations of the MVM Firmware will ignore the
count argument, and will copy more bytes than what was specified.
Fix this by getting the right count of bytes.

This will honor restrictions put on the number of bytes to write and
avoid strcmp() calls on garbage data.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/debugfs.c