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 <yi.zhu@xxxxxxxxx> --- 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); -- 1.6.0.4 -- 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