All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] virtual interfaces
@ 2009-09-10 12:27 Rodolphe Marques
  2009-09-10 14:44 ` Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Rodolphe Marques @ 2009-09-10 12:27 UTC (permalink / raw)
  To: ath9k-devel

hi all,

I'm having problems creating virtual managed interfaces. Last time I 
used the drivers I did it through debugfs and it worked fine.
Now the debugfs directory structure is different and I used iw to create 
the interfaces. The problem is that it creates an interface named like 
wlan1_rename that as the same mac address as the others interfaces, so I 
can't bring it up.

Is there another way to create virtual interfaces?

Best Regards
Rodolphe Marques

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ath9k-devel] virtual interfaces
  2009-09-10 12:27 [ath9k-devel] virtual interfaces Rodolphe Marques
@ 2009-09-10 14:44 ` Luis R. Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2009-09-10 14:44 UTC (permalink / raw)
  To: ath9k-devel

On Thu, Sep 10, 2009 at 5:27 AM, Rodolphe Marques
<rodolphe.marques@ua.pt> wrote:
> hi all,
>
> I'm having problems creating virtual managed interfaces. Last time I
> used the drivers I did it through debugfs and it worked fine.
> Now the debugfs directory structure is different and I used iw to create
> the interfaces. The problem is that it creates an interface named like
> wlan1_rename that as the same mac address as the others interfaces, so I
> can't bring it up.
>
> Is there another way to create virtual interfaces?

I used echo add > /sys/kernel/debug/ath9k/phy0/wiphy

Then I started hostapd on wlan1, and a regular supplicant on wlan0,
which was the original interface. The MAC address of wlan1 should be
similar to wlan0 except its xor'd with the virtual wiphy ID amongst
other things. This is done as follows:

        memcpy(addr, sc->sc_ah->macaddr, ETH_ALEN);
        addr[0] |= 0x02; /* Locally managed address */
        /*
         * XOR virtual wiphy index into the least significant bits to generate
         * a different MAC address for each virtual wiphy.
         */
        addr[5] ^= i & 0xff;
        addr[4] ^= (i & 0xff00) >> 8;
        addr[3] ^= (i & 0xff0000) >> 16;

        SET_IEEE80211_PERM_ADDR(hw, addr);

I tested virtual wiphy stuff on ath9k yesterday even on top of my
patches and it worked fine.

iw is used to create another interface, not an ath9k virtual
interface, the difference being that a virtual ath9k interface is
internal to ath9k and supports working on different channels. With iw
you may or may not be able to create a STA interface and an AP
interface for ath9k, I don't think its possible, I forget. You can
however, uses iw to create a monitor interface, for example while
still having and keeping a wlan0.

  Luis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-10 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-10 12:27 [ath9k-devel] virtual interfaces Rodolphe Marques
2009-09-10 14:44 ` Luis R. Rodriguez

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.