From patchwork Thu Dec 2 21:24:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 375951 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 oB2LP5MS019961 for ; Thu, 2 Dec 2010 21:25:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758074Ab0LBVYw (ORCPT ); Thu, 2 Dec 2010 16:24:52 -0500 Received: from mail-qw0-f46.google.com ([209.85.216.46]:38931 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757995Ab0LBVYv convert rfc822-to-8bit (ORCPT ); Thu, 2 Dec 2010 16:24:51 -0500 Received: by qwb7 with SMTP id 7so8842887qwb.19 for ; Thu, 02 Dec 2010 13:24:51 -0800 (PST) Received: by 10.224.2.208 with SMTP id 16mr409467qak.315.1291325090966; Thu, 02 Dec 2010 13:24:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.76.5 with HTTP; Thu, 2 Dec 2010 13:24:30 -0800 (PST) In-Reply-To: <1291320849.3481.55.camel@jlt3.sipsolutions.net> References: <20101201205939.009530439@sipsolutions.net> <20101201210226.159495600@sipsolutions.net> <1291279510.3481.17.camel@jlt3.sipsolutions.net> <1291320849.3481.55.camel@jlt3.sipsolutions.net> From: Javier Cardona Date: Thu, 2 Dec 2010 13:24:30 -0800 Message-ID: Subject: Re: [RFC 5/5 v2] 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 21:25:05 +0000 (UTC) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 107a0cb..2de6976 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -246,7 +246,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, !!sdata->u.ibss.presp; break; case NL80211_IFTYPE_MESH_POINT: - sdata->vif.bss_conf.enable_beacon = true; + sdata->vif.bss_conf.enable_beacon = + !!sdata->u.mesh.mesh_id_len; break; default: /* not reached */ diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index d814fab..63e1188 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -530,6 +530,11 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; + struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; + + ifmsh->mesh_id_len = 0; + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); + sta_info_flush(local, NULL); del_timer_sync(&sdata->u.mesh.housekeeping_timer);