From patchwork Fri Jul 12 10:55:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 2826899 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E63259F756 for ; Fri, 12 Jul 2013 11:02:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C17A12019C for ; Fri, 12 Jul 2013 11:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BDDE2018F for ; Fri, 12 Jul 2013 11:02:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932803Ab3GLLCn (ORCPT ); Fri, 12 Jul 2013 07:02:43 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:59183 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932525Ab3GLLCn (ORCPT ); Fri, 12 Jul 2013 07:02:43 -0400 Received: by mail-pb0-f49.google.com with SMTP id jt11so8845534pbb.8 for ; Fri, 12 Jul 2013 04:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=CSvG1HJIK8DSfe7xsWr9iLFtpoXFLIGhyTH2YKMgbnA=; b=dBiPpt0oi9vDpEq2TyB30mhXPFPuvoD9jBqtU24iuHeIhIbIJp/NgADlzkz0GuJJ9n 13bMPEzhobACTu0/SaJi2pwqg9kiPL7g6+RohlgAenDuFpgzfFHbb315IIs1R9pqikKF dfG509frsXJVNS7Il8nTzC+ltiw59pPCsIj0XnzXsEStwW8E9A1NQG14waE8SWFiobHI aFpv11PtcRFYp9Je7m25mmQeZHk0No7djZ89sf2UqHtVgq8aDnFRtCCiUjpOnZ1h0yBj 4zQlTH/AY8A78SaXLK+ZbZAGJmfbBMYFtn8uFGN/NlTTo5THsRkpE2zH9bt/zrjgbBES EAdQ== X-Received: by 10.69.17.1 with SMTP id ga1mr40736525pbd.38.1373626962604; Fri, 12 Jul 2013 04:02:42 -0700 (PDT) Received: from localhost.localdomain ([58.26.233.146]) by mx.google.com with ESMTPSA id we2sm47565114pab.0.2013.07.12.04.02.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Jul 2013 04:02:41 -0700 (PDT) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, linville@tuxdriver.com, devel@lists.open80211s.org, distro11s@cozybit.com, Chun-Yeow Yeoh Subject: [PATCH] mac80211: set the forwading in mesh capability info accordingly Date: Fri, 12 Jul 2013 18:55:22 +0800 Message-Id: <1373626522-19486-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.0.4 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.1 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 Set the Forwarding bit in Mesh Capability Info according to dot11MeshForwarding as defined in IEEE 802.11-2012 section 8.4.2.100.8. Signed-off-by: Chun-Yeow Yeoh --- net/mac80211/mesh.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index e536f22..885a5f6 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -273,7 +273,9 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata, neighbors = min_t(int, neighbors, IEEE80211_MAX_MESH_PEERINGS); *pos++ = neighbors << 1; /* Mesh capability */ - *pos = IEEE80211_MESHCONF_CAPAB_FORWARDING; + *pos = 0x00; + *pos |= ifmsh->mshcfg.dot11MeshForwarding ? + IEEE80211_MESHCONF_CAPAB_FORWARDING : 0x00; *pos |= ifmsh->accepting_plinks ? IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS : 0x00; /* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */