-
-
Redpine Signals, Inc. Proprietary and Confidential
Page 39
R
R
S
S
9
9
1
1
1
1
3
3
-
-
n
n
-
-
L
L
i
i
n
n
k
k
-
-
M
M
o
o
d
d
u
u
l
l
e
e
-
-
D
D
r
r
i
i
v
v
e
e
r
r
-
-
I
I
n
n
s
s
t
t
a
a
l
l
l
l
a
a
t
t
i
i
o
o
n
n
-
-
G
G
u
u
i
i
d
d
e
e
V
V
e
e
r
r
s
s
i
i
o
o
n
n
3
3
.
.
0
0
15
BT Porting for Android:
In Android Ginger Bread Source(2.3 version),
Go to src/system/bluetooth/bluedroid/bluetooth.c
In that file , add the following changes
#define DRIVER_MODULE_BT_ONEBOX_NONGPL
“<DRIVERPATH>/release/onebox_bt_nongpl.ko"
#define DRIVER_MODULE_BT_ONEBOX_GPL
“<DRIVERPATH>/release/onebox_bt_nongpl.ko"
Note: Here <DRIVERPATH> should be filled with Redpine’s Driver path.
#define DRIVER_MODULE_BT_ONEBOX_NONGPL_REM "onebox_bt_nongpl"
#define DRIVER_MODULE_BT_ONEBOX_GPL_REM "onebox_bt_gpl"
extern int init_module(void *, unsigned long, const char *);
extern int delete_module(const char *, unsigned int);
Add following functions,
static int insmod(const char *filename, const char *args)
{
void *module;
unsigned int size;
int ret;
LOGI("************* wifi.c insmod is called**********");
module = load_file(filename, &size);
if (!module)
{
LOGE("****module load failed\n");
return -1;
}
ret = init_module(module, size, args);
free(module);
return ret;
}
static int rmmod(const char *modname)
{
int ret = -1;
int maxtry = 10;
while (maxtry-- > 0) {
ret = delete_module(modname, O_NONBLOCK | O_EXCL);