19
19
#include <mlan_fw.h>
20
20
#include "wifi-imu.h"
21
21
#include "wifi-internal.h"
22
- #include "fsl_adapter_rfimu .h"
22
+ #include "fsl_adapter_imu .h"
23
23
#include "fsl_imu.h"
24
24
#include "fsl_loader.h"
25
25
@@ -109,10 +109,10 @@ SDK_ALIGN(uint8_t inbuf[SDIO_MP_AGGR_DEF_PKT_LIMIT * 2 * DATA_BUFFER_SIZE], 32);
109
109
SDK_ALIGN (uint8_t amsdu_outbuf [MAX_SUPPORT_AMSDU_SIZE ], 32 );
110
110
#endif
111
111
112
- hal_rpmsg_status_t rpmsg_cmdrsp_handler (IMU_Msg_t * pImuMsg , uint32_t length );
113
- hal_rpmsg_status_t rpmsg_event_handler (IMU_Msg_t * pImuMsg , uint32_t length );
114
- hal_rpmsg_status_t rpmsg_rxpkt_handler (IMU_Msg_t * pImuMsg , uint32_t length );
115
- hal_rpmsg_status_t rpmsg_ctrl_handler (IMU_Msg_t * pImuMsg , uint32_t length );
112
+ hal_imumc_status_t imumc_cmdrsp_handler (IMU_Msg_t * pImuMsg , uint32_t length );
113
+ hal_imumc_status_t imumc_event_handler (IMU_Msg_t * pImuMsg , uint32_t length );
114
+ hal_imumc_status_t imumc_rxpkt_handler (IMU_Msg_t * pImuMsg , uint32_t length );
115
+ hal_imumc_status_t imumc_ctrl_handler (IMU_Msg_t * pImuMsg , uint32_t length );
116
116
117
117
/* Remove me: This structure is not present in mlan and can be removed later */
118
118
typedef MLAN_PACK_START struct
@@ -146,13 +146,13 @@ static void wifi_init_imulink(void)
146
146
}
147
147
148
148
uint8_t cmd_seqno = 0 ;
149
- static hal_rpmsg_status_t wifi_send_fw_cmd (t_u16 cmd_type , t_u8 * cmd_payload , t_u32 length )
149
+ static hal_imumc_status_t wifi_send_fw_cmd (t_u16 cmd_type , t_u8 * cmd_payload , t_u32 length )
150
150
{
151
151
IMUPkt * imu_cmd = (IMUPkt * )cmd_payload ;
152
152
HostCmd_DS_COMMAND * cmd = NULL ;
153
153
154
154
if (cmd_payload == NULL || length == 0 )
155
- return kStatus_HAL_RpmsgError ;
155
+ return kStatus_HAL_ImumcError ;
156
156
157
157
cmd = & (imu_cmd -> hostcmd );
158
158
cmd -> seq_num = (cmd -> seq_num & 0xFF00 ) | cmd_seqno ;
@@ -168,17 +168,17 @@ static hal_rpmsg_status_t wifi_send_fw_cmd(t_u16 cmd_type, t_u8 *cmd_payload, t_
168
168
dump_hex (cmd_payload , length );
169
169
#endif /* CONFIG_WIFI_IO_DUMP */
170
170
171
- while (kStatus_HAL_RpmsgSuccess != HAL_ImuSendCommand (kIMU_LinkCpu1Cpu3 , cmd_payload , length ))
171
+ while (kStatus_HAL_ImumcSuccess != HAL_ImuSendCommand (kIMU_LinkCpu1Cpu3 , cmd_payload , length ))
172
172
{
173
173
OSA_TimeDelay (1 );
174
174
}
175
- return kStatus_HAL_RpmsgSuccess ;
175
+ return kStatus_HAL_ImumcSuccess ;
176
176
}
177
177
178
- static hal_rpmsg_status_t wifi_send_fw_data (t_u8 * data , t_u32 length )
178
+ static hal_imumc_status_t wifi_send_fw_data (t_u8 * data , t_u32 length )
179
179
{
180
180
if (data == NULL || length == 0 )
181
- return kStatus_HAL_RpmsgError ;
181
+ return kStatus_HAL_ImumcError ;
182
182
w_pkt_d ("Data TX SIG: Driver=>FW, len %d" , length );
183
183
return HAL_ImuSendTxData (kIMU_LinkCpu1Cpu3 , data , length );
184
184
}
@@ -1148,7 +1148,7 @@ mlan_status wlan_xmit_pkt(t_u8 *buffer, t_u32 txlen, t_u8 interface, t_u32 tx_co
1148
1148
/* send tx data via imu */
1149
1149
ret = wifi_send_fw_data (buffer , txlen );
1150
1150
1151
- if (ret != kStatus_HAL_RpmsgSuccess )
1151
+ if (ret != kStatus_HAL_ImumcSuccess )
1152
1152
{
1153
1153
wifi_io_e ("Send tx data via imu failed (%d)" , ret );
1154
1154
#if CONFIG_WIFI_FW_DEBUG
@@ -1182,7 +1182,7 @@ mlan_status wlan_xmit_bypass_pkt(t_u8 *buffer, t_u32 txlen, t_u8 interface)
1182
1182
/* send tx data via imu */
1183
1183
ret = wifi_send_fw_data (buffer , txlen );
1184
1184
1185
- if (ret != kStatus_HAL_RpmsgSuccess )
1185
+ if (ret != kStatus_HAL_ImumcSuccess )
1186
1186
{
1187
1187
wifi_io_e ("Send tx data via imu failed (%d)" , ret );
1188
1188
#if CONFIG_WIFI_FW_DEBUG
@@ -1240,7 +1240,7 @@ mlan_status wlan_xmit_wmm_pkt(t_u8 interface, t_u32 txlen, t_u8 *tx_buf)
1240
1240
ret = HAL_ImuAddWlanTxPacket (kIMU_LinkCpu1Cpu3 , tx_buf , txlen );
1241
1241
#endif
1242
1242
1243
- if (ret != kStatus_HAL_RpmsgSuccess )
1243
+ if (ret != kStatus_HAL_ImumcSuccess )
1244
1244
{
1245
1245
#if CONFIG_WMM_UAPSD
1246
1246
if (last_packet )
@@ -1280,7 +1280,7 @@ mlan_status wlan_flush_wmm_pkt(int pkt_cnt)
1280
1280
1281
1281
ret = HAL_ImuSendMultiTxData (kIMU_LinkCpu1Cpu3 );
1282
1282
;
1283
- if (ret != kStatus_HAL_RpmsgSuccess )
1283
+ if (ret != kStatus_HAL_ImumcSuccess )
1284
1284
{
1285
1285
wifi_io_e ("wlan_flush_wmm_pkt failed (%d)" , ret );
1286
1286
#if CONFIG_WIFI_FW_DEBUG
@@ -1345,7 +1345,7 @@ mlan_status wlan_xmit_wmm_amsdu_pkt(mlan_wmm_ac_e ac, t_u8 interface, t_u32 txle
1345
1345
1346
1346
ret = HAL_ImuAddWlanTxPacket (kIMU_LinkCpu1Cpu3 , tx_buf , txlen );
1347
1347
1348
- if (ret != kStatus_HAL_RpmsgSuccess )
1348
+ if (ret != kStatus_HAL_ImumcSuccess )
1349
1349
{
1350
1350
#if CONFIG_WMM_UAPSD
1351
1351
if (last_packet )
@@ -1385,7 +1385,7 @@ mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags)
1385
1385
ptxpd -> pkt_delay_2ms = 0 ;
1386
1386
1387
1387
ret = wifi_send_fw_data (pbuf , sizeof (TxPD ) + INTF_HEADER_LEN );
1388
- if (ret != kStatus_HAL_RpmsgSuccess )
1388
+ if (ret != kStatus_HAL_ImumcSuccess )
1389
1389
{
1390
1390
wifi_io_e ("imu_drv_write failed (%d)" , ret );
1391
1391
return MLAN_STATUS_FAILURE ;
@@ -1394,7 +1394,7 @@ mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags)
1394
1394
return MLAN_STATUS_SUCCESS ;
1395
1395
}
1396
1396
1397
- hal_rpmsg_status_t rpmsg_cmdrsp_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1397
+ hal_imumc_status_t imumc_cmdrsp_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1398
1398
{
1399
1399
assert (NULL != pImuMsg );
1400
1400
assert (0 != length );
@@ -1413,10 +1413,10 @@ hal_rpmsg_status_t rpmsg_cmdrsp_handler(IMU_Msg_t *pImuMsg, uint32_t length)
1413
1413
1414
1414
wlan_decode_rx_packet ((t_u8 * )pImuMsg -> PayloadPtr [0 ], MLAN_TYPE_CMD );
1415
1415
1416
- return kStatus_HAL_RpmsgSuccess ;
1416
+ return kStatus_HAL_ImumcSuccess ;
1417
1417
}
1418
1418
1419
- hal_rpmsg_status_t rpmsg_event_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1419
+ hal_imumc_status_t imumc_event_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1420
1420
{
1421
1421
assert (NULL != pImuMsg );
1422
1422
assert (0 != length );
@@ -1442,10 +1442,10 @@ hal_rpmsg_status_t rpmsg_event_handler(IMU_Msg_t *pImuMsg, uint32_t length)
1442
1442
1443
1443
wlan_decode_rx_packet ((t_u8 * )pImuMsg -> PayloadPtr [0 ], MLAN_TYPE_EVENT );
1444
1444
1445
- return kStatus_HAL_RpmsgSuccess ;
1445
+ return kStatus_HAL_ImumcSuccess ;
1446
1446
}
1447
1447
1448
- hal_rpmsg_status_t rpmsg_rxpkt_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1448
+ hal_imumc_status_t imumc_rxpkt_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1449
1449
{
1450
1450
IMUPkt * inimupkt ;
1451
1451
t_u32 size ;
@@ -1478,7 +1478,7 @@ hal_rpmsg_status_t rpmsg_rxpkt_handler(IMU_Msg_t *pImuMsg, uint32_t length)
1478
1478
wakelock_put ();
1479
1479
#endif
1480
1480
wifi_io_e ("pImuMsg->PayloadPtr[%u] has invalid size=%u" , i , size );
1481
- return kStatus_HAL_RpmsgError ;
1481
+ return kStatus_HAL_ImumcError ;
1482
1482
}
1483
1483
1484
1484
#if !CONFIG_TX_RX_ZERO_COPY
@@ -1503,7 +1503,7 @@ hal_rpmsg_status_t rpmsg_rxpkt_handler(IMU_Msg_t *pImuMsg, uint32_t length)
1503
1503
wakelock_put ();
1504
1504
#endif
1505
1505
/*! To be the last action of the handler*/
1506
- return kStatus_HAL_RpmsgSuccess ;
1506
+ return kStatus_HAL_ImumcSuccess ;
1507
1507
}
1508
1508
1509
1509
static bool imu_fw_is_hang (void )
@@ -1516,7 +1516,7 @@ static bool imu_fw_is_hang(void)
1516
1516
return false;
1517
1517
}
1518
1518
1519
- hal_rpmsg_status_t rpmsg_ctrl_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1519
+ hal_imumc_status_t imumc_ctrl_handler (IMU_Msg_t * pImuMsg , uint32_t length )
1520
1520
{
1521
1521
t_u32 imuControlType ;
1522
1522
@@ -1551,7 +1551,7 @@ hal_rpmsg_status_t rpmsg_ctrl_handler(IMU_Msg_t *pImuMsg, uint32_t length)
1551
1551
default :
1552
1552
break ;
1553
1553
}
1554
- return kStatus_HAL_RpmsgSuccess ;
1554
+ return kStatus_HAL_ImumcSuccess ;
1555
1555
}
1556
1556
1557
1557
void imu_wakeup_card ()
@@ -1644,13 +1644,13 @@ mlan_status imu_wifi_init(enum wlan_type type, const uint8_t *fw_ram_start_addr,
1644
1644
1645
1645
wifi_init_imulink ();
1646
1646
1647
- HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , rpmsg_cmdrsp_handler , IMU_MSG_COMMAND_RESPONSE );
1647
+ HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , imumc_cmdrsp_handler , IMU_MSG_COMMAND_RESPONSE );
1648
1648
1649
- HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , rpmsg_event_handler , IMU_MSG_EVENT );
1649
+ HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , imumc_event_handler , IMU_MSG_EVENT );
1650
1650
1651
- HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , rpmsg_rxpkt_handler , IMU_MSG_RX_DATA );
1651
+ HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , imumc_rxpkt_handler , IMU_MSG_RX_DATA );
1652
1652
1653
- HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , rpmsg_ctrl_handler , IMU_MSG_CONTROL );
1653
+ HAL_ImuInstallCallback (kIMU_LinkCpu1Cpu3 , imumc_ctrl_handler , IMU_MSG_CONTROL );
1654
1654
1655
1655
/* If we're running a Manufacturing image, start the tasks.
1656
1656
If not, initialize and setup the firmware */
0 commit comments