From patchwork Mon Jul 10 12:40:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 9832915 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F39FB60318 for ; Mon, 10 Jul 2017 12:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6270269E2 for ; Mon, 10 Jul 2017 12:45:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAF4F27FB7; Mon, 10 Jul 2017 12:45:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F9FC269E2 for ; Mon, 10 Jul 2017 12:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbdGJMps (ORCPT ); Mon, 10 Jul 2017 08:45:48 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34369 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955AbdGJMpq (ORCPT ); Mon, 10 Jul 2017 08:45:46 -0400 Received: by mail-pg0-f67.google.com with SMTP id j186so12603469pge.1 for ; Mon, 10 Jul 2017 05:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fJhW+4O2p6z9Rf3Hp87IYyzXry2ucmnW/UpQH+3JlcE=; b=IGpb9Uw3/F/oLaF0ELizTOgI1XnNnkDj1A+9BtjgOta3j4JZCskqcP2ta1JT2U0YC0 hYHmsLWdLbMSLRrhsg2ZLdVerIqA+vJaxsB3s+2gIKiT1HDLxbhSRc669yW6mrbgw4U5 Nuqgb46qoAVF4OQP8eArJUEW2lA36xEa6d3k+BHN8rHnxnGmESTawknHpQ2+O9qec84s uHbS805uumsghUcEPpZoKNFkdzRnSRss6V39JlU4Lz0IByjbz1aXUlgmPSW0z2jFCKSk IDdgMmpLowJI0/su2Rw3C+Bu9w4rfe3zLuXwdD80ph/CO/84AeZSPifw9D73BIuK+nRR ILSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fJhW+4O2p6z9Rf3Hp87IYyzXry2ucmnW/UpQH+3JlcE=; b=ll+Pino4XCIij+achRvEyGEhvx9ovjqH7youj5RnSHIPLVBirFc0782xwMX1524UUs f+dOy7Pyu1n5Iy9W/QVHJ96RKbB3/TgZ8uaK9hiz9aLt+wjf29pzaTcWLVNVIHNSJP0l o9PlbYCrv+gECQJ40XzwnHcpQbkIA/lQNj7WxVzdXSXDQRC9X3M1xQFUDYLEvhvcle3d l43CFYKo8D+JS69SsPtS4GjSZgIusuPq93FzUp/f3OxOMyvEqc2k+0ScM1msRZkj6tHh Vn2/BUm3HvE89ci/9L/hWlD/+TM45NoATbz2bI2TpppbU8RWfSvq4ghNKsP+qPPiuB57 ysyw== X-Gm-Message-State: AIVw112Zrt0h8X0CBtY6FF2T3QxDQ5d7fy44CpZrwpsL6NPfA8XWFHOu vJnt5z2xcXJgoA== X-Received: by 10.84.131.71 with SMTP id 65mr17945666pld.35.1499690735611; Mon, 10 Jul 2017 05:45:35 -0700 (PDT) Received: from cpu185.redpinesignals.com ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id s9sm27503963pfe.67.2017.07.10.05.45.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 05:45:35 -0700 (PDT) From: Amitkumar Karwar To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Prameela Rani Garnepudi Subject: [v2 14/17] rsi: update tx command frame block/unblock data Date: Mon, 10 Jul 2017 18:10:45 +0530 Message-Id: <1499690448-9956-15-git-send-email-amitkarwar@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499690448-9956-1-git-send-email-amitkarwar@gmail.com> References: <1499690448-9956-1-git-send-email-amitkarwar@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Prameela Rani Garnepudi TX command frame block/unblock data is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 16 +++++++++------- drivers/net/wireless/rsi/rsi_mgmt.h | 13 +++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index 64bbd0a..1fba7bb 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -1327,7 +1327,7 @@ static int rsi_eeprom_read(struct rsi_common *common) */ int rsi_send_block_unblock_frame(struct rsi_common *common, bool block_event) { - struct rsi_mac_frame *mgmt_frame; + struct rsi_block_unblock_data *mgmt_frame; struct sk_buff *skb; rsi_dbg(MGMT_TX_ZONE, "%s: Sending block/unblock frame\n", __func__); @@ -1340,23 +1340,25 @@ int rsi_send_block_unblock_frame(struct rsi_common *common, bool block_event) } memset(skb->data, 0, FRAME_DESC_SZ); - mgmt_frame = (struct rsi_mac_frame *)skb->data; + mgmt_frame = (struct rsi_block_unblock_data *)skb->data; - mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12); - mgmt_frame->desc_word[1] = cpu_to_le16(BLOCK_HW_QUEUE); + rsi_set_len_qno(&mgmt_frame->desc_dword0.len_qno, 0, RSI_WIFI_MGMT_Q); + mgmt_frame->desc_dword0.frame_type = BLOCK_HW_QUEUE; + mgmt_frame->host_quiet_info = QUIET_INFO_VALID; if (block_event) { rsi_dbg(INFO_ZONE, "blocking the data qs\n"); - mgmt_frame->desc_word[4] = cpu_to_le16(0xf); + mgmt_frame->block_q_bitmap = cpu_to_le16(0xf); + mgmt_frame->block_q_bitmap |= cpu_to_le16(0xf << 4); } else { rsi_dbg(INFO_ZONE, "unblocking the data qs\n"); - mgmt_frame->desc_word[5] = cpu_to_le16(0xf); + mgmt_frame->unblock_q_bitmap = cpu_to_le16(0xf); + mgmt_frame->unblock_q_bitmap |= cpu_to_le16(0xf << 4); } skb_put(skb, FRAME_DESC_SZ); return rsi_send_internal_mgmt_frame(common, skb); - } /** diff --git a/drivers/net/wireless/rsi/rsi_mgmt.h b/drivers/net/wireless/rsi/rsi_mgmt.h index 5df64d3..cb0b17e 100644 --- a/drivers/net/wireless/rsi/rsi_mgmt.h +++ b/drivers/net/wireless/rsi/rsi_mgmt.h @@ -381,6 +381,19 @@ struct rsi_auto_rate { __le16 supported_rates[40]; } __packed; +#define QUIET_INFO_VALID BIT(0) +#define QUIET_ENABLE BIT(1) +struct rsi_block_unblock_data { + struct rsi_cmd_desc_dword0 desc_dword0; + u8 xtend_desc_size; + u8 host_quiet_info; + __le16 reserved; + __le16 block_q_bitmap; + __le16 unblock_q_bitmap; + __le16 token; + __le16 flush_q_bitmap; +} __packed; + struct qos_params { __le16 cont_win_min_q; __le16 cont_win_max_q;