2013-07-05 15:30:03

by Hector Palacios

[permalink] [raw]
Subject: Passing a custom MAC to ath6kl

Greetings,

Is there a way to pass a custom MAC address to the ath6kl upstream driver?
In the ISC version of the driver, a softmac.c file is provided that reads a MAC from a
file if a module parameter softmac_enable=1 is passed.
Is there any reason why this has not made it upstream?

Best regards,
--
Hector Palacios


2013-07-05 15:50:02

by Kalle Valo

[permalink] [raw]
Subject: Re: Passing a custom MAC to ath6kl

Hector Palacios <[email protected]> writes:

> Is there a way to pass a custom MAC address to the ath6kl upstream driver?

Not right now. It has been a common feature request so I'm hoping
someone will implement it soon.

> In the ISC version of the driver, a softmac.c file is provided that
> reads a MAC from a file if a module parameter softmac_enable=1 is
> passed. Is there any reason why this has not made it upstream?

Providing mac address through a file is too ugly for upstream. We need
to implement it properly using the proper interface.

--
Kalle Valo

2013-07-05 15:57:09

by Hector Palacios

[permalink] [raw]
Subject: Re: Passing a custom MAC to ath6kl

Dear Kalle,

On 07/05/2013 05:49 PM, Kalle Valo wrote:
> Hector Palacios <[email protected]> writes:
>
>> Is there a way to pass a custom MAC address to the ath6kl upstream driver?
>
> Not right now. It has been a common feature request so I'm hoping
> someone will implement it soon.
>
>> In the ISC version of the driver, a softmac.c file is provided that
>> reads a MAC from a file if a module parameter softmac_enable=1 is
>> passed. Is there any reason why this has not made it upstream?
>
> Providing mac address through a file is too ugly for upstream. We need
> to implement it properly using the proper interface.

I totally agree. What would be the proper interface for that?

Best regards,
--
Hector Palacios

2013-07-05 20:23:50

by Kalle Valo

[permalink] [raw]
Subject: Re: Passing a custom MAC to ath6kl

Arend van Spriel <[email protected]> writes:

> On 07/05/2013 05:56 PM, Hector Palacios wrote:
>> Dear Kalle,
>>
>> On 07/05/2013 05:49 PM, Kalle Valo wrote:
>>> Hector Palacios <[email protected]> writes:
>>>
>>>> Is there a way to pass a custom MAC address to the ath6kl upstream
>>>> driver?
>>>
>>> Not right now. It has been a common feature request so I'm hoping
>>> someone will implement it soon.
>>>
>>>> In the ISC version of the driver, a softmac.c file is provided that
>>>> reads a MAC from a file if a module parameter softmac_enable=1 is
>>>> passed. Is there any reason why this has not made it upstream?
>>>
>>> Providing mac address through a file is too ugly for upstream. We need
>>> to implement it properly using the proper interface.
>>
>> I totally agree. What would be the proper interface for that?
>
> Add .ndo_set_mac_address() callback in main.c and go from there.
>
> int (*ndo_set_mac_address)(struct net_device *dev, void *addr);

And the challenge with ath6kl is that we need to stop the firmware,
change mac address in the firmware and restart the firmware. So it's not
trivial to add that but it shouldn't be too difficult either. Patches
more than welcome :)

--
Kalle Valo

2013-07-05 18:02:20

by Arend van Spriel

[permalink] [raw]
Subject: Re: Passing a custom MAC to ath6kl

On 07/05/2013 05:56 PM, Hector Palacios wrote:
> Dear Kalle,
>
> On 07/05/2013 05:49 PM, Kalle Valo wrote:
>> Hector Palacios <[email protected]> writes:
>>
>>> Is there a way to pass a custom MAC address to the ath6kl upstream
>>> driver?
>>
>> Not right now. It has been a common feature request so I'm hoping
>> someone will implement it soon.
>>
>>> In the ISC version of the driver, a softmac.c file is provided that
>>> reads a MAC from a file if a module parameter softmac_enable=1 is
>>> passed. Is there any reason why this has not made it upstream?
>>
>> Providing mac address through a file is too ugly for upstream. We need
>> to implement it properly using the proper interface.
>
> I totally agree. What would be the proper interface for that?

Add .ndo_set_mac_address() callback in main.c and go from there.

int (*ndo_set_mac_address)(struct net_device *dev, void *addr);

Regards,
Arend

> Best regards,
> --
> Hector Palacios
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>



2013-07-30 16:55:04

by Priti

[permalink] [raw]
Subject: Re: Passing a custom MAC to ath6kl

Hi,

i am looking for a way to update MAC address for ar6103.
i am using compat-wirless-3.4.rc3-1 package and linux 2.3.31 kernel.
i have tried many ways to hard code the mac address value just to see the
change in mac address.i am able to see the updated mac address while giving
the ifconfig command,but my device is not sending any packet and not getting
IP address.
i have been trying to dig each and every source file in ath6kl folder but
not able to figure out why i am not able to change the mac address.

can any one please tell me the exact steps to achieve this.
it will be really helpful.

THanks,
Priti