0
0
Fork 0

update drivers

This commit is contained in:
Daryl Ronningen 2024-06-03 19:02:04 -07:00
parent f26bb7dd1e
commit 59bfb58103
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
11 changed files with 57 additions and 7 deletions

View file

@ -1,7 +1,10 @@
2023/11/29
修改detect timer驱动初始化之后正常状态下2s周期性和WiFi模块进行交互。
2023/11/17
1. 支持设置国家码
2. SCAN AP列表信息修改支持输出国家码和BSS BW。
3. SCAN功能修改通过参数控制是否清空BSS List。
1. fmac: 支持设置国家码
2. fmac: SCAN AP列表信息修改支持输出国家码和BSS BW。
3. fmac: SCAN功能修改通过参数控制是否清空BSS List。
2023/08/04
1. 支持接口聚合收发功能此功能默认关闭1.x版本固件不支持聚合功能。

1
hgic.h
View file

@ -421,6 +421,7 @@ enum hgic_cmd {
HGIC_CMD_SET_MAX_TX_DELAY = 173, /* smac */
HGIC_CMD_GET_STA_INFO = 174, /* fmac */
HGIC_CMD_SEND_MGMTFRAME = 175, /* fmac */
HGIC_CMD_SET_PS_HBDATA_MASK = 183, /* fmac */
};

View file

@ -44,7 +44,7 @@
#define HGIC_CMD_TIMEOUT 500
#define HGIC_TX_TIMEOUT 10
#define HGIC_DETECT_TIMER 5000
#define HGIC_DETECT_TIMER 2000
enum hgic_bus_type {
HGIC_BUS_SDIO = 0x1,

View file

@ -512,12 +512,14 @@ static void hgicf_tx_ctrl_frm(struct hgicf_wdev *hg)
}
}
//static int hgicf_tx_work_dump = 0;
static void hgicf_tx_work(struct work_struct *work)
{
struct sk_buff *skb;
struct hgicf_wdev *hg = container_of(work, struct hgicf_wdev, tx_work);
//hgic_dbg("Enter\n");
//if(hgicf_tx_work_dump == 0) { dump_stack(); hgicf_tx_work_dump=1; }
_CTRLQ_TX:
while (!skb_queue_empty(&hg->ctrl.txq)) {
if (test_bit(HGIC_BUS_FLAGS_SLEEP, &hg->bus->flags) ||
@ -649,12 +651,14 @@ static void hgicf_rx_agg_frm(struct hgicf_wdev *hg, u8 *data, int len)
}
}
//static int hgicf_rx_data_dump = 0;
static int hgicf_rx_data(void *hgobj, u8 *data, int len)
{
int i = 0;
struct hgic_frm_hdr2 *hdr = NULL;
struct hgicf_wdev *hg = hgobj;
//if(hgicf_rx_data_dump == 0) { dump_stack(); hgicf_rx_data_dump=1; }
i = hgic_skip_padding(data);
data += i; len -= i;
hdr = (struct hgic_frm_hdr2 *)data;

View file

@ -421,6 +421,7 @@ enum hgic_cmd {
HGIC_CMD_SET_MAX_TX_DELAY = 173, /* smac */
HGIC_CMD_GET_STA_INFO = 174, /* fmac */
HGIC_CMD_SEND_MGMTFRAME = 175, /* fmac */
HGIC_CMD_SET_PS_HBDATA_MASK = 183, /* fmac */
};

View file

@ -1342,6 +1342,15 @@ int hgic_iwpriv_set_wkdata_mask(char *ifname, int offset/*from IP hdr*/, char *m
memcpy(buff + 1, mask, mask_len);
return hgic_iwpriv_set_bytes(ifname, "wkdata_mask", buff, mask_len + 1);
}
int hgic_iwpriv_set_hbdata_mask(char *ifname, char offset/*start from payload*/, char *mask, int mask_len)
{
char buff[128];
if(mask_len > 64) mask_len = 64;
buff[0] = offset;
buff[1] = mask_len;
memcpy(buff + 2, mask, mask_len);
return hgic_iwpriv_set_bytes(ifname, "hbdata_mask", buff, mask_len + 2);
}
int hgic_iwpriv_get_mode(char *ifname, char *mode)
{
return hgic_iwpriv_get_bytes(ifname, "mode", mode, 8);

View file

@ -859,6 +859,17 @@ int hgic_fwctrl_set_wkdata_mask(struct hgic_fwctrl *ctrl, u8 ifidx, u16 offset,
return hgic_fwctrl_set_bytes(ctrl, ifidx, HGIC_CMD_SET_WKUPDATA_MASK, data, mask_len + 2);
}
int hgic_fwctrl_set_hbdata_mask(struct hgic_fwctrl *ctrl, u8 ifidx, u16 offset, u8 *mask, u8 mask_len)
{
u8 data[128];
if (mask_len > 64) mask_len = 64;
memset(data, 0, sizeof(data));
put_unaligned_le16(offset, data);
put_unaligned_le16(mask_len, data + 2);
memcpy(data + 4, mask, mask_len);
return hgic_fwctrl_set_bytes(ctrl, ifidx, HGIC_CMD_SET_PS_HBDATA_MASK, data, mask_len + 4);
}
int hgic_fwctrl_get_wkdata_buff(struct hgic_fwctrl *ctrl, u8 ifidx, u8 *buff, int len)
{
return hgic_fwctrl_get_bytes(ctrl, ifidx, HGIC_CMD_GET_WKDATA_BUFF, buff, len);
@ -977,7 +988,7 @@ int hgic_fwctrl_set_psconnect_dis(struct hgic_fwctrl *ctrl, u8 ifidx, u8 dis)
return hgic_fwctrl_set_byte(ctrl, ifidx, HGIC_CMD_SET_DIS_PSCONNECT, dis);
}
int hgic_fwctrl_set_blenc_en(struct hgic_fwctrl *ctrl, u8 ifidx, u8 data[2])
int hgic_fwctrl_set_blenc_en(struct hgic_fwctrl *ctrl, u8 ifidx, u8 data[3])
{
return hgic_fwctrl_set_bytes(ctrl, ifidx, HGIC_CMD_SET_BLENC_EN, data, 2);
}
@ -1243,3 +1254,7 @@ int hgic_fwctrl_set_heartbeat_int(struct hgic_fwctrl *ctrl, u8 ifidx, u32 val)
return hgic_fwctrl_set_int_val(ctrl, ifidx, HGIC_CMD_SET_HEARTBEAT_INT, val);
}
int hgic_fwctrl_get_tx_bitrate(struct hgic_fwctrl *ctrl, u8 ifidx)
{
return hgic_fwctrl_get_int_val(ctrl, ifidx, HGIC_CMD_GET_TX_BITRATE);
}

View file

@ -160,6 +160,7 @@ int hgic_fwctrl_set_dhcpc(struct hgic_fwctrl *ctrl, u8 ifidx, u8 en);
int hgic_fwctrl_get_dhcpc_result(struct hgic_fwctrl *ctrl, u8 ifidx, u8 *buff, int len);
int hgic_fwctrl_set_wkdata_mask(struct hgic_fwctrl *ctrl, u8 ifidx, u16 offset, u8 *mask, u8 mask_len);
int hgic_fwctrl_get_wkdata_buff(struct hgic_fwctrl *ctrl, u8 ifidx, u8 *buff, int len);
int hgic_fwctrl_set_hbdata_mask(struct hgic_fwctrl *ctrl, u8 ifidx, u16 offset, u8 *mask, u8 mask_len);
int hgic_fwctrl_get_disassoc_reason(struct hgic_fwctrl *ctrl, u8 ifidx);
int hgic_fwctrl_set_wkdata_save(struct hgic_fwctrl *ctrl, u8 ifidx, u8 save);
int hgic_fwctrl_set_cust_driver_data(struct hgic_fwctrl *ctrl, u8 ifidx, u8 *data, u32 len);
@ -228,6 +229,7 @@ int hgic_fwctrl_set_max_tx_delay(struct hgic_fwctrl *ctrl, u8 ifidx, u32 tmo);
int hgic_fwctrl_get_sta_info(struct hgic_fwctrl *ctrl, u8 ifidx, u8 *mac, struct hgic_sta_info *info);
int hgic_fwctrl_get_signal(struct hgic_fwctrl *ctrl, u8 ifidx);
int hgic_fwctrl_set_heartbeat_int(struct hgic_fwctrl *ctrl, u8 ifidx, u32 val);
int hgic_fwctrl_get_tx_bitrate(struct hgic_fwctrl *ctrl, u8 ifidx);
#endif

View file

@ -755,6 +755,11 @@ static int hgic_iwpriv_set_wkdata_mask(struct hgic_fwctrl *ctrl, u8 ifidx, char
u8 len = count > 128 ? 128 : count;
return hgic_fwctrl_set_wkdata_mask(ctrl, ifidx, data[0], (u8 *)(data + 1), len - 1);
}
static int hgic_iwpriv_set_hbdata_mask(struct hgic_fwctrl *ctrl, u8 ifidx, char *data, u32 count)
{
u8 len = count > 128 ? 128 : count;
return hgic_fwctrl_set_hbdata_mask(ctrl, ifidx, data[0], (u8 *)(data + 2), len - 2);
}
static int hgic_iwpriv_set_driverdata(struct hgic_fwctrl *ctrl, u8 ifidx, char *data, u32 count)
{
return hgic_fwctrl_set_cust_driver_data(ctrl, ifidx, data, count);
@ -1051,6 +1056,7 @@ static struct fwctrl_cfgset hgpriv_sets[] = {
{"custmgmt", hgic_iwpriv_send_custmgmt},
{"mgmtframe", hgic_iwpriv_send_mgmtframe},
{"wkdata_mask", hgic_iwpriv_set_wkdata_mask},
{"hbdata_mask", hgic_iwpriv_set_hbdata_mask},
{"driverdata", hgic_iwpriv_set_driverdata},
{"freqinfo", hgic_iwpriv_set_freqinfo},
{"blenc", hgic_iwpriv_set_blenc},
@ -1151,7 +1157,7 @@ static int hgic_iwpriv_get_scan_list(struct hgic_fwctrl *ctrl, u8 ifidx, struct
}
} else {
count = ret / sizeof(struct hgic_bss_info1);
len += sprintf(print_buf + len, "\r\nBSSID \tSSID \tEncryption\tFrequence\tSignal\tCountry_region\n");
len += sprintf(print_buf + len, "\r\nBSSID \tSSID \tEncryption\tFrequence\tSignal\tCountry_region\tBSS_BW\n");
for (i = 0; i < count; i++) {
len += sprintf(print_buf + len, "%pM\t%s\t %10s\t %10d\t%10d\t%10s\t%d\n",
bss1[i].bssid, bss1[i].ssid,
@ -1612,6 +1618,14 @@ static int hgic_iwpriv_get_signal(struct hgic_fwctrl *ctrl, u8 ifidx, struct iwr
hgic_copyto_iwreq(wrqin, str, strlen(str));
return (0);
}
static int hgic_iwpriv_get_tx_bitrate(struct hgic_fwctrl *ctrl, u8 ifidx, struct iwreq *wrqin)
{
char str[12];
int temp = hgic_fwctrl_get_tx_bitrate(ctrl, ifidx);
sprintf(str, "%d", temp);
hgic_copyto_iwreq(wrqin, str, strlen(str));
return (0);
}
static struct fwctrl_cfgget hgpriv_gets[] = {
{"mode", hgic_iwpriv_get_mode},
@ -1649,6 +1663,7 @@ static struct fwctrl_cfgget hgpriv_gets[] = {
{"fwinfo", hgic_iwpriv_get_fwinfo},
{"stainfo", hgic_iwpriv_get_sta_info},
{"signal", hgic_iwpriv_get_signal},
{"tx_bitrate", hgic_iwpriv_get_tx_bitrate},
{NULL,}
};

View file

@ -1 +1 @@
#define SVN_VERSION "26364"
#define SVN_VERSION "28988"