Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1846641ybl; Sat, 1 Feb 2020 07:36:15 -0800 (PST) X-Google-Smtp-Source: APXvYqz2kYfcL3TrAZVlBRd8GXZdVFwbkMDHq22cjmnH7EmZYUlhAiukn/g7FniCLPsymLyN6+Xo X-Received: by 2002:aca:4dca:: with SMTP id a193mr9758797oib.156.1580571375507; Sat, 01 Feb 2020 07:36:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580571375; cv=none; d=google.com; s=arc-20160816; b=t5KoQ/pzAq22YIBlKo9sC+OE54IbrTqMdI3n/W95CZ5JpWGtPflzrfPb6lj+1c/GLP PIqD6Kieho5efTW6n8AC0LcYUOdWx8fSdFQvdZpKysloBMiiyz1vBghjlF+jT8lITBy6 oALRy0gaSxuZEfrdthEAyQpCT4d87wm9qet47aDu/R5DhRQQWm8W0TUJrHv2A2Rr7NBi VbQet09FFVNO9DzldTOvVuXHI4FJGpfIEBqPaZY5y0A7wFDu15MenNTKADBPgLsW+oqY jc6df4Pb8Kvb8Ie0+ffF/HwM3PriSGCc1cWpu45Kv2nRrSJlaf73jpuHPwt/vvAvs0g/ pPbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PT9WxQGhC3cEbQOw6A82uZTv0dUXzk8iQLhXQx+MP6c=; b=e1CCNJwd1a8l8zNxfbraq4KGYbbE3c9eTIp+Y2bh4pWgCy6E5IV3iX5TUhF0sq6LFd 68SBob0BLyrKRRXJjMJ+4mN5KZRo8bd6BRvtSmT2ebadkMNO99FMNxe6o5SGly7Kx/fL RTp7IxNnh3bdY7qewLroyJPAI64evmz/ox77UwtXlyP/Ws1cKXt1A6nv3UW751KLVzUw YZrJL9v1K3e8yGhRJqIN3I8DfIvT8Yk6bP49XIE0DED8qb7ogupg2hslmNUKhZg0i3+d yuJo2HFaPt+mdR0347Zpp4+Of0UhztmAM4BCveacGZBGN3xBzSVfqVoEV4YfQWZL1LdA ghFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OKhOB6K8; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si5625290oim.223.2020.02.01.07.36.05; Sat, 01 Feb 2020 07:36:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OKhOB6K8; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727102AbgBAPeK (ORCPT + 99 others); Sat, 1 Feb 2020 10:34:10 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:21498 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727074AbgBAPeJ (ORCPT ); Sat, 1 Feb 2020 10:34:09 -0500 X-UUID: f39701e74dd6459a9df1b464c915aa84-20200201 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=PT9WxQGhC3cEbQOw6A82uZTv0dUXzk8iQLhXQx+MP6c=; b=OKhOB6K8UmH+JEUH+rd4cnpU/RbT0s62TmQ1AvggXnzg6ep/pXS4J6qnBQbFc30Nn/VZ6WLKzb3CQnb5OQ8JRdQbpBjP5XOfVRMbq17jmyja5b0ko+lOkqOsPvDw0VL5u+0Pprd1BGNwirs93ELZ+4opJWw39VScSZp9qd+EXKo=; X-UUID: f39701e74dd6459a9df1b464c915aa84-20200201 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1043976491; Sat, 01 Feb 2020 23:34:00 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 1 Feb 2020 23:33:58 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 1 Feb 2020 23:31:33 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , Roy Luo , Sean Wang , Josh Boyer , , , Ryder Lee Subject: [PATCH v2 3/7] mt76: mt7615: add a helper to encapsulate sta_rec operation Date: Sat, 1 Feb 2020 23:33:48 +0800 Message-ID: <0be0e4d66e8a775c7e0f0b9d9289cb149df97678.1580565624.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 7CC7DEA808D52862B1BE4DBA5B8249145234E03B1BFC32F24DCA5334ADE3C7792000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org T3BlcmF0aW5nIGNvbW1hbmQgaXMgc2ltcGxlciBhbmQganVzdCBhcyBjbGVhcg0KDQpTaWduZWQt b2ZmLWJ5OiBSeWRlciBMZWUgPHJ5ZGVyLmxlZUB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