From patchwork Mon Mar 23 09:57:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6071371 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6945DBF90F for ; Mon, 23 Mar 2015 10:00:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 887A72024F for ; Mon, 23 Mar 2015 10:00:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFF362024C for ; Mon, 23 Mar 2015 10:00:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YZz9s-0007fe-Hz; Mon, 23 Mar 2015 10:00:32 +0000 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YZz9q-0007b9-S9 for ath10k@lists.infradead.org; Mon, 23 Mar 2015 10:00:31 +0000 Received: by lbcmq2 with SMTP id mq2so4295020lbc.0 for ; Mon, 23 Mar 2015 03:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=X2GgBbWkT9XJcjmWl4AEgLcGd7IM7lEmPlfrtRWqwiQ=; b=EuvDWCy1EIEijMsaGruUIG7IrltljTWy7dFAGHLM79MqmQJ3Mr/HPjqmJU+g3oNqhY SJHmy58YTKNWqcSO+g26b5HzHThtLrl0r8NHz84AJRB5opqm51xwaTp8rrQwfvrOh3vv cmOvADj5+rAIjSnw8eIzgzubvH+F4RtHHriJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X2GgBbWkT9XJcjmWl4AEgLcGd7IM7lEmPlfrtRWqwiQ=; b=hxstMEMi8fer9ooJdU7aWUAV7OoNbdhAvlXDzkOIrHea5l6zAcjjL0R7lNPmmBCRTb u18RdsiWaGYfn4Fsusq2Th1KygDDW2fC2ELE8Yw2SliRhEt8ItlvKPKEa2i/+oK1BfqB LaedrbTJT01ANefrYYlWuxGDzXXU2qloB9ASUWgoOZBzTn9I+f8pwstWlKeC3WferO1x vltQN8CcX2UN8Im3zPDO8o2/RcKH1x6/flzxFqXiF5ZGoP+i63INiYz0xwJOgVtVPbC3 OpnrM8SuH+lAGnL9kIxtPG5X0mwIHUXw+uxrEGxP0yEMLmAKbIWUIV+RefvGx0ctZGvI mzwg== X-Gm-Message-State: ALoCoQnYkhmeUyd/ePzvAfBUeBHlsTW1ZaaxZJV2xjSG4ehYvVDFudsznU+mS2JEV0JNC0EfYaeMD3y+Oqyf5UEXU4HEcCb80tCmFuAkJ/rl4LCbj6TcmpG7ylRycjmBAX98DKTFQdyLPbYBudvNHSVw50w+b2nk79XuqlvpiUnd0VLC1Cs1XJY= X-Received: by 10.112.27.137 with SMTP id t9mr9831646lbg.58.1427104808967; Mon, 23 Mar 2015 03:00:08 -0700 (PDT) Received: from bob.homerouter.cpe (apn-77-113-71-242.dynamic.gprs.plus.pl. [77.113.71.242]) by mx.google.com with ESMTPSA id rk10sm81275lac.12.2015.03.23.03.00.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Mar 2015 03:00:08 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: fix aid setup in station mode Date: Mon, 23 Mar 2015 09:57:28 +0000 Message-Id: <1427104648-5681-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150323_030031_096300_4E21CDE9 X-CRM114-Status: UNSURE ( 8.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 While debugging something else I noticed AID was set to 0. This could lead to powersave issues in station mode. Maybe this isn't really necessary but set it properly just to be sure. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 506e886..f2b4a49 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1605,12 +1605,18 @@ static void ath10k_peer_assoc_h_basic(struct ath10k *ar, struct wmi_peer_assoc_complete_arg *arg) { struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); + u32 aid; lockdep_assert_held(&ar->conf_mutex); + if (vif->type == NL80211_IFTYPE_STATION) + aid = vif->bss_conf.aid; + else + aid = sta->aid; + ether_addr_copy(arg->addr, sta->addr); arg->vdev_id = arvif->vdev_id; - arg->peer_aid = sta->aid; + arg->peer_aid = aid; arg->peer_flags |= WMI_PEER_AUTH; arg->peer_listen_intval = ath10k_peer_assoc_h_listen_intval(ar, vif); arg->peer_num_spatial_streams = 1;