From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/5] mt76x2u: use common mt76x02_add_interface
Date: Fri, 9 Nov 2018 12:18:49 +0100 [thread overview]
Message-ID: <20181109111848.GE4174@localhost.localdomain> (raw)
In-Reply-To: <1541758814-2046-4-git-send-email-sgruszka@redhat.com>
> There is no need anymore to use custom add interface function
> for mt76x02u.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 --
> drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +++---
> drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | 12 +-----------
> 3 files changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h
> index a8c5fdd903b9..f8e998ef8716 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x02.h
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h
> @@ -115,8 +115,6 @@ int mt76x02_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> int mt76x02_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> struct ieee80211_sta *sta);
>
> -void mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
> - unsigned int idx);
> int mt76x02_add_interface(struct ieee80211_hw *hw,
> struct ieee80211_vif *vif);
> void mt76x02_remove_interface(struct ieee80211_hw *hw,
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> index 2aa3f4b15fd9..dbf9d89dd328 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> @@ -228,8 +228,9 @@ int mt76x02_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> }
> EXPORT_SYMBOL_GPL(mt76x02_sta_remove);
>
> -void mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
> - unsigned int idx)
> +static void
> +mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
> + unsigned int idx)
> {
> struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
>
> @@ -238,7 +239,6 @@ void mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
> mvif->group_wcid.hw_key_idx = -1;
> mt76x02_txq_init(dev, vif->txq);
> }
> -EXPORT_SYMBOL_GPL(mt76x02_vif_init);
>
> int
> mt76x02_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
> index 977e74091a27..6b51dd749491 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c
> @@ -46,16 +46,6 @@ static void mt76x2u_stop(struct ieee80211_hw *hw)
> mutex_unlock(&dev->mt76.mutex);
> }
>
> -static int mt76x2u_add_interface(struct ieee80211_hw *hw,
> - struct ieee80211_vif *vif)
> -{
> - struct mt76x02_dev *dev = hw->priv;
> - unsigned int idx = 8;
> -
> - mt76x02_vif_init(dev, vif, idx);
> - return 0;
> -}
This routines seems wrong since here we should have the possibility to change
the device mac address:
https://github.com/nbd168/wireless/blob/mt76/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c#L54
and IIRC I have not removed it in:
https://patchwork.kernel.org/patch/10670853/
Regards,
Lorenzo
> -
> static int
> mt76x2u_set_channel(struct mt76x02_dev *dev,
> struct cfg80211_chan_def *chandef)
> @@ -122,7 +112,7 @@ static int mt76x2u_add_interface(struct ieee80211_hw *hw,
> .tx = mt76x02_tx,
> .start = mt76x2u_start,
> .stop = mt76x2u_stop,
> - .add_interface = mt76x2u_add_interface,
> + .add_interface = mt76x02_add_interface,
> .remove_interface = mt76x02_remove_interface,
> .sta_add = mt76x02_sta_add,
> .sta_remove = mt76x02_sta_remove,
> --
> 1.9.3
>
next prev parent reply other threads:[~2018-11-09 11:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 10:20 [PATCH 0/5] mt76x02: bssid setup corrections for STA Stanislaw Gruszka
2018-11-09 10:20 ` [PATCH 1/5] mt76x02: correct set bssid " Stanislaw Gruszka
2018-11-09 11:09 ` Lorenzo Bianconi
2018-11-09 11:49 ` Stanislaw Gruszka
2018-11-09 11:52 ` Felix Fietkau
2018-11-09 12:50 ` Lorenzo Bianconi
2018-11-09 13:26 ` Stanislaw Gruszka
2018-11-09 13:42 ` Lorenzo Bianconi
2018-11-09 13:47 ` Felix Fietkau
2018-11-09 10:20 ` [PATCH 2/5] mt76x02: initalize mutli bss mode by default Stanislaw Gruszka
2018-11-09 11:26 ` Lorenzo Bianconi
2018-11-09 13:10 ` Stanislaw Gruszka
2018-11-09 13:31 ` Lorenzo Bianconi
2018-11-09 16:25 ` Stanislaw Gruszka
2018-11-09 16:51 ` Lorenzo Bianconi
2018-11-09 10:20 ` [PATCH 3/5] mt76x2u: use common mt76x02_add_interface Stanislaw Gruszka
2018-11-09 11:18 ` Lorenzo Bianconi [this message]
2018-11-09 10:20 ` [PATCH 4/5] mt76x02: minor beaconing init changes Stanislaw Gruszka
2018-11-09 11:33 ` Lorenzo Bianconi
2018-11-09 13:16 ` Stanislaw Gruszka
2018-11-09 13:59 ` Lorenzo Bianconi
2018-11-09 10:20 ` [PATCH 5/5] mt76x02: remove no longer actual comment Stanislaw Gruszka
Reply instructions:
You may reply publicly 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=20181109111848.GE4174@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=sgruszka@redhat.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.