From patchwork Fri Apr 24 11:29:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 11507641 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E1AA13B2 for ; Fri, 24 Apr 2020 11:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E52B120767 for ; Fri, 24 Apr 2020 11:30:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=quantenna.com header.i=@quantenna.com header.b="bZ8JeThv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgDXLam (ORCPT ); Fri, 24 Apr 2020 07:30:42 -0400 Received: from mx0a-00183b01.pphosted.com ([67.231.149.44]:40830 "EHLO mx0a-00183b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgDXLal (ORCPT ); Fri, 24 Apr 2020 07:30:41 -0400 Received: from pps.filterd (m0048105.ppops.net [127.0.0.1]) by mx0a-00183b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03OBQo8s032588; Fri, 24 Apr 2020 05:30:37 -0600 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by mx0a-00183b01.pphosted.com with ESMTP id 30fxuf1t5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Apr 2020 05:30:37 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FC7r+kIQ+lL23nhOnUsF+IHCGYd6pCQINofAGQgXxMBXiZK34NwuAX/WQ8t/Au/YJEXHJmB1MaMfvEdkOljQt/mYVI+tqIUwruRAWpqKmgZQi04bRtjuKFAubIZUFzKmEbp+a85SXhXWkea6JOHS5NvGgnuREmaUtYe6M50giI9atUjrDPIMSrgj4IiMTHU3y4/DTgcKKx/MOB4itnjhPOakwh0MoCeirYxMlpZwm9MxB8Re1HSRc3/ixsNpVebmmc1EgISZkCRV4Zf9/ZbmBF39C9/lsIZB5emn846Uwu1plu2aceR1EngMPncWCoDZSME6MiGkPMRmu0bWdTNR9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K8OcPkuw2awlnfwW8cIsiZ3qeqIoBbCceKRjdys56rE=; b=KmkXAJtxGBtnjJCxu9fECSTfw8soaGJb2Pr4nyHL6DJpplhk9wrbBWUq/cLhSPtJn41UPJWDPz4Bx6+RJkL10+2Dx/JPYfhR7le0MFGhnKWPNJ3kVUSQstA6jLRgcPcj/Z+KxxMc6ULMF2Rb/YcJ43RuxURPtOrFuO3WXEofaGWesANETYFg/ZYci8mCnzTiJn6R2HtOCeE03wfNEvtAjjGLO0HSXOt2+rdDGZ7oGwt4hZyI+khxbf1KpJGAELPYnXJyHYe6HKS5FxWe+s4rgWsmiiIb5Qk3NtDSg1zFp7Rsj/9UsZ5vQMxysGwZWw+gY6jMPsrIpbjbhmIbEipwRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quantenna.com; dmarc=pass action=none header.from=quantenna.com; dkim=pass header.d=quantenna.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K8OcPkuw2awlnfwW8cIsiZ3qeqIoBbCceKRjdys56rE=; b=bZ8JeThvMMEBXA2SQPFTYtT+nmkXMWLXMPfbreH4dNgkwm/eAaZi0+8vXhmTuCJiW5DttwlsVMRpS/dneGy35E+z8bmzEz9bAKhv+0YpDT0u7OXqorGM3vOL/t/mtlrb1XoDQQ9pzbHeRs8ozjRtBCJxdLsfB+yGbE9zYwT+msc= Received: from SN6PR05MB5695.namprd05.prod.outlook.com (2603:10b6:805:101::30) by SN6PR05MB4525.namprd05.prod.outlook.com (2603:10b6:805:31::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.12; Fri, 24 Apr 2020 11:30:36 +0000 Received: from SN6PR05MB5695.namprd05.prod.outlook.com ([fe80::1053:d922:d99e:c3f8]) by SN6PR05MB5695.namprd05.prod.outlook.com ([fe80::1053:d922:d99e:c3f8%7]) with mapi id 15.20.2958.010; Fri, 24 Apr 2020 11:30:35 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) by CY4PR05MB3160.namprd05.prod.outlook.com (2603:10b6:903:f2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:29:15 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048]) by CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048%6]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:29:15 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org CC: Tamizh Chelvam , Johannes Berg , Sergey Matyukevich Subject: [RFC PATCH v2 1/5] cfg80211: fix mask type in cfg80211_tid_cfg structure Date: Fri, 24 Apr 2020 14:29:01 +0300 Message-ID: <20200424112905.26770-2-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> References: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> X-ClientProxiedBy: AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) To CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from bars.quantenna.com (195.182.157.78) by AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 11:29:14 +0000 X-Mailer: git-send-email 2.11.0 X-Originating-IP: [195.182.157.78] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59f8e8f1-91d8-40bd-2b2b-08d7e842b84b X-MS-TrafficTypeDiagnostic: CY4PR05MB3160:|SN6PR05MB4525: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-Moderation-Data: 4/24/2020 11:30:27 AM X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-Forefront-PRVS: 03838E948C X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR05MB5695.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(39850400004)(376002)(346002)(366004)(136003)(396003)(103116003)(1076003)(8676002)(52116002)(8936002)(4744005)(478600001)(2906002)(107886003)(26005)(81156014)(5660300002)(6916009)(7696005)(316002)(66946007)(54906003)(66476007)(186003)(66556008)(16526019)(6486002)(2616005)(6666004)(956004)(4326008)(86362001)(36756003);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wh/+RBV+teNd+kGJCiHkn63L/WRiDTgIPvmiiqROlrhvbSl+RW9jRyfb/4o1hhv5MJXadclM17/FWAq5+E2xNbxlAzvWwoNGGGOG6/FI4KsoJShe83BD+3zWBQKsqhVahpNed0TTsbkvtAKdr6K99jn4Qms5Bw3+HbdCbXe8UqG0OwmsXvjFEKp3WM2G9RBCZ0g8qukarVWdZjqwkXNU/gj8xFjGKNEs/C/4r+5t4EjAagIYdmntAZPtbW6qzz8WMDe4MT0XYtdmcC9JZ0HTu4LotF514yEKzOvkTY1zM/dOBCVLg8AvbMgNaXs2CR8W9YmXWCAUcwlkoFK9O9bTGoMirKvIwlFMuG6thn066ikZ/7wUDHwOU3BPu6cnjshdmhsDZHBNMh/3s+1jwgV8445xMEQPeA1nRpLC9U7A6ARvOMHD79r9k3b1TGyWmfxf X-MS-Exchange-AntiSpam-MessageData: PymyQrObkh5/v1ZckQPt5K2qWsPl1jx4CYNsqYdxs5zn9Ha7GK+1yh6Et0NJI37rWgbwM+ZTo+Iahzo0Og++pL4Qa91AZE8FoK+mmt6bkZ7B3H9N/a++CZdbDR/SpkQxFQ9FvY4W8Ov6wV3Gu53Fmw== X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59f8e8f1-91d8-40bd-2b2b-08d7e842b84b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7AuO+++cI5dsgEV8rLLgFXfZJtLP9PbQPn2dyQSHXpZDfJpUbkjbCknnRuTJeVlmQehHTwb34jdvOx9HNL3kmAHcI/eGx4DlkU2iJftN8iCLtSU2aYaVTC2Li8IBQq3fukFOg+PUnyyaLacW2rNv3pS0YB6Jbx1H70RLTCUyAcndUMyk/H10ebf9v367aGBtMTwt+WyU0iD45g/Sx+swHNCAqOsWc/K+aZYIimTkOBc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 11:30:35.8426 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4525 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-24_04:2020-04-23,2020-04-24 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=1 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004240091 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org TIDs mask type is u64 in wiphy settings and nl80211 processing, see: - wiphy TIDs mask sizes in tid_config_support structure - prepare driver command in parse_tid_conf Use the same type for TIDs mask in cfg80211_tid_cfg. Signed-off-by: Sergey Matyukevich --- include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a82fc59a1d82..a2b2d31530a9 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -646,7 +646,7 @@ struct cfg80211_chan_def { struct cfg80211_tid_cfg { bool config_override; u8 tids; - u32 mask; + u64 mask; enum nl80211_tid_config noack; u8 retry_long, retry_short; enum nl80211_tid_config ampdu; From patchwork Fri Apr 24 11:29:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 11507643 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57E6592C for ; Fri, 24 Apr 2020 11:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A3C120767 for ; Fri, 24 Apr 2020 11:32:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=quantenna.com header.i=@quantenna.com header.b="T/fW7ulO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726707AbgDXLb7 (ORCPT ); Fri, 24 Apr 2020 07:31:59 -0400 Received: from mx0b-00183b01.pphosted.com ([67.231.157.42]:11480 "EHLO mx0a-00183b01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726668AbgDXLb6 (ORCPT ); Fri, 24 Apr 2020 07:31:58 -0400 Received: from pps.filterd (m0059811.ppops.net [127.0.0.1]) by mx0b-00183b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03OBQRdu008499; Fri, 24 Apr 2020 05:30:13 -0600 Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2051.outbound.protection.outlook.com [104.47.46.51]) by mx0b-00183b01.pphosted.com with ESMTP id 30ka133vcp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Apr 2020 05:30:13 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YHZmxXmIT1uC/gq1vcwsOp/fPMPgFAH/HNajpH+DguHfz2lrgyn9mY55vHA6JwBHHSry7TFXq7lFi6cZ/VDpcXkoZ+bq7iV2mAyalPd72VmGYAa7zcsAazlqsGGI1bjT8jYkBgBlRYcLcZrkOKlrOYp+LPn3lKsMhDuh7FRj4iDMV+oRlUtvBMGpayQd981+2GEa2jfVj/4j8nB/R+QgnA5HeY0ti4EkSuKlGICHTdcev/ZlScqu4TqBgt7jR1Wz4I3N03H3+7XxkHAMzpHI4X+sk2JYTmBmHUZRODQLTw1JLdtVP1WpG8p04AJk9phCIDRQC4IwGbSp8JlG+XCR9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XvNQ9fd/ZvtOVklE7YbQDz1waeW1ol2i5FyFoS4+s/4=; b=hiTkK1T7GJBsAkHURU8kxHhkOsehnRxGboFOSmfYHKMfa3tDBcaubm3BumHs9UzLLsYe6y3gk5z99z1R4McPdOiQbVOm77ReD79Fy6dKLI/UJiU7tW9wSoiSYF82em+3dYZXThLS8IX9KjEw4nBv5QMhKCvlY8IAz8LW9Y+bK7hf9pW7zsAoCWNNUxxhJRjYmFU5JCLIAlKZAXXpZoiYAYlcQB/D7RRe5lmAbeI4AVS9GU2ENdx3aELxWMalwln0KrrRu/ExNnz9HfUwWw7JtfaL8o8rekwe9pxAHEa+/V6W5JkzroLADucGLOeP0hQucylYDeYylfkv9uu+AEx1bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quantenna.com; dmarc=pass action=none header.from=quantenna.com; dkim=pass header.d=quantenna.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XvNQ9fd/ZvtOVklE7YbQDz1waeW1ol2i5FyFoS4+s/4=; b=T/fW7ulOm6lpEs6HQOUMdo6v0+Lz4CV+LHWmebswlKIRs8pG/Chr1g6DYu6/bp7ER1/KL992e6R+Tg9A3Y5VkkZsRuH/wkMslFMe4ogm9iilkA3NpjtN5j9OgOZDdMCTkuMYnYlgdst4Y8f4o6YxBzGYfweTpQ4ASE6lLRMTICU= Received: from DM6PR05MB6266.namprd05.prod.outlook.com (2603:10b6:5:11d::32) by DM6PR05MB6506.namprd05.prod.outlook.com (2603:10b6:5:126::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.5; Fri, 24 Apr 2020 11:30:10 +0000 Received: from DM6PR05MB6266.namprd05.prod.outlook.com ([fe80::459b:9bb3:1d3:a613]) by DM6PR05MB6266.namprd05.prod.outlook.com ([fe80::459b:9bb3:1d3:a613%7]) with mapi id 15.20.2958.010; Fri, 24 Apr 2020 11:30:10 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) by CY4PR05MB3160.namprd05.prod.outlook.com (2603:10b6:903:f2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:29:17 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048]) by CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048%6]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:29:17 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org CC: Tamizh Chelvam , Johannes Berg , Sergey Matyukevich Subject: [RFC PATCH v2 2/5] mac80211: fix variable names in TID config methods Date: Fri, 24 Apr 2020 14:29:02 +0300 Message-ID: <20200424112905.26770-3-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> References: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> X-ClientProxiedBy: AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) To CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from bars.quantenna.com (195.182.157.78) by AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 11:29:15 +0000 X-Mailer: git-send-email 2.11.0 X-Originating-IP: [195.182.157.78] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c51bc5ef-072f-4fc6-9c45-08d7e842b938 X-MS-TrafficTypeDiagnostic: CY4PR05MB3160:|DM6PR05MB6506: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-Moderation-Data: 4/24/2020 11:30:06 AM X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-Forefront-PRVS: 03838E948C X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR05MB6266.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(136003)(396003)(346002)(376002)(366004)(39850400004)(26005)(2616005)(4326008)(2906002)(956004)(478600001)(6916009)(16526019)(36756003)(8936002)(186003)(107886003)(7696005)(52116002)(6666004)(54906003)(316002)(6486002)(66476007)(66556008)(66946007)(81156014)(1076003)(5660300002)(86362001)(103116003)(8676002);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K3ZG1eHKnSodVYdCij0sw90hy0DxeCXoRTLooV6hBbzPeLNaRTHMgSIUZgo4M7uka6q4oMNU351RIfKo1lX0Oj7INPxow2rDnMmfzYNGgIfD/0HAWUdjxx7bgwmuNsoQYiDIUCy0eVMsEfENedRzEbDR9Kf058vrpx4IIPHsA87oJVI1Rj4SwUIUkCt5PVWXYUTtrO6dMlqk2k9UeZc6mihYOhme4Oon/4zV0DIG8hlCq6NyiiKP/nEUGHRrGun+XJ8njc9yGC/GiFRNft7FVDtSjdQ5aLRtvbG/OsCR21L66gJIguiZf6+k9oJ/JglJO37uV1q/zTsgTj5Xg/v5Je9Ybh3dRpyjsDHo+T7vpHW/Ub0xFfhn7HFclP3LJf4K8QxA98PYFDPAKB2xiR56kvI95b5BNPqWM5wpvkDtXc3iBE7pOOookJzQxFWV1gJh X-MS-Exchange-AntiSpam-MessageData: QdVTFcJmCP1F+ylQMAeDuQxxGMNnDkaepvG2qAzcTbN+jLa9Jcf+nPNd7FCD8P+/rmbw2zwZnrzKSIVgbbpVX3c1b1rfjtTkxs2Ciwkcjnfksqusj1kB+IfpZx1VjRnB+o96Awjuu/Wr1Ikw2ibLdnsvNBseZBgDoPeHgp1/PFnd+t+JuzkXdVgZYH1/aVL849aVZs+tb+WQwIf6GNwMa5KNjRG95Mx2Efmr2HbiMSzwIMRtTO/mVEQnf+LFFY4j1y1fx2j0QEd3fX2MQnSqINZFM93AGM5PPPTOT+teI811y8wVWlEIi2eWlIsl3pK7plLxk+GPouYcheHqsE/A6x0O1KmkEJAT5CHVYJ4GxOIAAwUFsJWxERrtMXIChtZEMDTGHTkAhYhElm9oFZGFMSTbXiDE+dzj+cAEV68wf6bINj0Zhi2mA3IbatZbIGz6qOWnWphRZp25ulW9X2qslDh11yIQIfMCEfjeMY9R7pBox8UpAkWyA/MyxNdiYwb8AKbifEAW5lpyUZHd/F11wOVYWc4rqYXzU0KS09ByV6ESq93P8VTrBzdV61CYt4ghIAUZHyR8jmTSY0LSELJsJ0oLHfV+b0jm6WSt5TmGyNkVQrG0xTPKr9LPvhIkV8ySE7DQeW2CwBLiy4ufiDlvQaXuy9ooDX6WIgYPF0ZuNfZOoOoZ7jwfKxrDw7WOmf8kB7mqn12fXfCTVdIOg+YLBm3WlznZs02MzEO5AOhT6M6C4VUvfc7xTwLDCMEy2ZFJmDY7EncbCvxPfEHS8ljQdhnUwAGahaVEzmChoV5dsAM= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: c51bc5ef-072f-4fc6-9c45-08d7e842b938 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d+jWXKUTJr4gJcIm20JcNOpFR2IqC/nGblHPMQ4RozMMvvJ5BS+l8N0XpzcsFCyDEnwsksDMxv7zua029Q+35YOsyxlFhKrCN+5X2os6DZ7Q9VQuwnJYETjc9o+7SyNKNfctMy95QbXoYwEClYDykcHxpvHp5OB9OtsarwrXMoQWfwl0uQ20ACJRxnoJyzGGLa40ZkR7wlOQnaml2v8fBg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 11:30:10.7952 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB6506 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-24_04:2020-04-23,2020-04-24 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 priorityscore=1501 mlxlogscore=999 phishscore=0 spamscore=0 bulkscore=0 clxscore=1015 mlxscore=0 suspectscore=1 malwarescore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004240091 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix all variable names from 'tid' to 'tids' to avoid confusion. Now this is not TID number, but TID mask. Signed-off-by: Sergey Matyukevich --- net/mac80211/cfg.c | 6 +++--- net/mac80211/driver-ops.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ae3e06375a28..608c2b034804 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3933,7 +3933,7 @@ static int ieee80211_set_tid_config(struct wiphy *wiphy, static int ieee80211_reset_tid_config(struct wiphy *wiphy, struct net_device *dev, - const u8 *peer, u8 tid) + const u8 *peer, u8 tids) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct sta_info *sta; @@ -3943,7 +3943,7 @@ static int ieee80211_reset_tid_config(struct wiphy *wiphy, return -EOPNOTSUPP; if (!peer) - return drv_reset_tid_config(sdata->local, sdata, NULL, tid); + return drv_reset_tid_config(sdata->local, sdata, NULL, tids); mutex_lock(&sdata->local->sta_mtx); sta = sta_info_get_bss(sdata, peer); @@ -3952,7 +3952,7 @@ static int ieee80211_reset_tid_config(struct wiphy *wiphy, return -ENOENT; } - ret = drv_reset_tid_config(sdata->local, sdata, &sta->sta, tid); + ret = drv_reset_tid_config(sdata->local, sdata, &sta->sta, tids); mutex_unlock(&sdata->local->sta_mtx); return ret; diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 3877710e3b48..de69fc9c4f07 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1375,12 +1375,12 @@ static inline int drv_set_tid_config(struct ieee80211_local *local, static inline int drv_reset_tid_config(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, - struct ieee80211_sta *sta, u8 tid) + struct ieee80211_sta *sta, u8 tids) { int ret; might_sleep(); - ret = local->ops->reset_tid_config(&local->hw, &sdata->vif, sta, tid); + ret = local->ops->reset_tid_config(&local->hw, &sdata->vif, sta, tids); trace_drv_return_int(local, ret); return ret; From patchwork Fri Apr 24 11:29:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 11507635 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30B671805 for ; Fri, 24 Apr 2020 11:30:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13EC520767 for ; Fri, 24 Apr 2020 11:30:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=quantenna.com header.i=@quantenna.com header.b="RzgkqegW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbgDXLaR (ORCPT ); Fri, 24 Apr 2020 07:30:17 -0400 Received: from mx0a-00183b01.pphosted.com ([67.231.149.44]:58030 "EHLO mx0a-00183b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgDXLaQ (ORCPT ); Fri, 24 Apr 2020 07:30:16 -0400 Received: from pps.filterd (m0048105.ppops.net [127.0.0.1]) by mx0a-00183b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03OBQZQb032536; Fri, 24 Apr 2020 05:30:12 -0600 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx0a-00183b01.pphosted.com with ESMTP id 30fxuf1t3y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Apr 2020 05:30:12 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ch5p+VQzmAXKjkN63fE0uKiN6w/bTvKUJnzT95JjklPqqYrCXfM4q5+Na4e6rM3sSYvlmSjoHKww4+3o36MfvKbQZeV1Ej8rHXgvhG7oC6Gzpu/pdObt5B5mfWFyyFeFKv7zHbyJdFk0Om4fAPkT5faQ7ZKBpNtCkSgog0BTe+NLIa2HXkEK3nvZwEqewwItM3qyknKNPYe4Lp/euIQmprqSe2agodvFvbJdXcd7l7FUzyHcIynAGEXXfTtrAYsB18nvxzCB31PoaN7tKs2rf0XwwbBF9S9G3uILGqBSWkf42Ctn5DMUE3NwXVr2uxsjox9FYJ3JdBvfRs78fzs8eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GT9YqyX9nLsHbZ7+SvXBQ6vtQ3gfbdHPemUxqA4c/DI=; b=RUHMl+ITCmmqdxAkdTteN7x4lCMShLR/jXVZWm6aYt8jX7U3hyL8c/uW3rCzgXAl9oDA1O/0X8ice68mD2w4RMyxmv6MAIvUcAkBy0ZhOWisAfegvHec3kYt/pU2sjCTUsGvpXIfwneJVIG1IoTwn3VrEnAy5aIo7zCgcs00VtuBoD4S5dpBTHuKLGDxPP38zwHDZew1Tj8712KWLs3FERTXydyiIoF+hqX5PUX3tPDPeyIFUMQYty2t0CIjHIRdPgz2vp6T/uefBjOdCajXmGW7kqNp3JYFPKp4FbsARLl7W/BauFJ6dP+lJQDqOg0mvxz0O+ckf5r07IF9Xg7bGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quantenna.com; dmarc=pass action=none header.from=quantenna.com; dkim=pass header.d=quantenna.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GT9YqyX9nLsHbZ7+SvXBQ6vtQ3gfbdHPemUxqA4c/DI=; b=RzgkqegWMxeTVLdp9vePNRIgnhd4+Ga3ij2SMIVGAMhmNDnjgaW9SVGqCS6UKPupq7xwnUQpS999ZX0LHXZIjK5UqpII3HLVMWISh23QE1bQNlcfPbJkiFVsXebe8KvbEw5Tei+XLYDb87ErACUhuzPLE1UTsg3jRpIZww3fhwM= Received: from DM6PR05MB4684.namprd05.prod.outlook.com (2603:10b6:5:fa::12) by DM6PR05MB6347.namprd05.prod.outlook.com (2603:10b6:5:132::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.6; Fri, 24 Apr 2020 11:30:10 +0000 Received: from DM6PR05MB4684.namprd05.prod.outlook.com ([fe80::fc28:e348:eef6:bc06]) by DM6PR05MB4684.namprd05.prod.outlook.com ([fe80::fc28:e348:eef6:bc06%2]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:30:10 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) by CY4PR05MB3160.namprd05.prod.outlook.com (2603:10b6:903:f2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:29:18 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048]) by CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048%6]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:29:18 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org CC: Tamizh Chelvam , Johannes Berg , Sergey Matyukevich Subject: [RFC PATCH v2 3/5] cfg80211: add support for TID specific AMSDU configuration Date: Fri, 24 Apr 2020 14:29:03 +0300 Message-ID: <20200424112905.26770-4-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> References: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> X-ClientProxiedBy: AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) To CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from bars.quantenna.com (195.182.157.78) by AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 11:29:17 +0000 X-Mailer: git-send-email 2.11.0 X-Originating-IP: [195.182.157.78] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 186fb5a3-fc54-4ab9-f8ec-08d7e842ba14 X-MS-TrafficTypeDiagnostic: CY4PR05MB3160:|DM6PR05MB6347: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-Moderation-Data: 4/24/2020 11:30:09 AM X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-Forefront-PRVS: 03838E948C X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR05MB4684.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(346002)(396003)(366004)(136003)(376002)(39850400004)(6916009)(5660300002)(7696005)(107886003)(103116003)(52116002)(66556008)(36756003)(2616005)(186003)(316002)(6486002)(54906003)(478600001)(66946007)(66476007)(2906002)(4326008)(16526019)(6666004)(8936002)(8676002)(86362001)(1076003)(81156014)(26005)(956004);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 71gi+ay/CfKIrrgX/w6GBoOaUV/3Oxvv482+23zdVqfVAo6Lxnt4flbNeSrJk1Jx5BvTXvDGZGSJDkza2qfgumg+YL1/Cw4QTQNsIhuG9jdQ81fB1aMSH8cEdo/Ew+eCtyrJuI8ErMpH+AiCBfUoCl8UzX/jhGI08amzwlV6AGB+1VK+1vTG6fGmxtAXhVjnQirPlrZ3Nv9j0ZK7xQK0q9eeInAmuQbeGjWw5sA/7EoKZtqg53eK+3JNDt68Z5jpCPMrfW5rAxu1wJtJJzRBa3JdPyicQSRhcCljVWuLLTpvX3E1/BMS/1oZlf3Ut+zorfWhh0scjxNNiSSAtRej/AlD95BMneXbR1IYxHBSIfX+RhAv2zpQk840f4HiaAytzJHmht36nZirMD57GIEnd2jFrH4NM/KHd/9sAa5uffVvOqd9peNC7OMVTBdiYPC+ X-MS-Exchange-AntiSpam-MessageData: FqEI6HPCT+HEDmwkToA7IRehrlZkwHganRwlXH6RQeHtgcZdbMln3m+dOlDoiR7npYK4egjraZCDxRMAoPFJygpmBntAWw6+ksyS1vcs9xSaSlwIndTRI+yM09RGhc3y73B+2P+GhyeV2+mC0y1XIerHwdWNK4D4oRiRsgj32KkUdFLy8uqtMth8kDjDPtzOw4Z7SQsmtmyj444FZwAVT4O3B3gCPQ1gMU1m5FIQkS5fSexJqy2OL1i1sb49ti51glZjAtxBVBmDl8ezOJpAqElhlgxZvITD24Zj9K8iwjACPt9m6KzjfWVJjtPVvEcQwvuFJcKlhJCha85NG3KCb+lLH5OpN3VLqXKtnCXUV5rerTKfbmKeR2I5a/84uB56fB3FuCJOhMjKL3AqugN4gDf6EVCMzwObgRyY+TA2dzPszrSYWTdtr1lx2mff4gg6D6Nzq8TkVdk69m2bfeoXhI+NOFqUvwWplzSfghYA3mIwbaxZdjBM7P3dmeU7mDdESU5fGHFE8lOJ/bvGJ8SI3RWaLs23Py4YdeUtovrLq+UOqw9jpinwZUKMpMt4OvvSIEuUGLRbdDoo29s6CPM6IMdW4C/ZfhEjloPNEM4r/jsSHMuZJeVp/XeHgxGjO2S57L8Uayn1oY5P7xUKss90C13b0TOk2+2enYCP1IOLyziYwcccpDOxxEbxwywI0Gpw1gf4lfJmXom0Ntu+eGJHEAIid3acsX3ZsKNzopJB4Vv53dgtqaxgoEdW4EGhJgANCu4xGgXzvi+5DOOaoGLNoZCePij/qV4HUYHdZ1dyoek= X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 186fb5a3-fc54-4ab9-f8ec-08d7e842ba14 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SPtiVLnmojQEabET/b872UkdVP/zH9VcEDiDaFipBmSYMNdKBDND2czLrdMXxCu2q6RDUD9Ilu6uVjUocj4N+5dAzSC9piuufelfB5sqkVWfjU1A2G0Ngf5P91EtyC8Cdg7SSQbSm+MLNfiLVqsbaLa4J4GGW+Ggtmju7v+X8DEGfRw/DiU+kOdHYXxXg/QAWOmAnC0dvFuEjmPj8M76WA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 11:30:10.8270 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB6347 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-24_04:2020-04-23,2020-04-24 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=1 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004240091 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch adds support to control per TID MSDU aggregation using the NL80211_TID_CONFIG_ATTR_AMSDU_CTRL attribute. Signed-off-by: Sergey Matyukevich --- include/net/cfg80211.h | 4 +++- include/uapi/linux/nl80211.h | 10 +++++++--- net/wireless/nl80211.c | 8 ++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a2b2d31530a9..83148b2d4907 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -640,8 +640,9 @@ struct cfg80211_chan_def { * @noack: noack configuration value for the TID * @retry_long: retry count value * @retry_short: retry count value - * @ampdu: Enable/Disable aggregation + * @ampdu: Enable/Disable MPDU aggregation * @rtscts: Enable/Disable RTS/CTS + * @amsdu: Enable/Disable MSDU aggregation */ struct cfg80211_tid_cfg { bool config_override; @@ -651,6 +652,7 @@ struct cfg80211_tid_cfg { u8 retry_long, retry_short; enum nl80211_tid_config ampdu; enum nl80211_tid_config rtscts; + enum nl80211_tid_config amsdu; }; /** diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 9679d561f7d0..1ccb0bf657ec 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4844,12 +4844,15 @@ enum nl80211_tid_config { * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and * the max value is advertised by the driver in this attribute on * output in wiphy capabilities. - * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TIDs - * specified in %NL80211_TID_CONFIG_ATTR_TIDS. Its type is u8, using - * the values from &nl80211_tid_config. + * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable MPDU aggregation + * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS. + * Its type is u8, using the values from &nl80211_tid_config. * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs * specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using * the values from &nl80211_tid_config. + * @NL80211_TID_CONFIG_ATTR_AMSDU_CTRL: Enable/Disable MSDU aggregation + * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS. + * Its type is u8, using the values from &nl80211_tid_config. */ enum nl80211_tid_config_attr { __NL80211_TID_CONFIG_ATTR_INVALID, @@ -4863,6 +4866,7 @@ enum nl80211_tid_config_attr { NL80211_TID_CONFIG_ATTR_RETRY_LONG, NL80211_TID_CONFIG_ATTR_AMPDU_CTRL, NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL, + NL80211_TID_CONFIG_ATTR_AMSDU_CTRL, /* keep last */ __NL80211_TID_CONFIG_ATTR_AFTER_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 3d27b24c68b2..aef0dd59dd4f 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -345,6 +345,8 @@ nl80211_tid_config_attr_policy[NL80211_TID_CONFIG_ATTR_MAX + 1] = { NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), [NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL] = NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), + [NL80211_TID_CONFIG_ATTR_AMSDU_CTRL] = + NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), }; const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { @@ -14127,6 +14129,12 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL]); } + if (attrs[NL80211_TID_CONFIG_ATTR_AMSDU_CTRL]) { + tid_conf->mask |= BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL); + tid_conf->amsdu = + nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_AMSDU_CTRL]); + } + if (peer) mask = rdev->wiphy.tid_config_support.peer; else From patchwork Fri Apr 24 11:29:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 11507637 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5958813B2 for ; Fri, 24 Apr 2020 11:30:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D08320767 for ; Fri, 24 Apr 2020 11:30:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=quantenna.com header.i=@quantenna.com header.b="fV2WlKxa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726925AbgDXLaY (ORCPT ); Fri, 24 Apr 2020 07:30:24 -0400 Received: from mx0a-00183b01.pphosted.com ([67.231.149.44]:49918 "EHLO mx0a-00183b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgDXLaY (ORCPT ); Fri, 24 Apr 2020 07:30:24 -0400 Received: from pps.filterd (m0048106.ppops.net [127.0.0.1]) by mx0a-00183b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03OBQAOI032281; Fri, 24 Apr 2020 05:30:20 -0600 Received: from nam02-cy1-obe.outbound.protection.outlook.com (mail-cys01nam02lp2058.outbound.protection.outlook.com [104.47.37.58]) by mx0a-00183b01.pphosted.com with ESMTP id 30fvd7224q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Apr 2020 05:30:20 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q7bTKHBv/MM9bMUukT6GymytWJxFyODWNMsFQsJHGrBMilUxggntrI0SbHtdi5bVX4w/9bHz6nmyxw/IEM4OhkeOZj10gkXJpXu7sN0YUKI0yLRe8/bZMGyz8uExPrhV61F3+D8bba1UszWx6aVR6pH3Tf8rRR3twYsotPRriuWqv4nuSWYIqW9vxhduRT64+/prFLG2hDUjLHJxn9AWu/DXbxuiiTiSfp6Lg1qSN9GMHqvBs18w7P2whoCVDDQPCy4vo4DOn6U6ijigozrkt29j18ltw+ymxxy3Tu1t1YX00gdUGRRFzDUG8hIRUO+RQIBHyw1diPzoFdTIpiva6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wf3Y1vQNn+fJww7TC0rZqad9jFHn3A3G3Tu66cdOzzk=; b=bKyw1gaWnHwilcshyFzRDvxks3EgukbbXr+z7Lr5GZpOqkc2Xa/rpYWqF/NbKl7lY21H7QZ2cugOlXi+OE/o/29YAylFgC8tQPz7yn5pf1aoA7bcpN0tTedzSdoPTGY1FAcOrEDu5U/OQ3DRbFYf8Hm9EKo0KS9AUaccL3jibLcyAPXPOtZePxCq1EqaZVLomet4YGq45xeRaed1kOmXOxV8ETJWu4daM1kXBh5CEeEwgM94EzwERbBFu+FCyVKHZaQDbPJK0Z+GFqPeZEycRFOuyAB3nNyns81AZOsA6JqJbiH/0VXU7lMOnCa6oqEBkpxYu9Opo/9w+266h1c3eA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quantenna.com; dmarc=pass action=none header.from=quantenna.com; dkim=pass header.d=quantenna.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wf3Y1vQNn+fJww7TC0rZqad9jFHn3A3G3Tu66cdOzzk=; b=fV2WlKxa/WKB0vPDGiWz9W4QWsySTVGu8UH38a15hWYBVPHJK4rGNe7Iw/RY16i8JZPwUqmIBcfUU/qaYnSGpl66gTkkVInRlET3RUSRatTTZghIv2ZlpR8Y/aUu9Gnr5VWz3Igai7QkA4GFfTxMHlKpK9lP/EujRaM9HpX7KDg= Received: from SN6PR05MB5519.namprd05.prod.outlook.com (2603:10b6:805:c7::26) by SN6PR05MB4813.namprd05.prod.outlook.com (2603:10b6:805:9e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:30:18 +0000 Received: from SN6PR05MB5519.namprd05.prod.outlook.com ([fe80::d16f:9f91:9f9d:11b6]) by SN6PR05MB5519.namprd05.prod.outlook.com ([fe80::d16f:9f91:9f9d:11b6%3]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:30:18 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) by CY4PR05MB3160.namprd05.prod.outlook.com (2603:10b6:903:f2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:29:20 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048]) by CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048%6]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:29:20 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org CC: Tamizh Chelvam , Johannes Berg , Sergey Matyukevich Subject: [RFC PATCH v2 4/5] nl80211: simplify peer specific TID configuration Date: Fri, 24 Apr 2020 14:29:04 +0300 Message-ID: <20200424112905.26770-5-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> References: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> X-ClientProxiedBy: AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) To CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from bars.quantenna.com (195.182.157.78) by AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 11:29:18 +0000 X-Mailer: git-send-email 2.11.0 X-Originating-IP: [195.182.157.78] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99701b80-15ab-48da-8501-08d7e842baf6 X-MS-TrafficTypeDiagnostic: CY4PR05MB3160:|SN6PR05MB4813: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-Moderation-Data: 4/24/2020 11:30:16 AM X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 03838E948C X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR05MB5519.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(396003)(376002)(39850400004)(136003)(366004)(346002)(4326008)(6916009)(66556008)(26005)(6666004)(66476007)(186003)(66946007)(6486002)(16526019)(103116003)(86362001)(1076003)(107886003)(81156014)(8936002)(8676002)(7696005)(52116002)(54906003)(36756003)(2616005)(478600001)(956004)(2906002)(316002)(5660300002);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LPBi7/N52utuJxTHJlGGbgXvEbNJJX2GIPRryHToTu51uOUsDbJG7b32oxAeVhuqyD3vIaDnCrr6wjo/RZLO6/rngau7whVhNdivm+Xhblwu9+Da/5e/hf7KaE3QE7C4bPdh98trwXxj17A/sO1FBRprhDNzWSvpB8beTOcEYsMZOhyLng9bA4EaQBOUMZbnlXnKs1Pe9bma4zLU6YreW6jSd6NYi+uvv60bu6iSA//9pmUvvfnzqk+ovPHyWlNCIyLCeN6PcnCiNHFHyGS6Mwfq6YJ36WagQTo7pMsoaKQD2vH2nmyVgYHCOeCDPrxkUHDc89l/zenPmYEHNJ73XgapBxnvq64gQ0erGxCQjH6J0czFEFuAWSlGYE87WsbNZ7vLRnpaRn2ePr88O1FmhgvrrvYrVWUqXxRCnaq7keww5thWTC6zWhTAWxTRx06b X-MS-Exchange-AntiSpam-MessageData: y9Rg66k8qRdi6m+DckGS8DCd3YnqNkPSHDCEu3oZ2DiHu9X5UsShI/0FgLk7ltvZOkwxZ1L9ZgBQPDVZyEx+lA7IUvY1E1pitPxFMw+TSchnx/CnvBKFRHNLQ7+Kg8hg7Wkga+NCZZqwNAXLcZC3OA== X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99701b80-15ab-48da-8501-08d7e842baf6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iuqpx2gk1swiPjdLjhjWPAoaR4D3h1elASWlMh0pC5rSxhLOQWwz/NZNAoOmXItDOIfvI0+mbCfA/ZIB/Ky7Y2aWzHlSKMjNkHGb3+iJMdECucdUkNKMy4qsO8aIcI4PuoUGFRviW/akcJkNNM7zUpRkGjec+GHwwoIpAQvhOUIk2GYxKgw7FexHvirhR5eyHZE0tHimzA5egqw4PsQPHQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 11:30:18.6481 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4813 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-24_04:2020-04-23,2020-04-24 signatures=0 X-Proofpoint-Spam-Reason: safe Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Current rule for applying TID configuration for specific peer looks overly complicated. No need to reject new TID configuration when override flag is specified. Another call with the same TID configuration, but without override flag, allows to apply new configuration anyway. Use the same approach as for the 'all peers' case: if override flag is specified, then reset existing TID configuration and immediately apply a new one. Signed-off-by: Sergey Matyukevich --- include/uapi/linux/nl80211.h | 10 ++++------ net/wireless/nl80211.c | 5 +---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 1ccb0bf657ec..d1b1d9e49887 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4823,12 +4823,10 @@ enum nl80211_tid_config { * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but * per peer instead. - * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if no peer - * is selected, if set indicates that the new configuration overrides - * all previous peer configurations, otherwise previous peer specific - * configurations should be left untouched. If peer is selected then - * it will reset particular TID configuration of that peer and it will - * not accept other TID config attributes along with peer. + * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates + * that the new configuration overrides all previous peer + * configurations, otherwise previous peer specific configurations + * should be left untouched. * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7) * Its type is u16. * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID. diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index aef0dd59dd4f..31c61e8739d9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -14083,10 +14083,7 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, if (rdev->ops->reset_tid_config) { err = rdev_reset_tid_config(rdev, dev, peer, tid_conf->tids); - /* If peer is there no other configuration will be - * allowed - */ - if (err || peer) + if (err) return err; } else { return -EINVAL; From patchwork Fri Apr 24 11:29:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 11507639 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4D1813B2 for ; Fri, 24 Apr 2020 11:30:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78E2B20767 for ; Fri, 24 Apr 2020 11:30:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=quantenna.com header.i=@quantenna.com header.b="BgkeSaVr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbgDXLae (ORCPT ); Fri, 24 Apr 2020 07:30:34 -0400 Received: from mx0a-00183b01.pphosted.com ([67.231.149.44]:60842 "EHLO mx0a-00183b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgDXLae (ORCPT ); Fri, 24 Apr 2020 07:30:34 -0400 Received: from pps.filterd (m0048105.ppops.net [127.0.0.1]) by mx0a-00183b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03OBQo8q032588; Fri, 24 Apr 2020 05:30:29 -0600 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by mx0a-00183b01.pphosted.com with ESMTP id 30fxuf1t4w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Apr 2020 05:30:29 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HFMPs6YAdN2x9GfkkT/5o7098yzrLgCw13y927LX4U1+tYvAHhC2rsfwPPbEvMl03e+Jd5V8EyKcbrsaoxnbVm28mq2m389dCCFukGkcal5azSbqpOACmHkAED8dvdYNZkpYoAkGxgLPWDyMeGd1FAQq8JZXSgXRSeaS0RHHtX0glk4Z0Pq3B3cFsGJJ3KcoLhQiQhCeDhgtNhebB5e38Yj8yL01rwU4gKc/VtupJkcYueQAufLCaEz91mSFYfR9a8f5FSijwoCNl94wuge0BRzrszpFqGQ6iw4x/HVqHKWXmLMMdh5sv0sDBroH+RmxLLuq3CxTRs/UHNUG3DMmdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UFZu/96ON3IEOx4vzwVz0mo+YAZZYBoqYP8i184h7J0=; b=jvtpdzMerpQqGB0z/EIu0AnoHTJIM4Sy2EeZ/IiWxHs/Y4Of7NgdwDdGhsGGpijFchdQjv0JC7bZeMGxC4375Yt8v1DmB6ddfQSRogr5nuPolc3aTK6i0Q34f53pkK1MaOnkm1J2Yt5VbedeEzFl9cM+fAUM1GZ9qz2yS9w37KjQn7PwgMrAWF4gX8e3ViTavhpgQ+f82D3Zr71w8b+dwpFUYfWyrVTwndgWaR0kr7PZ8bGTyss2trlzDUN2Z0JAdvTwFXLNIfNovfcG9JTE+B6vIljt9L/Y5F5wGmqYeoas+VOGoO1cw/3JL2nLxrtBqawlHl3hd51xGGOXkWNtWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quantenna.com; dmarc=pass action=none header.from=quantenna.com; dkim=pass header.d=quantenna.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UFZu/96ON3IEOx4vzwVz0mo+YAZZYBoqYP8i184h7J0=; b=BgkeSaVr0s080auQQGX6AIrQOVTgxCHknqnm+SovXXtCrjVAV/gWQDjy1Vq0BVxdoiWVu3TsJ8Amkf21TqPXc3cqKuHGtRSt0DWcNv+Qxj7g3m/kkJDw1dQpN3SW7L02uR6DUqKX2fZlKVpApZsQL6kelbE7ohE1d2FHXKV07qQ= Received: from CY1PR05MB2650.namprd05.prod.outlook.com (2a01:111:e400:c618::11) by CY1PR05MB2489.namprd05.prod.outlook.com (2a01:111:e400:c613::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:30:27 +0000 Received: from CY1PR05MB2650.namprd05.prod.outlook.com ([fe80::7c5e:6652:ca0f:b13d]) by CY1PR05MB2650.namprd05.prod.outlook.com ([fe80::7c5e:6652:ca0f:b13d%7]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:30:27 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) by CY4PR05MB3160.namprd05.prod.outlook.com (2603:10b6:903:f2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.11; Fri, 24 Apr 2020 11:29:21 +0000 Received: from CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048]) by CY4PR05MB3558.namprd05.prod.outlook.com ([fe80::f5eb:c5ec:8fe4:e048%6]) with mapi id 15.20.2937.012; Fri, 24 Apr 2020 11:29:21 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org CC: Tamizh Chelvam , Johannes Berg , Sergey Matyukevich Subject: [RFC PATCH v2 5/5] iw: add TID specific configuration command Date: Fri, 24 Apr 2020 14:29:05 +0300 Message-ID: <20200424112905.26770-6-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> References: <20200424112905.26770-1-sergey.matyukevich.os@quantenna.com> X-ClientProxiedBy: AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) To CY4PR05MB3558.namprd05.prod.outlook.com (2603:10b6:910:53::39) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from bars.quantenna.com (195.182.157.78) by AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 11:29:20 +0000 X-Mailer: git-send-email 2.11.0 X-Originating-IP: [195.182.157.78] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64378d33-b0bb-41cc-26aa-08d7e842bbd7 X-MS-TrafficTypeDiagnostic: CY4PR05MB3160:|CY1PR05MB2489: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-Moderation-Data: 4/24/2020 11:30:26 AM X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-Forefront-PRVS: 03838E948C X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY1PR05MB2650.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(136003)(39850400004)(396003)(376002)(366004)(346002)(66946007)(4326008)(478600001)(6916009)(66556008)(1076003)(5660300002)(6666004)(54906003)(26005)(316002)(66476007)(36756003)(7696005)(52116002)(86362001)(107886003)(8936002)(81156014)(6486002)(8676002)(103116003)(956004)(186003)(2616005)(2906002)(16526019);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4UtuoZnal2YxGpnKQqIVahLd95Y9bYGIQXo+bEi5bDDCr8p2F0xJ2iOK9kb/+vh3gMtgxq245yT2GZ1K2K0AL1KXPwVakeTSV57GJfMMaeVkvyEhFGQiWbu1bLp+t8hongU8fJ+cXbdcKZR4WXDJD2knLq4wErKXvbzUl1CtuC+v330sdSny5evE81hQxq0TjAr1Hzk1xq4+NLGKT9EDMgnFu6DOMr9biYj80+NRCqB9sEeW83YFWIC9AT0CR+uKyD+PmIgw7dh6v7WDFgsFXXtG5LitMDeyAKmA+K2HEx0iavF25ytKFTF+m8ZExWd478dNeWrh3HDz3isug4i+TnGGIlD3R7EhzYvrx0Z0081SPSSPFskaqFHougXnSdbRo3CV/jjYvEWMD4you7D+s3WojBEdd925Jl0S9xf/BolMIDU3TP+/GLuAF9xhAh7W X-MS-Exchange-AntiSpam-MessageData: 8EYTJpVYOwDGUvjQTsi2zSQC37F0fmDnGy4hGzmaAYbQo6kS7yx3PB7kNqch7g/vYzoCdnTdTTtL8EkJuFyJ/ki7yx80SrasV2DZAGpcU6aS3Wb6Lax7GDsc/6eWvxbGJb0GekDtRiGkaIJdxzoWfw== X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64378d33-b0bb-41cc-26aa-08d7e842bbd7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZCm3KjBfxpmW9Fd8Lzq93xaycezI+Nym2Cl72rboXUsycYhSRwHqyHezzABcek4kZXxJJDBxEq0yup21YDInXN+immePOjCOuYe3QZFzGaKBkhY59e/a858bzM9VNBfBSHAgj0kxJyU70RjI3Okc6yBAkLBCRRV7+WNLkJaKvN7BAyZjwT5I5iwSfDUpfrgNTb8zupJYNHUTnNXyNpXGjg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 11:30:27.6270 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2489 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-24_04:2020-04-23,2020-04-24 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=1 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004240091 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use command NL80211_CMD_SET_TID_CONFIG to perform per-node TID specific configuration. If peer is not specified, then configuration is applied to all the peers. Currently kernel supports configuration of the following parameters: - short/long retry - mpdu/msdu aggregation on/off - rts/cts on/off - noack on/off Examples: Apply configuration for specific peer and TIDs: $ iw dev wlan0 set tidconf peer 1:2:3:4:5:6 tids 0x3 ampdu off tids 0x2 sretry 10 lretry 100 $ iw dev wlan0 set tidconf peer 1:2:3:4:5:6 tids 0x1 override ampdu off amsdu off Apply configuration for all peers and all TIDs: $ iw dev wlan0 set tidconf tids 0xff ampdu off amsdu off sretry 10 lretry 100 noack off Apply configuration for all peers and specific TIDs: $ iw dev wlan0 set tidconf peer 0xff:0xff:0xff:0xff:0xff:0xff tids 0x1 ampdu off amsdu off Signed-off-by: Sergey Matyukevich --- interface.c | 229 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) diff --git a/interface.c b/interface.c index 6a44304..df96bed 100644 --- a/interface.c +++ b/interface.c @@ -727,3 +727,232 @@ COMMAND(switch, freq, "Switch the operating channel by sending a channel switch announcement (CSA)."); COMMAND(switch, channel, " [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons ] [block-tx]", NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL); + + +static int toggle_tid_param(const char *argv0, const char *argv1, + struct nl_msg *msg, uint32_t attr) +{ + uint8_t val; + + if (strcmp(argv1, "on") == 0) { + val = NL80211_TID_CONFIG_ENABLE; + } else if (strcmp(argv1, "off") == 0) { + val = NL80211_TID_CONFIG_DISABLE; + } else { + fprintf(stderr, "Invalid %s parameter: %s\n", argv0, argv1); + return 2; + } + + NLA_PUT_U8(msg, attr, val); + return 0; + + nla_put_failure: + return -ENOBUFS; +} + +static int handle_tid_config(struct nl80211_state *state, + struct nl_msg *msg, + int argc, char **argv, + enum id_input id) +{ + struct nlattr *tids_array = NULL; + struct nlattr *tids_entry = NULL; + unsigned char peer[ETH_ALEN]; + int tids_num = 0; + char *end; + int ret; + enum { + PS_ADDR, + PS_TIDS, + PS_CONF, + } parse_state = PS_ADDR; + + while (argc) { + switch (parse_state) { + case PS_ADDR: + if (strcmp(argv[0], "peer") == 0) { + if (argc < 2) { + fprintf(stderr, "Not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + if (mac_addr_a2n(peer, argv[1])) { + fprintf(stderr, "Invalid MAC address\n"); + return 2; + } + + NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, peer); + + argc -= 2; + argv += 2; + parse_state = PS_TIDS; + + } else if (strcmp(argv[0], "tids") == 0) { + parse_state = PS_TIDS; + } else { + fprintf(stderr, "Peer MAC address expected\n"); + return HANDLER_RET_USAGE; + } + + break; + case PS_TIDS: + if (strcmp(argv[0], "tids") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + if (!tids_array) { + tids_array = nla_nest_start(msg, NL80211_ATTR_TID_CONFIG); + if (!tids_array) + return -ENOBUFS; + } + + if (tids_entry) { + nla_nest_end(msg, tids_entry); + tids_num++; + } + + tids_entry = nla_nest_start(msg, tids_num); + if (!tids_entry) + return -ENOBUFS; + + NLA_PUT_U16(msg, NL80211_TID_CONFIG_ATTR_TIDS, strtol(argv[1], &end, 0)); + if (*end) { + fprintf(stderr, "Invalid TID mask value: %s\n", argv[1]); + return 2; + } + + argc -= 2; + argv += 2; + parse_state = PS_CONF; + } else { + fprintf(stderr, "TID mask expected\n"); + return HANDLER_RET_USAGE; + } + + break; + case PS_CONF: + if (strcmp(argv[0], "tids") == 0) { + parse_state = PS_TIDS; + } else if (strcmp(argv[0], "override") == 0) { + NLA_PUT_FLAG(msg, NL80211_TID_CONFIG_ATTR_OVERRIDE); + + argc -= 1; + argv += 1; + } else if (strcmp(argv[0], "ampdu") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + ret = toggle_tid_param(argv[0], argv[1], msg, + NL80211_TID_CONFIG_ATTR_AMPDU_CTRL); + if (ret) + return ret; + + argc -= 2; + argv += 2; + } else if (strcmp(argv[0], "amsdu") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + ret = toggle_tid_param(argv[0], argv[1], msg, + NL80211_TID_CONFIG_ATTR_AMSDU_CTRL); + if (ret) + return ret; + + argc -= 2; + argv += 2; + } else if (strcmp(argv[0], "noack") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + ret = toggle_tid_param(argv[0], argv[1], msg, + NL80211_TID_CONFIG_ATTR_NOACK); + if (ret) + return ret; + + argc -= 2; + argv += 2; + } else if (strcmp(argv[0], "rtscts") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + ret = toggle_tid_param(argv[0], argv[1], msg, + NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL); + if (ret) + return ret; + + argc -= 2; + argv += 2; + } else if (strcmp(argv[0], "sretry") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + NLA_PUT_U8(msg, NL80211_TID_CONFIG_ATTR_RETRY_SHORT, strtol(argv[1], &end, 0)); + if (*end) { + fprintf(stderr, "Invalid short_retry value: %s\n", argv[1]); + return 2; + } + + argc -= 2; + argv += 2; + } else if (strcmp(argv[0], "lretry") == 0) { + if (argc < 2) { + fprintf(stderr, "not enough args for %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + NLA_PUT_U8(msg, NL80211_TID_CONFIG_ATTR_RETRY_LONG, strtol(argv[1], &end, 0)); + if (*end) { + fprintf(stderr, "Invalid long_retry value: %s\n", argv[1]); + return 2; + } + + argc -= 2; + argv += 2; + } else { + fprintf(stderr, "Unknown parameter: %s\n", argv[0]); + return HANDLER_RET_USAGE; + } + + break; + default: + fprintf(stderr, "Failed to parse: internal failure\n"); + return HANDLER_RET_USAGE; + } + } + + if (tids_entry) + nla_nest_end(msg, tids_entry); + + if (tids_array) + nla_nest_end(msg, tids_array); + + return 0; + +nla_put_failure: + return -ENOBUFS; +} + +COMMAND(set, tidconf, "[peer ] tids [override] [sretry ] [lretry ] " + "[ampdu [on|off]] [amsdu [on|off]] [noack [on|off]] [rtscts [on|off]]", + NL80211_CMD_SET_TID_CONFIG, 0, CIB_NETDEV, handle_tid_config, + "Setup per-node TID specific configuration for TIDs selected by bitmask.\n" + "If MAC address is not specified, then supplied TID configuration\n" + "applied to all the peers.\n" + "Examples:\n" + " $ iw dev wlan0 tids 0x1 ampdu off\n" + " $ iw dev wlan0 tids 0x5 ampdu off amsdu off rtscts on\n" + " $ iw dev wlan0 tids 0x3 override ampdu on noack on rtscts on\n" + " $ iw dev wlan0 peer xx:xx:xx:xx:xx:xx tids 0x1 ampdu off tids 0x3 amsdu off rtscts on\n" + );