Search Linux Wireless

Re: [PATCH] mac80211: Allow single vif mac address change with addr_mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 22, 2013 at 2:42 PM, Jakub Kiciński <moorray3@xxxxx> wrote:
> Perhaps you could incorporate the change to assign_pem_addr
> into your patch and send v2 adding my Sign-off?

Will do.

>> > @@ -1479,7 +1483,17 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
>> >                         break;
>> >                 }
>> >
>> > +               /*
>> > +                * Pick address of existing interface in case user changed
>> > +                * MAC address manually, default to perm_addr.
>> > +                */
>> >                 m = local->hw.wiphy->perm_addr;
>> > +               list_for_each_entry(sdata, &local->interfaces, list) {
>> > +                       if (sdata->vif.type == NL80211_IFTYPE_MONITOR)
>> > +                               continue;
>> > +                       m = sdata->vif.addr;
>> > +                       break;
>> > +               }
>> >                 start = ((u64)m[0] << 5*8) | ((u64)m[1] << 4*8) |
>> >                         ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) |
>> >                         ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8);
>>
>> This is only relevant if the driver registered a addr_mask with mac80211.
>> So, maybe you could only select a new address (!=perm_addr) if the
>> perm_addr is not covered by the addr_mask?
>
> I'm not sure I understand all the internal logic, but if
> driver doesn't set addr_mask it will always get one of
> wiphy->addresses or perm_addr and leave on line 1468 [1]
> before reaching this code.

My fault. This is indeed correct.

Johannes, please drop this patch. I'll respin.

Thanks,
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux