From patchwork Mon Apr 15 15:09:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 2445461 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 789263FD1A for ; Mon, 15 Apr 2013 15:14:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753743Ab3DOPOM (ORCPT ); Mon, 15 Apr 2013 11:14:12 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:52915 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545Ab3DOPOL (ORCPT ); Mon, 15 Apr 2013 11:14:11 -0400 Received: by mail-wi0-f180.google.com with SMTP id c10so1665818wiw.1 for ; Mon, 15 Apr 2013 08:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=1sX5a6/KUKXYvsrPuZtTF13z1dJiNSbjgfaq1XMcIw0=; b=kHA8vPZy44Y+V55/Dc1IUxweUK4tIyLASum5ygDXrHEPk+MutSL85ktp2wQJ79/g1u PfjtU6rIxfrzIRkDBDnJn56uxlwyzZyBq4UN2k6qGGRvJTjnezGnIL0HgjFX+OwojEQw txAlXESAz0fL9I6MUrUQ7KYllmYRsF28lNg3f+MWMkS0jUaarRwOAnXUDgpXt1ItOUpG u/yrYAnTBYsCtmipQuPB/Js79Svtx5e353qESNbhZTLaRO9NJAjgtY7QyOBv4G+DgmnQ IKZjOfTfuE0OchMWlQ6OD33Lah3/CP+Io+SgLXJjM0RwRikwOhEa5W3mWERj6hfW3Qkg tJ6Q== X-Received: by 10.194.104.137 with SMTP id ge9mr27346431wjb.52.1366038850073; Mon, 15 Apr 2013 08:14:10 -0700 (PDT) Received: from magnum.frso.rivierawaves.com (vpn.rivierawaves.com. [91.151.119.162]) by mx.google.com with ESMTPS id j10sm6396488wie.1.2013.04.15.08.14.08 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Apr 2013 08:14:09 -0700 (PDT) From: Karl Beldan To: Johannes Berg Cc: linux-wireless , Karl Beldan , Karl Beldan Subject: [PATCH 2/2] mac80211_hwsim: handle VHT rates in rx_status Date: Mon, 15 Apr 2013 17:09:30 +0200 Message-Id: <1366038570-12457-2-git-send-email-karl.beldan@gmail.com> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1366038570-12457-1-git-send-email-karl.beldan@gmail.com> References: <1366038570-12457-1-git-send-email-karl.beldan@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Karl Beldan Signed-off-by: Karl Beldan --- drivers/net/wireless/mac80211_hwsim.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index b5117f5..7ede240 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -718,9 +718,17 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw, rx_status.flag |= RX_FLAG_MACTIME_START; rx_status.freq = chan->center_freq; rx_status.band = chan->band; - rx_status.rate_idx = info->control.rates[0].idx; - if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS) - rx_status.flag |= RX_FLAG_HT; + if (info->control.rates[0].flags & IEEE80211_TX_RC_VHT_MCS) { + rx_status.rate_idx = + ieee80211_rate_get_vht_mcs(&info->control.rates[0]); + rx_status.vht_nss = + ieee80211_rate_get_vht_nss(&info->control.rates[0]); + rx_status.flag |= RX_FLAG_VHT; + } else { + rx_status.rate_idx = info->control.rates[0].idx; + if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS) + rx_status.flag |= RX_FLAG_HT; + } if (info->control.rates[0].flags & IEEE80211_TX_RC_40_MHZ_WIDTH) rx_status.flag |= RX_FLAG_40MHZ; if (info->control.rates[0].flags & IEEE80211_TX_RC_SHORT_GI)