From patchwork Thu Dec 2 00:23:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 372731 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB20O6re029349 for ; Thu, 2 Dec 2010 00:24:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754142Ab0LBAYE (ORCPT ); Wed, 1 Dec 2010 19:24:04 -0500 Received: from mail-qw0-f46.google.com ([209.85.216.46]:49820 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753376Ab0LBAYC (ORCPT ); Wed, 1 Dec 2010 19:24:02 -0500 Received: by qwb7 with SMTP id 7so7717142qwb.19 for ; Wed, 01 Dec 2010 16:24:02 -0800 (PST) Received: by 10.224.2.208 with SMTP id 16mr1230067qak.315.1291249442135; Wed, 01 Dec 2010 16:24:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.76.5 with HTTP; Wed, 1 Dec 2010 16:23:41 -0800 (PST) In-Reply-To: <20101201210226.159495600@sipsolutions.net> References: <20101201205939.009530439@sipsolutions.net> <20101201210226.159495600@sipsolutions.net> From: Javier Cardona Date: Wed, 1 Dec 2010 16:23:41 -0800 Message-ID: Subject: Re: [RFC 5/5] cfg80211/mac80211: add mesh join/leave commands To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Steve Derosier , devel@lists.open80211s.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 02 Dec 2010 00:24:06 +0000 (UTC) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 75c501f..300835d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4527,9 +4527,11 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info) memcpy(&cfg, &default_mesh_config, sizeof(cfg)); /* and parse other given info */ - err = nl80211_parse_mesh_params(info, &cfg, NULL); - if (err) - return err; + if (info->attrs[NL80211_ATTR_MESH_PARAMS]) { + err = nl80211_parse_mesh_params(info, &cfg, NULL); + if (err) + return err; + } if (!info->attrs[NL80211_ATTR_MESH_ID] ||