From patchwork Fri Aug 2 15:38:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 2838009 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 955EFBF53E for ; Fri, 2 Aug 2013 15:38:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 726BF203B5 for ; Fri, 2 Aug 2013 15:38:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E3A62039D for ; Fri, 2 Aug 2013 15:38:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754172Ab3HBPiU (ORCPT ); Fri, 2 Aug 2013 11:38:20 -0400 Received: from nick.hrz.tu-chemnitz.de ([134.109.228.11]:39932 "EHLO nick.hrz.tu-chemnitz.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754105Ab3HBPiR (ORCPT ); Fri, 2 Aug 2013 11:38:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=AkUMuUzZjdlTlcWdzGvSkXmsKYQFI1TLvc5ERnFmAzU=; b=PDX1BV0siDAeAHrd/ZOsVZ8jCj7e3xRXOYEEL5v4ne91/zhIPtnOdegXlAmrxQV3mVuloT2D1fRqB7XWA6AbZMo91deLxivT6YBFlWnnI9YZW9m9DidQeb2DqkC9KJI/loDafCBFflQJfWN2keJOtuFsXNfRg7Go0B+kQz++vPk=; Received: from p579e7cd2.dip0.t-ipconnect.de ([87.158.124.210] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1V5HQl-0000hu-Im; Fri, 02 Aug 2013 17:38:16 +0200 Received: from dotslash by pandem0nium with local (Exim 4.80) (envelope-from ) id 1V5HQi-0001ty-KH; Fri, 02 Aug 2013 17:38:12 +0200 From: Simon Wunderlich To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Mathias Kretschmer , Simon Wunderlich Subject: [PATCH 2/7] mac80211: fix ieee80211_sta_process_chanswitch for 5/10 MHz channels Date: Fri, 2 Aug 2013 17:38:01 +0200 Message-Id: <1375457886-7275-3-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1375457886-7275-1-git-send-email-siwu@hrz.tu-chemnitz.de> References: <1375457886-7275-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-purgate: clean X-purgate-type: clean X-purgate-ID: 154106::1375457895-000004FE-3F3B1B99/0-0/0-0 X-Scan-AV: nick.hrz.tu-chemnitz.de; 2013-08-02 17:38:15; b20a5128c9328f8b8faad9eaf63163d2 X-Scan-SA: nick.hrz.tu-chemnitz.de; 2013-08-02 17:38:15; c72792969cc1e70babbdbe869c3096f2 X-Spam-Score: -1.0 (-) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 Signed-off-by: Simon Wunderlich Signed-off-by: Mathias Kretschmer --- net/mac80211/mlme.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 211246b..45a87ee 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1102,6 +1102,15 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, case -1: cfg80211_chandef_create(&new_chandef, new_chan, NL80211_CHAN_NO_HT); + /* keep width for 5/10 MHz channels */ + switch (sdata->vif.bss_conf.chandef.width) { + case NL80211_CHAN_WIDTH_5: + case NL80211_CHAN_WIDTH_10: + new_chandef.width = sdata->vif.bss_conf.chandef.width; + break; + default: + break; + } break; }