* [PATCH] mt76x0: init: use mt76x02_mac_shared_key_setup in mt76x0_init_hardware
[not found] <cover.1540767086.git.lorenzo.bianconi@redhat.com>
@ 2018-10-28 22:54 ` Lorenzo Bianconi
2018-11-05 16:59 ` Felix Fietkau
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2018-10-28 22:54 UTC (permalink / raw)
To: nbd; +Cc: sgruszka, linux-wireless
Use mt76x02_mac_shared_key_setup utility routine for shared key
initialization and remove duplicated code
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
index 64eb6f451541..23ff29990ff7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
@@ -176,13 +176,6 @@ static int mt76x0_init_wcid_mem(struct mt76x02_dev *dev)
return 0;
}
-static void mt76x0_init_key_mem(struct mt76x02_dev *dev)
-{
- u32 vals[4] = {};
-
- mt76_wr_copy(dev, MT_SKEY_MODE_BASE_0, vals, ARRAY_SIZE(vals));
-}
-
static int mt76x0_init_wcid_attr_mem(struct mt76x02_dev *dev)
{
u32 *vals;
@@ -260,7 +253,7 @@ EXPORT_SYMBOL_GPL(mt76x0_mac_stop);
int mt76x0_init_hardware(struct mt76x02_dev *dev)
{
- int ret;
+ int ret, i, k;
if (!mt76x02_wait_for_wpdma(&dev->mt76, 1000))
return -EIO;
@@ -289,7 +282,9 @@ int mt76x0_init_hardware(struct mt76x02_dev *dev)
if (ret)
return ret;
- mt76x0_init_key_mem(dev);
+ for (i = 0; i < 16; i++)
+ for (k = 0; k < 4; k++)
+ mt76x02_mac_shared_key_setup(dev, i, k, NULL);
ret = mt76x0_init_wcid_attr_mem(dev);
if (ret)
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mt76x0: init: use mt76x02_mac_shared_key_setup in mt76x0_init_hardware
2018-10-28 22:54 ` [PATCH] mt76x0: init: use mt76x02_mac_shared_key_setup in mt76x0_init_hardware Lorenzo Bianconi
@ 2018-11-05 16:59 ` Felix Fietkau
0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2018-11-05 16:59 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: sgruszka, linux-wireless
On 2018-10-28 23:54, Lorenzo Bianconi wrote:
> Use mt76x02_mac_shared_key_setup utility routine for shared key
> initialization and remove duplicated code
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Applied, thanks.
- Felix
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-05 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1540767086.git.lorenzo.bianconi@redhat.com>
2018-10-28 22:54 ` [PATCH] mt76x0: init: use mt76x02_mac_shared_key_setup in mt76x0_init_hardware Lorenzo Bianconi
2018-11-05 16:59 ` Felix Fietkau
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.