From patchwork Sat Jan 4 21:06:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya X-Patchwork-Id: 3434401 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DFD4EC02DC for ; Sat, 4 Jan 2014 21:06:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 05A402015F for ; Sat, 4 Jan 2014 21:06:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E8462015E for ; Sat, 4 Jan 2014 21:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754384AbaADVGj (ORCPT ); Sat, 4 Jan 2014 16:06:39 -0500 Received: from mail-pb0-f52.google.com ([209.85.160.52]:39249 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753552AbaADVGj (ORCPT ); Sat, 4 Jan 2014 16:06:39 -0500 Received: by mail-pb0-f52.google.com with SMTP id uo5so16922616pbc.25 for ; Sat, 04 Jan 2014 13:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=OOcZC/i+XFjoYwvEE6/fWF7HfUCyTNbQzvuA9vG4wgw=; b=xRIG/BcGujU0BdZzpTOt+XiZQLpJuCGSH79pU+9dCq4ExMLDauLGRsMoI2m6sYiBVl tIADDzOW4lQK1aWLlulM0HDci4R9ugjoP2iBoit51yMh+djezLXTZ8IcEvCNQda/ywOh zlmd2WsyPcxvHhLvjG4gao5pOWsWC89K+xvuFyC8tfeUDa1Vrs3jcQ9Tgp4nIHb9Wo8b 30tqQV0qdjDoSjPNOkN2fU0CKgwxnknicREF9SeesB8a/kMhbNOoNlsj8PtcnOCgcAqx 8TXYqRX/rWwD9T9DiK4OAz+YXh4yVPNn9UWVoHgjzm5SxqJhQoWHikaIkL8/VeJNzEiV 4Jjg== X-Received: by 10.68.251.133 with SMTP id zk5mr108457814pbc.69.1388869599036; Sat, 04 Jan 2014 13:06:39 -0800 (PST) Received: from localhost.localdomain ([49.206.155.104]) by mx.google.com with ESMTPSA id ug2sm154274635pac.21.2014.01.04.13.06.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 04 Jan 2014 13:06:37 -0800 (PST) From: Chaitanya T K To: johannes@sipsolutions.net, linux-wireless@vger.kernel.org Cc: Chaitanya T K Subject: [PATCH] mac80211: Fix the buffer length in debugfs for smps Date: Sun, 5 Jan 2014 02:36:23 +0530 Message-Id: <1388869583-2767-1-git-send-email-chaitanya.mgit@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This was blocking sending SMPS action frames through debugfs. Signed-off-by: Chaitanya T K --- net/mac80211/debugfs_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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 04b5a14..1a8fa5f 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -265,7 +265,7 @@ 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], buflen-1) == 0) { int err = ieee80211_set_smps(sdata, mode); if (!err) return buflen;