From patchwork Wed Aug 5 09:28:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yi X-Patchwork-Id: 39309 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n759RK5c028435 for ; Wed, 5 Aug 2009 09:27:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933917AbZHEJ0z (ORCPT ); Wed, 5 Aug 2009 05:26:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933912AbZHEJ0y (ORCPT ); Wed, 5 Aug 2009 05:26:54 -0400 Received: from mga01.intel.com ([192.55.52.88]:61980 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933014AbZHEJ0y (ORCPT ); Wed, 5 Aug 2009 05:26:54 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 05 Aug 2009 02:25:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.43,327,1246863600"; d="scan'208";a="714069248" Received: from yzhu-mobl0.sh.intel.com (HELO localhost.localdomain) ([10.239.36.106]) by fmsmga001.fm.intel.com with ESMTP; 05 Aug 2009 02:30:05 -0700 From: Zhu Yi To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Zhu Yi Subject: [PATCH] nl80211: fix attrtype and value for NL80211_ATTR_SUPPORTED_COMMANDS Date: Wed, 5 Aug 2009 17:28:30 +0800 Message-Id: <1249464510-21539-1-git-send-email-yi.zhu@intel.com> X-Mailer: git-send-email 1.6.0.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The patch fixes the misuse between attrtype and value for the CMD list nested in NL80211_ATTR_SUPPORTED_COMMANDS attribute. Signed-off-by: Zhu Yi --- net/wireless/nl80211.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 0cd5482..086d3fb 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -520,7 +520,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, do { \ if (dev->ops->op) { \ i++; \ - NLA_PUT_U32(msg, i, NL80211_CMD_ ## n); \ + NLA_PUT_U32(msg, NL80211_CMD_ ## n, i); \ } \ } while (0) @@ -539,19 +539,19 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, CMD(join_ibss, JOIN_IBSS); if (dev->wiphy.netnsok) { i++; - NLA_PUT_U32(msg, i, NL80211_CMD_SET_WIPHY_NETNS); + NLA_PUT_U32(msg, NL80211_CMD_SET_WIPHY_NETNS, i); } #undef CMD if (dev->ops->connect || dev->ops->auth) { i++; - NLA_PUT_U32(msg, i, NL80211_CMD_CONNECT); + NLA_PUT_U32(msg, NL80211_CMD_CONNECT, i); } if (dev->ops->disconnect || dev->ops->deauth) { i++; - NLA_PUT_U32(msg, i, NL80211_CMD_DISCONNECT); + NLA_PUT_U32(msg, NL80211_CMD_DISCONNECT, i); } nla_nest_end(msg, nl_cmds);