#include <linux/workqueue.h>
#include <linux/mtk23d.h>
#include <linux/wakelock.h>
+#include "../mtd/rknand/api_flash.h"
MODULE_LICENSE("GPL");
}
//extern char imei_value[16]; // phc, no find 'imei_value' in rk29 project
-char imei_value[16] = {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5};
+//char imei_value[16] = {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5};
static int mtk23d_ioctl(struct inode *inode,struct file *file, unsigned int cmd, unsigned long arg)
{
struct rk2818_23d_data *pdata = gpdata;
int i;
void __user *argp = (void __user *)arg;
+
+ char SectorBuffer[512];
+
printk("mtk23d_ioctl\n");
switch(cmd)
{
break;
case MTK23D_IMEI_READ:
printk("MTK23D_IMEI_READ\n");
- if(copy_to_user(argp, &(imei_value[0]), 16))
+
+ GetSNSectorInfo(SectorBuffer); // phc,20110624
+
+ if(copy_to_user(argp, &(SectorBuffer[451]), 16)) // IMEIºó´Ó451Æ«ÒÆ¿ªÊ¼µÄ16bytes£¬µÚÒ»¸öbyteΪ³¤¶È¹Ì¶¨Îª15
{
printk("ERROR: copy_to_user---%s\n", __FUNCTION__);
return -EFAULT;
}
+ //printk("IMEI:%d %d %d %d\n", SectorBuffer[451], SectorBuffer[452], SectorBuffer[453], SectorBuffer[454]);
break;
default:
break;