Skip to content

Commit

Permalink
[NRC7292 HM] Update v1.3.4 rev05
Browse files Browse the repository at this point in the history
- Add passive scan feature
- Bug fix for following issues
  (1) Occasional AP crash under heavy connect and disconnect of associated STAs
  (2) Frames are rarely discarded on host driver when large number of small-chunked (<100B) frames are transmitted
  (3) Fail to set maximum aggregation number on 4M Bandwidth by using "cli_app set maxagg" command
  (4) Fail to turn off aggregation by using "cli_app set maxagg" command
  (5) Fail to set vendor IE using iw command on Linux kernel 5.10.xx
- cli_app update
  (1) "set config" is obsolete so that it is removed
  (2) "set ack_mode [no|ndp|normal]" is added to change ack mode
- Module parameter update
  (1) enable/disable S1G short beacon
  • Loading branch information
Aaron J. Lee committed Jul 9, 2022
1 parent cbe7630 commit 7677346
Show file tree
Hide file tree
Showing 68 changed files with 591 additions and 359 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Notice
### Release roadmap
- v1.3.4_rev05 (2022.07.08)
- v1.3.4_rev04 (2022.06.30)
- v1.3.4_rev03 (2022.05.24)
- v1.3.4_rev02 (2022.01.19)
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/VERSION-SDK.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev04
rev05
Binary file modified package/host/doc/AN-7292-002-Dynamic Vendor IE.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/evk/binary/VERSION-SDK.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev04
rev05
Binary file modified package/host/evk/binary/cli_app
Binary file not shown.
Binary file modified package/host/evk/binary/nrc.ko
Binary file not shown.
Binary file modified package/host/evk/binary/nrc7292_cspi.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/evk/sw_pkg/nrc_pkg/VERSION-SDK.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev04
rev05
Binary file modified package/host/evk/sw_pkg/nrc_pkg/script/cli_app
Binary file not shown.
26 changes: 22 additions & 4 deletions package/host/evk/sw_pkg/nrc_pkg/script/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# 2 : NRC-CSPI Registers Polling
#################################################################################
# RF Conf.
# Maximum TX Power
# Max TX PWR
txpwr_max_default = 24 # Board Data Max TX Power
#--------------------------------------------------------------------------------#
# Calibration usage option
Expand All @@ -57,6 +57,11 @@
guard_int = 'long' # Guard Interval ('long'(LGI) or 'short'(SGI))
##################################################################################
# MAC Conf.
# S1G Short Beacon (AP & MESH Only)
# If disabled, AP sends only S1G long beacon every BI
# Recommend using S1G short beacon for network efficiency (Default: enabled)
short_bcn_enable = 1 # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# AMPDU (Aggregated MPDU)
# Enable AMPDU for full channel utilization and throughput enhancement
ampdu_enable = 1 # 0 (disable) or 1 (enable)
Expand Down Expand Up @@ -115,7 +120,7 @@
prefer_bw = 0 # 0: no preferred bandwidth, 1: 1M, 2: 2M, 4: 4M
dwell_time = 100 # max dwell is 1000 (ms), min: 10ms, default: 100ms
#--------------------------------------------------------------------------------#
# Credit num of AC_BE for flow control between host and target (Internal use only)
# Credit num of AC_BE for flow control between host and target (Test only)
credit_ac_be = 40 # number of buffer (min: 40, max: 120)
#--------------------------------------------------------------------------------#
# Use bitmap encoding for block ack operation (NRC7292 only)
Expand Down Expand Up @@ -524,6 +529,11 @@ def setModuleParam():
if int(cqm_enable) == 0:
cqm_arg = " disable_cqm=1"

# module param for short beacon
# default: enable_short_bi(1: Short Beacon enabled)
if int(short_bcn_enable) == 0:
sbi_arg = " enable_short_bi=0"

# module param for listen interval
# default: listen_interval(100)
if int(listen_interval) > 0:
Expand Down Expand Up @@ -555,7 +565,7 @@ def setModuleParam():
power_save_arg + sleep_duration_arg + bss_max_idle_arg + \
ndp_preq_arg + ndp_ack_1m_arg + auto_ba_arg + sw_enc_arg + \
cqm_arg + listen_int_arg + drv_dbg_arg + credit_acbe_arg + legacy_ack_arg + \
be_arg + rs_arg
be_arg + rs_arg + sbi_arg

return module_param

Expand All @@ -580,7 +590,7 @@ def run_common():
copyConf()
insmod_arg = setModuleParam()

print("[2] Set Country")
print("[2] Set Initial Country")
os.system("sudo iw reg set " + strOriCountry())

print("[3] Loading module")
Expand Down Expand Up @@ -676,7 +686,9 @@ def launch_hostapd(interface, orig_hostapd_conf_file, country, debug, channel):

def run_ap(interface):
country = str(sys.argv[3])
global self_config
channel = None

if len(sys.argv) > 4 :
channel = str(sys.argv[4])

Expand All @@ -685,6 +697,9 @@ def run_ap(interface):
else:
debug = ''

