From: Miaoqing Pan <miaoqing@xxxxxxxxxxxxxxxx> Signed-off-by: Miaoqing Pan <miaoqing@xxxxxxxxxxxxxxxx> --- net/mac80211/debugfs_netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 4d7473f..9aeb50d 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -276,7 +276,8 @@ static ssize_t ieee80211_if_parse_smps(struct ieee80211_sub_if_data *sdata, enum ieee80211_smps_mode mode; for (mode = 0; mode < IEEE80211_SMPS_NUM_MODES; mode++) { - if (strncmp(buf, smps_modes[mode], buflen) == 0) { + if (strncmp(buf, smps_modes[mode], + strlen(smps_modes[mode])) == 0) { int err = ieee80211_set_smps(sdata, mode); if (!err) return buflen; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html