Message ID | 1427433674-5745-1-git-send-email-miaoqing@qca.qualcomm.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Johannes Berg |
Headers | show |
On Fri, 2015-03-27 at 13:21 +0800, miaoqing@qti.qualcomm.com wrote: > From: Miaoqing Pan <miaoqing@qca.qualcomm.com> > > Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> Since you give no commit log, I can only guess what you're trying to do, but I suppose you need to use "echo -n" instead of "echo". johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Mar 30, 2015 at 2:13 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > On Fri, 2015-03-27 at 13:21 +0800, miaoqing@qti.qualcomm.com wrote: >> From: Miaoqing Pan <miaoqing@qca.qualcomm.com> >> >> Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> > > Since you give no commit log, I can only guess what you're trying to do, > but I suppose you need to use "echo -n" instead of "echo". Johannes, We had this discussion earlier also, i still strongly feel all cases must work with "echo" by default, as people are not that familiar to use "echo -n". -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2015-03-30 at 15:04 +0530, Krishna Chaitanya wrote: > On Mon, Mar 30, 2015 at 2:13 PM, Johannes Berg > <johannes@sipsolutions.net> wrote: > > On Fri, 2015-03-27 at 13:21 +0800, miaoqing@qti.qualcomm.com wrote: > >> From: Miaoqing Pan <miaoqing@qca.qualcomm.com> > >> > >> Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> > > > > Since you give no commit log, I can only guess what you're trying to do, > > but I suppose you need to use "echo -n" instead of "echo". > Johannes, > > We had this discussion earlier also, i still strongly feel all cases > must work with "echo" by default, as people are not that familiar > to use "echo -n". Well I still strongly feel that accepting garbage on the input like this patch will do is wrong. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;