if strSTA() == 'RELAY':
self_config = 0
print("[*] Selfconfig is not used in RELAY mode.")
if (int(self_config)==1):
print("[*] Self configuration start!")
self_conf_result = self_config_check()
Expand All @@ -698,6 +713,9 @@ def run_ap(interface):
if(int(self_config)==1 and self_conf_result=='Done'):
os.system("sed -i " + '"4s/.*/interface=' + interface + '/g" ' + script_path + "conf/temp_self_config.conf " )
os.system("sudo hostapd " + script_path + "conf/temp_self_config.conf " + debug +" &")
if strSecurity() == 'WPA-PBC':
time.sleep(1)
os.system("sudo hostapd_cli wps_pbc")
else:
if strSecurity() == 'OPEN':
launch_hostapd( interface, '/home/pi/nrc_pkg/script/conf/'+country+'/ap_halow_open.conf', country, debug ,channel )
Expand Down
Binary file modified package/host/evk/sw_pkg/nrc_pkg/sw/driver/nrc.ko
Binary file not shown.
Binary file modified package/host/evk/sw_pkg/nrc_pkg/sw/firmware/nrc7292_cspi.bin
Binary file not shown.
42 changes: 39 additions & 3 deletions package/host/src/cli_app/cli_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ static void cmd_show_mac_result_display(char *response, int dir, int type);
/* 1st sub commands on set */
static int cmd_set_guard_interval(cmd_tbl_t *t, int argc, char *argv[]);
static int cmd_set_max_aggregation(cmd_tbl_t *t, int argc, char *argv[]);
static int cmd_set_config(cmd_tbl_t *t, int argc, char *argv[]);
//static int cmd_set_config(cmd_tbl_t *t, int argc, char *argv[]);
static int cmd_set_ackmode(cmd_tbl_t *t, int argc, char *argv[]);
static int cmd_set_rate_control(cmd_tbl_t *t, int argc, char *argv[]);
static int cmd_set_duty(cmd_tbl_t *t, int argc, char *argv[]);
static int cmd_set_cal_use(cmd_tbl_t *t, int argc, char *argv[]);
Expand Down Expand Up @@ -211,7 +212,8 @@ cmd_tbl_t show_sub_list[] = {
cmd_tbl_t set_sub_list[] = {
{ "gi", cmd_set_guard_interval, "set guard interval", "set gi {short|long|auto}", "", 0},
{ "maxagg", cmd_set_max_aggregation, "set aggregation", "set maxagg {AC(0-3)} <Max(0-8(1Mhz),0-16(2,4Mhz),0:off)> {size:default=0}", SET_MAXAGG_KEY_LIST, 0},
{ "config", cmd_set_config, "set ack, aggregation, mcs", "set config {ack(0,1)} {agg(0,1)} [mcs]", SET_CONFIG_KEY_LIST, 0},
//{ "config", cmd_set_config, "set ack, aggregation, mcs", "set config {ack(0,1)} {agg(0,1)} [mcs]", SET_CONFIG_KEY_LIST, 0},
{ "ack_mode", cmd_set_ackmode, "set ack mode", "set ack_mode {no|ndp|normal|show}", SET_ACK_MODE_LIST, 0},
{ "rc", cmd_set_rate_control, "set rate control", "set rc {on|off} [vif_id] [mode]", SET_RC_KEY_LIST, 0},
{ "duty", cmd_set_duty, "set duty cycle", "set duty {on|off} {duty window} {tx duration} {duty margin}", SET_DUTY_KEY_LIST, 0},
{ "cal_use", cmd_set_cal_use, "set cal_use", "set cal_use {on|off}", SET_CAL_USE_KEY_LIST, 0},
Expand Down Expand Up @@ -1640,7 +1642,9 @@ static int cmd_set_max_aggregation(cmd_tbl_t *t, int argc, char *argv[])
return ret;
}

static int cmd_set_config(cmd_tbl_t *t, int argc, char *argv[]) {
#if 0
static int cmd_set_config(cmd_tbl_t *t, int argc, char *argv[])
{
int ret = CMD_RET_FAILURE;
char param[NRC_MAX_CMDLINE_SIZE];
char response[NL_MSG_MAX_RESPONSE_SIZE];
Expand All @@ -1667,6 +1671,38 @@ static int cmd_set_config(cmd_tbl_t *t, int argc, char *argv[]) {
}
return ret;
}
#endif

static int cmd_set_ackmode(cmd_tbl_t *t, int argc, char *argv[])
{
int ret = CMD_RET_FAILURE;
char param[NRC_MAX_CMDLINE_SIZE];
char response[NL_MSG_MAX_RESPONSE_SIZE];
int netlink_ret = 0;
int display_per_line = 1;

memset(response, 0x0, NL_MSG_MAX_RESPONSE_SIZE);
memset(param, 0x0, sizeof(param));

if (strcmp(argv[2], "no") != 0 && strcmp(argv[2], "ndp") != 0 &&
strcmp(argv[2], "normal") != 0 && strcmp(argv[2], "show") != 0) {
return CMD_RET_FAILURE;
}

sprintf(param, "set ack_mode %s -sr", argv[2]);
netlink_ret = netlink_send_data(NL_SHELL_RUN, param, response);
if(!netlink_ret) {
if(strcmp(response, response_timeout_str)== 0){
ret = CMD_RET_RESPONSE_TIMEOUT;
} else {
cmd_result_parse((char*)t->key_list, response, display_per_line);
ret = CMD_RET_SUCCESS;
}
} else {
ret = CMD_RET_FAILURE;
}
return ret;
}

static int cmd_set_rate_control(cmd_tbl_t *t, int argc, char *argv[])
{
Expand Down
4 changes: 4 additions & 0 deletions package/host/src/cli_app/cli_key_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,8 @@ Tx power index for MCS 6,Tx power index for MCS 7,Tx power index for MCS 10"
#define SET_DROP_DISP "%d,%s,%s"
#define SET_DROP_KEY_LIST "vif_id,mac_addr,on"

/* set ack_mode */
#define SET_ACK_MODE_DISP "%s"
#define SET_ACK_MODE_LIST "ACK_MODE"

#endif /* _CLI_KEY_LIST_H_ */
2 changes: 1 addition & 1 deletion package/host/src/cli_app/cli_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ int cmd_show_maxagg_result_parse(char *value, int *display_start_index)
}

for (int j=0; j<4; j++) {
printf("AC_%s: %s (%2d, %4d bytes), BA session: %s\n",
printf("AC_%s: %3s (%2d, %4d bytes), BA session: %s\n",
str_ac[maxagg_info->ac], str_state[maxagg_info->state], maxagg_info->max_agg_num,
maxagg_info->agg_num_size, str_ba_session[maxagg_info->ba_session]);
index += sizeof(xfer_maxagg_info);
Expand Down
3 changes: 3 additions & 0 deletions package/host/src/nrc/nrc-build-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,7 @@
* #endif
*/

/* Check tx queue total data size, not just queue length */
#define CONFIG_CHECK_DATA_SIZE

#endif
7 changes: 4 additions & 3 deletions package/host/src/nrc/nrc-hif-cspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ static int spi_suspend(struct nrc_hif_device *dev)
* this delay is necessary to achive sending WIM meg completly.
* (especially, WIM_TLV_PS_ENABLE)
*/
msleep(10);
usleep_range(20 * 1000, 30 * 1000);

if (spi->irq >= 0 && priv->polling_interval <= 0) {
/* Waits for any pending IRQ handlers for this interrupt to complete */
Expand All @@ -1513,8 +1513,9 @@ static int spi_suspend(struct nrc_hif_device *dev)
//atomic_set(&irq_enabled, 0);
}

if (power_save >= NRC_PS_DEEPSLEEP_TIM)
schedule_delayed_work(&dev->nw->fake_bcn, msecs_to_jiffies(1024));
if (power_save >= NRC_PS_DEEPSLEEP_TIM) {
schedule_delayed_work(&dev->nw->fake_bcn, msecs_to_jiffies(nw->beacon_int));
}

nrc_hif_flush_wq(dev);
spi_config_fw(dev);
Expand Down
13 changes: 2 additions & 11 deletions package/host/src/nrc/nrc-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#endif /* defined(CONFIG_SUPPORT_BD) */

char *fw_name;

module_param(fw_name, charp, 0444);
MODULE_PARM_DESC(fw_name, "Firmware file name");

Expand All @@ -60,7 +59,6 @@ char *hifport = "/dev/ttyUSB0";
#else
char *hifport = "/dev/ttyUSB0";
#endif

module_param(hifport, charp, 0600);
MODULE_PARM_DESC(hifport, "HIF port device name");

Expand All @@ -76,7 +74,6 @@ int hifspeed = 115200;
#else
int hifspeed = 115200;
#endif

module_param(hifspeed, int, 0600);
MODULE_PARM_DESC(hifspeed, "HIF port speed");

Expand Down Expand Up @@ -133,9 +130,9 @@ MODULE_PARM_DESC(bss_max_idle_usf_format, "BSS Max Idle specified in units of us
/**
* default enable_short_bi
*/
bool enable_short_bi;
bool enable_short_bi = 1;
module_param(enable_short_bi, bool, 0600);
MODULE_PARM_DESC(enable_short_bi, "Enable Short BI");
MODULE_PARM_DESC(enable_short_bi, "Enable Short Beacon Interval");

/**
* enable/disable the legacy ack mode
Expand Down Expand Up @@ -536,9 +533,6 @@ static void nrc_check_start(struct work_struct *work)
goto fail_start;
}

//nrc_recovery_wdt_init(nw, 2000);
//nrc_recovery_wdt_kick(nw);

return;

fail_start:
Expand Down Expand Up @@ -615,9 +609,6 @@ static int nrc_platform_remove(struct platform_device *pdev)
nw->drv_state = NRC_DRV_CLOSING;

cancel_delayed_work(&nw->check_start);

//nrc_recovery_wdt_clear(nw);

cancel_delayed_work(&nw->fake_bcn);
flush_delayed_work(&nw->fake_bcn);
cancel_delayed_work(&nw->fake_prb_resp);
Expand Down

0 comments on commit 7677346

Please sign in to comment.