Linux wireless drivers development
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Jakub Kicinski <kubakici@wp.pl>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] mt7601u: set device mac address in mt7601u_add_interface()
Date: Fri, 9 Feb 2018 10:49:21 +0100	[thread overview]
Message-ID: <20180209094920.GA2895@localhost.localdomain> (raw)
In-Reply-To: <20180208150101.0e069f65@cakuba.netronome.com>

On Feb 08, Jakub Kicinski wrote:
> On Thu,  8 Feb 2018 23:08:09 +0100, Lorenzo Bianconi wrote:
> > If mac80211 adds a vif with a different mac address respect to
> > the eeprom one, the device will not be able to connect to the ap
> > since the hw address has not been updated.
> > Fix the issue updating hw mac address in mt7601u_add_interface routine
> > 
> > BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1516935
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> > ---
> >  drivers/net/wireless/mediatek/mt7601u/main.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/net/wireless/mediatek/mt7601u/main.c b/drivers/net/wireless/mediatek/mt7601u/main.c
> > index 43ebd460ba86..3c9ea40d9584 100644
> > --- a/drivers/net/wireless/mediatek/mt7601u/main.c
> > +++ b/drivers/net/wireless/mediatek/mt7601u/main.c
> > @@ -64,6 +64,9 @@ static int mt7601u_add_interface(struct ieee80211_hw *hw,
> >  	 */
> >  	mvif->idx = idx;
> >  
> > +	if (!ether_addr_equal(dev->macaddr, vif->addr))
> > +		mt7601u_set_macaddr(dev, vif->addr);
> > +
> >  	if (dev->wcid_mask[wcid / BITS_PER_LONG] & BIT(wcid % BITS_PER_LONG))
> >  		return -ENOSPC;
> >  	dev->wcid_mask[wcid / BITS_PER_LONG] |= BIT(wcid % BITS_PER_LONG);
> 
> Sorry, my recollection of mac80211 code is waning, but can't we have
> more than one vif as long as they are on the same channel?

Hi Jakub,

yep, you are right, but according to my understanding (please correct me if
it is wrong) current implementation supports just one interface in sta mode
(i.e. mvif->idx is always 0) so my patchset just fixes the issue highlighted
in the bugzilla since I do not know if the hw supports multiple concurrent vifs
in client mode. If so, I can extend the support to multiple client vifs if it is
a way to properly configure the rx filters to allow reception from multiple mac
addresses.

Regards,
Lorenzo

  reply	other threads:[~2018-02-09  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 22:08 [PATCH 0/2] mt7601u: update mac addr if different from eeprom one Lorenzo Bianconi
2018-02-08 22:08 ` [PATCH 1/2] mt7601u: move mt7601u_set_macaddr in mac related code Lorenzo Bianconi
2018-02-28 14:57   ` [1/2] " Kalle Valo
2018-02-08 22:08 ` [PATCH 2/2] mt7601u: set device mac address in mt7601u_add_interface() Lorenzo Bianconi
2018-02-08 23:01   ` Jakub Kicinski
2018-02-09  9:49     ` Lorenzo Bianconi [this message]
2018-02-09 17:56       ` Jakub Kicinski
2018-02-09 17:57 ` [PATCH 0/2] mt7601u: update mac addr if different from eeprom one Jakub Kicinski

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=20180209094920.GA2895@localhost.localdomain \
    --to=lorenzo.bianconi@redhat.com \
    --cc=kubakici@wp.pl \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox