Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: <yhchuang@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>, <briannorris@chromium.org>
Subject: [PATCH 03/10] rtw88: config 8822c multicast address in MAC init flow
Date: Tue, 8 Oct 2019 16:20:54 +0800
Message-ID: <20191008082101.2494-4-yhchuang@realtek.com> (raw)
In-Reply-To: <20191008082101.2494-1-yhchuang@realtek.com>

From: Tzu-En Huang <tehuang@realtek.com>

Multicast address should be congiured in the initialization flow.
The value is created by a hashed calculation that is also implemented
by the hardware for multicast address filtering.

Signed-off-by: Tzu-En Huang <tehuang@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/reg.h      | 1 +
 drivers/net/wireless/realtek/rtw88/rtw8822c.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h
index a6d1260acb91..7e817bc997eb 100644
--- a/drivers/net/wireless/realtek/rtw88/reg.h
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
@@ -310,6 +310,7 @@
 #define REG_RX_PKT_LIMIT	0x060C
 #define REG_RX_DRVINFO_SZ	0x060F
 #define BIT_APP_PHYSTS		BIT(28)
+#define REG_MAR			0x0620
 #define REG_USTIME_EDCA		0x0638
 #define REG_ACKTO_CCK		0x0639
 #define REG_RESP_SIFS_CCK	0x063C
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index 434b7d726ee5..4c8916516064 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -1136,6 +1136,7 @@ static void rtw8822c_phy_set_param(struct rtw_dev *rtwdev)
 #define WLAN_RTS_RATE_FB_RATE4_H	0x400003E0
 #define WLAN_RTS_RATE_FB_RATE5		0x0600F015
 #define WLAN_RTS_RATE_FB_RATE5_H	0x000000E0
+#define WLAN_MULTI_ADDR			0xFFFFFFFF
 
 #define WLAN_TX_FUNC_CFG1		0x30
 #define WLAN_TX_FUNC_CFG2		0x30
@@ -1245,6 +1246,8 @@ static int rtw8822c_mac_init(struct rtw_dev *rtwdev)
 	rtw_write8(rtwdev, REG_BCN_MAX_ERR, WLAN_BCN_MAX_ERR);
 
 	/* WMAC configuration */
+	rtw_write32(rtwdev, REG_MAR, WLAN_MULTI_ADDR);
+	rtw_write32(rtwdev, REG_MAR + 4, WLAN_MULTI_ADDR);
 	rtw_write8(rtwdev, REG_BBPSF_CTRL + 2, WLAN_RESP_TXRATE);
 	rtw_write8(rtwdev, REG_ACKTO, WLAN_ACK_TO);
 	rtw_write8(rtwdev, REG_ACKTO_CCK, WLAN_ACK_TO_CCK);
-- 
2.17.1


  parent reply index

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08  8:20 [PATCH 00/10] rtw88: minor throughput improvement yhchuang
2019-10-08  8:20 ` [PATCH 01/10] rtw88: add power tracking support yhchuang
2019-10-09  8:17   ` Kalle Valo
2019-10-08  8:20 ` [PATCH 02/10] rtw88: Enable 802.11ac beamformee support yhchuang
2019-10-14  9:38   ` Kalle Valo
2019-10-08  8:20 ` yhchuang [this message]
2019-10-14  9:08   ` [PATCH 03/10] rtw88: config 8822c multicast address in MAC init flow Kalle Valo
2019-10-08  8:20 ` [PATCH 04/10] rtw88: add set_bitrate_mask support yhchuang
2019-10-08  8:20 ` [PATCH 05/10] rtw88: update regulatory settings implementaion yhchuang
2019-10-14  9:39   ` Kalle Valo
2019-10-08  8:20 ` [PATCH 06/10] rtw88: add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 support yhchuang
2019-10-14  9:11   ` Kalle Valo
2019-10-08  8:20 ` [PATCH 07/10] rtw88: Use rtw_write8_set to set SYS_FUNC yhchuang
2019-10-08  8:20 ` [PATCH 08/10] rtw88: pci: config phy after chip info is setup yhchuang
2019-10-08  8:21 ` [PATCH 09/10] rtw88: coex: Set 4 slot mode for A2DP yhchuang
2019-10-08  8:21 ` [PATCH 10/10] rtw88: add phy_info debugfs to show Tx/Rx physical status yhchuang
2019-10-14  9:45 ` [PATCH 00/10] rtw88: minor throughput improvement Kalle Valo
2019-10-15  3:23   ` Tony Chuang

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191008082101.2494-4-yhchuang@realtek.com \
    --to=yhchuang@realtek.com \
    --cc=briannorris@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git