Hi Samuel, >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.
Good question. So, I have a patch to fix this. But this patch related to some files for patch, ar6003_skip_unnecessary_scan.patch I will upstream another patch to support OPTand non-OTP devices when previous patch is finished. Samuel Chang Engineer Qualcomm Atheros, Inc. Taipei Office, Taiwan 12F., No.407, Ruiguang Rd., Neihu Dist. Taipei City 11492, Taiwan (R.O.C.) t + 886 2.8751.6385 f + 886 2.8751.6397 ________________________________________ 寄件者: Samuel Ortiz [sa...@linux.intel.com] 寄件日期: 2011年7月28日 上午 01:57 收件者: Chang, Samuel 副本: meego-kernel@lists.meego.com; kristen.c.acca...@intel.com; Wu, Ricky; Huang, Maggie; Yang, Jack 主旨: Re: [Meego-kernel] [PATCH] ar6003 : Support reading BT address from OTP file 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 MeeGo-kernel@lists.meego.com http://lists.meego.com/listinfo/meego-kernel