case READ_BDADDR_FROM_FLASH:\r
{ \r
char *tempBuf = (char *)kmalloc(512, GFP_KERNEL);\r
+ char bd_addr[6] = {0};\r
int i;\r
- #if 0\r
+\r
GetSNSectorInfo(tempBuf);\r
- #else\r
- tempBuf[498] = 0x00;\r
- tempBuf[499] = 0x11;\r
- tempBuf[500] = 0x22;\r
- tempBuf[501] = 0x33;\r
- tempBuf[502] = 0x44;\r
- tempBuf[503] = 0x55;\r
- tempBuf[504] = 0x66;\r
- #endif\r
+\r
for(i=498; i<=504; i++)\r
{\r
DBG("tempBuf[%d]=%x\n", i, tempBuf[i]);\r
+ bd_addr[504-i] = tempBuf[i];\r
}\r
+\r
\r
- if(copy_to_user(argp, &(tempBuf[499]), 6))\r
+ if(copy_to_user(argp, bd_addr, 6))\r
{\r
printk("ERROR: copy_to_user---%s\n", __FUNCTION__);\r
kfree(tempBuf);\r