Hi Samuel,
My comments below:
On Fri, Jul 22, 2011 at 05:13:45AM +0000, Chang, Samuel wrote:
> diff -ruN
> kernel-2.6.37.6-151.5_skip_unnecessasy_scan_patch_P1/drivers/staging/ar6003/os/linux/ar6000_drv.c
>
> kernel-2.6.37.6-151.5_bdaddress_otp_patch_P2/drivers/staging/ar6003/os/linux/ar6000_drv.c
> ---
> kernel-2.6.37.6-151.5_skip_unnecessasy_scan_patch_P1/drivers/staging/ar6003/os/linux/ar6000_drv.c
> 2011-07-18 16:16:07.816871251 +0800
> +++
> kernel-2.6.37.6-151.5_bdaddress_otp_patch_P2/drivers/staging/ar6003/os/linux/ar6000_drv.c
> 2011-07-22 12:55:41.505195148 +0800
> @@ -1384,6 +1384,33 @@
> #endif /* INIT_MODE_DRV_ENABLED */
>
> A_STATUS
> +ar6000_update_bdaddr(AR_SOFTC_T *ar)
> +{
> +
> + if (setupbtdev != 0) {
I usually find the following construct:
if (setupbtdev == 0)
return A_ERROR;
if (BMIReadMemory(ar->arHifDevice,....
a lot easier to read.
> +A_STATUS
> ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode)
> {
> AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Requesting device specific
> configuration\n"));
> @@ -2896,6 +2923,10 @@
>
> ar = arPriv->arSoftc;
>
> + if (wlaninitmode == WLAN_INIT_MODE_USR || wlaninitmode ==
> WLAN_INIT_MODE_DRV) {
> +
> + ar6000_update_bdaddr(ar);
> + }
How do we handle the case for chips without an OTP area ?
ar6000_update_bdaddr(ar) would fail, and we should fall back to reading our
MAC from ar3kbdaddr.pst. Also, I would expect the driver to know if the target
comes with an OTP or not. This patch doesn't even check for that.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel