struct Ack_session_info {
uint32_t Ack_seq_num;
uint32_t Bigger_Ack_num;
- uint16_t src_port;
- uint16_t dst_port;
- uint16_t status;
+ u16 src_port;
+ u16 dst_port;
+ u16 status;
};
typedef struct {
p->cfg_frame_offset = 0;
offset = p->cfg_frame_offset;
- ret_size = p->cif_func.cfg_wid_set(p->cfg_frame.frame, offset, (uint16_t)wid, buffer, buffer_size);
+ ret_size = p->cif_func.cfg_wid_set(p->cfg_frame.frame, offset, (u16)wid, buffer, buffer_size);
offset += ret_size;
p->cfg_frame_offset = offset;
p->cfg_frame_offset = 0;
offset = p->cfg_frame_offset;
- ret_size = p->cif_func.cfg_wid_get(p->cfg_frame.frame, offset, (uint16_t)wid);
+ ret_size = p->cif_func.cfg_wid_get(p->cfg_frame.frame, offset, (u16)wid);
offset += ret_size;
p->cfg_frame_offset = offset;
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
int ret;
- ret = p->cif_func.cfg_wid_get_val((uint16_t)wid, buffer, buffer_size);
+ ret = p->cif_func.cfg_wid_get_val((u16)wid, buffer, buffer_size);
return ret;
}
} wilc_cfg_rsp_t;
typedef struct {
- int (*cfg_wid_set)(u8 *, uint32_t, uint16_t, u8 *, int);
- int (*cfg_wid_get)(u8 *, uint32_t, uint16_t);
- int (*cfg_wid_get_val)(uint16_t, u8 *, uint32_t);
+ int (*cfg_wid_set)(u8 *, uint32_t, u16, u8 *, int);
+ int (*cfg_wid_get)(u8 *, uint32_t, u16);
+ int (*cfg_wid_get_val)(u16, u8 *, uint32_t);
int (*rx_indicate)(u8 *, int, wilc_cfg_rsp_t *);
int (*cfg_init)(wilc_debug_func);
} wilc_cfg_func_t;
*
********************************************/
-static int wilc_wlan_cfg_set_byte(u8 *frame, uint32_t offset, uint16_t id, u8 val8)
+static int wilc_wlan_cfg_set_byte(u8 *frame, uint32_t offset, u16 id, u8 val8)
{
u8 *buf;
return 4;
}
-static int wilc_wlan_cfg_set_hword(u8 *frame, uint32_t offset, uint16_t id, uint16_t val16)
+static int wilc_wlan_cfg_set_hword(u8 *frame, uint32_t offset, u16 id, u16 val16)
{
u8 *buf;
return 5;
}
-static int wilc_wlan_cfg_set_word(u8 *frame, uint32_t offset, uint16_t id, uint32_t val32)
+static int wilc_wlan_cfg_set_word(u8 *frame, uint32_t offset, u16 id, uint32_t val32)
{
u8 *buf;
return 7;
}
-static int wilc_wlan_cfg_set_str(u8 *frame, uint32_t offset, uint16_t id, u8 *str, uint32_t size)
+static int wilc_wlan_cfg_set_str(u8 *frame, uint32_t offset, u16 id, u8 *str, uint32_t size)
{
u8 *buf;
return (size + 3);
}
-static int wilc_wlan_cfg_set_bin(u8 *frame, uint32_t offset, uint16_t id, u8 *b, uint32_t size)
+static int wilc_wlan_cfg_set_bin(u8 *frame, uint32_t offset, u16 id, u8 *b, uint32_t size)
{
u8 *buf;
uint32_t i;
*
********************************************/
-static int wilc_wlan_cfg_set_wid(u8 *frame, uint32_t offset, uint16_t id, u8 *buf, int size)
+static int wilc_wlan_cfg_set_wid(u8 *frame, uint32_t offset, u16 id, u8 *buf, int size)
{
u8 type = (id >> 12) & 0xf;
int ret = 0;
ret = wilc_wlan_cfg_set_byte(frame, offset, id, *buf);
} else if (type == 1) { /* half word command */
if (size >= 2)
- ret = wilc_wlan_cfg_set_hword(frame, offset, id, *((uint16_t *)buf));
+ ret = wilc_wlan_cfg_set_hword(frame, offset, id, *((u16 *)buf));
} else if (type == 2) { /* word command */
if (size >= 4)
ret = wilc_wlan_cfg_set_word(frame, offset, id, *((uint32_t *)buf));
return ret;
}
-static int wilc_wlan_cfg_get_wid(u8 *frame, uint32_t offset, uint16_t id)
+static int wilc_wlan_cfg_get_wid(u8 *frame, uint32_t offset, u16 id)
{
u8 *buf;
return 2;
}
-static int wilc_wlan_cfg_get_wid_value(uint16_t wid, u8 *buffer, uint32_t buffer_size)
+static int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, uint32_t buffer_size)
{
uint32_t type = (wid >> 12) & 0xf;
int i, ret = 0;