Skip to content

Commit

Permalink
[NRC7292 HM] v1.3.4 rev10
Browse files Browse the repository at this point in the history
- bugfix: fix display error when disabling agggregation via CLI "set maxagg AC [0|1]"
- bugfix: fix self_config running error for countries other than US
- bugfix: fix sniffer's aperiodic error triggered by a broken frame
  • Loading branch information
Aaron J. Lee committed Oct 5, 2022
1 parent a8cd3d0 commit 5c864e2
Show file tree
Hide file tree
Showing 44 changed files with 260 additions and 58 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -2,6 +2,7 @@

## Notice
### Release roadmap
- v1.3.4_rev10 (2022.10.05)
- v1.3.4_rev09 (2022.09.29)
- v1.3.4_rev08 (2022.08.30)
- v1.3.4_rev07 (2022.08.10)
Expand All @@ -18,7 +19,7 @@
- v1.3.0 (2020.05.30)

### Latest release
- [NRC7292_SW_PKG_v1.3.4_rev9](https://github.com/newracom/nrc7292_sw_pkg/releases/tag/v1.3.4_rev09)
- [NRC7292_SW_PKG_v1.3.4_rev10](https://github.com/newracom/nrc7292_sw_pkg/releases/tag/v1.3.4_rev10)

### Release package contents
- host: NRC7292 software package for global regulatory domains
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev09
rev10
2 changes: 1 addition & 1 deletion package/host/evk/binary/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev09
rev10
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
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev09
rev10
Binary file modified package/host/evk/sw_pkg/nrc_pkg/script/cli_app
Binary file not shown.
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.
9 changes: 4 additions & 5 deletions package/host/src/cli_app/cli_util.c
Expand Up @@ -441,7 +441,6 @@ int cmd_sta_umac_info_mini_result_parse(char *value, int *display_start_index, i
return more;
}


int cmd_set_maxagg_result_parse(char *value)
{
const char *str_ac[4] ={"BK", "BE", "VI", "VO"};
Expand All @@ -462,17 +461,17 @@ int cmd_set_maxagg_result_parse(char *value)

printf("-- updated aggregation\n");

if(maxagg_info->is_ap)
printf("[STA AID: %4d]\n", maxagg_info->aid);
if(maxagg_info->is_ap && maxagg_info->aid) {
printf("[STA AID: %4d]\n", maxagg_info->aid);
}

printf("AC(%s): STATUS(%s) MAXNUM(%2d) SIZE(%d)\n",
str_ac[maxagg_info->ac], str_state[maxagg_info->state],
maxagg_info->max_agg_num, maxagg_info->agg_num_size);
maxagg_info->max_agg_num, maxagg_info->agg_num_size);

return 0;
}


int cmd_show_maxagg_result_parse(char *value, int *display_start_index)
{
const char *str_ac[4] ={"BK", "BE", "VI", "VO"};
Expand Down
3 changes: 1 addition & 2 deletions package/host/src/nrc/hif.c
Expand Up @@ -909,8 +909,7 @@ static int hif_receive_skb(struct nrc_hif_device *dev, struct sk_buff *skb)
#endif
default:
print_hex_dump(KERN_DEBUG, "hif type err ", DUMP_PREFIX_NONE,
16, 1, skb->data, skb->len, false);
BUG();
16, 1, skb->data, skb->len > 32 ? 32 : skb->len, false);
dev_kfree_skb(skb);
}
return 0;
Expand Down
1 change: 0 additions & 1 deletion package/host/src/nrc/nrc-hif-cspi.c
Expand Up @@ -605,7 +605,6 @@ static struct sk_buff *spi_rx_skb(struct spi_device *spi,
skb->data, 480, false);
priv->slot[RX_SLOT].tail++;
msleep(100);
//BUG();
goto fail;
}

Expand Down
86 changes: 78 additions & 8 deletions package/host/src/nrc/nrc-mac80211.c
Expand Up @@ -56,6 +56,18 @@
.center_freq_fractional = (_freq_partial) \
}

char nrc_cc[2];

#define US_BASE_FREQ 2412
#define K1_BASE_FREQ 5220
#define K2_BASE_FREQ 5180
#define JP_BASE_FREQ 5180
#define TW_BASE_FREQ 5180
#define EU_BASE_FREQ 5180
#define CN_BASE_FREQ 5180
#define NZ_BASE_FREQ 5180
#define AU_BASE_FREQ 5180

#define CHAN2G(freq) \
{ \
.band = NL80211_BAND_2GHZ, \
Expand Down Expand Up @@ -1118,6 +1130,36 @@ get_wim_channel_width(enum nl80211_chan_width width)
}
}

uint16_t get_base_freq (void)
{
uint16_t ret_freq = 0;

if (nrc_cc[0] == 'U' && nrc_cc[1] == 'S') {
ret_freq = US_BASE_FREQ;
} else if (nrc_cc[0] == 'J' && nrc_cc[1] == 'P') {
ret_freq = JP_BASE_FREQ;
} else if (nrc_cc[0] == 'T' && nrc_cc[1] == 'W') {
ret_freq = TW_BASE_FREQ;
} else if (nrc_cc[0] == 'A' && nrc_cc[1] == 'U') {
ret_freq = AU_BASE_FREQ;
} else if (nrc_cc[0] == 'N' && nrc_cc[1] == 'Z') {
ret_freq = NZ_BASE_FREQ;
} else if (nrc_cc[0] == 'E' && nrc_cc[1] == 'U') {
ret_freq = EU_BASE_FREQ;
} else if (nrc_cc[0] == 'C' && nrc_cc[1] == 'N') {
ret_freq = CN_BASE_FREQ;
} else if (nrc_cc[0] == 'K' && nrc_cc[1] == 'R') {
if (enable_usn) {
ret_freq = K1_BASE_FREQ;
} else {
ret_freq = K2_BASE_FREQ;
}
}
else {
}
return ret_freq;
}

#ifdef CONFIG_SUPPORT_CHANNEL_INFO
void nrc_mac_add_tlv_channel(struct sk_buff *skb,
struct cfg80211_chan_def *chandef)
Expand Down Expand Up @@ -1176,11 +1218,24 @@ static int nrc_mac_config(struct ieee80211_hw *hw, u32 changed)
struct wim_pm_param *p;
struct sk_buff *skb;
struct nrc_txq *ntxq;
int ret = 0;
int i;
int ret = 0, i;
struct ieee80211_channel ch = {0,};
#if defined(CONFIG_SUPPORT_BD)
bool supp_ch_flag = false;
#endif /* defined(CONFIG_SUPPORT_BD) */
#ifdef CONFIG_SUPPORT_CHANNEL_INFO
struct cfg80211_chan_def chandef = {0,};
memcpy(&chandef, &hw->conf.chandef, sizeof(struct cfg80211_chan_def));
memcpy(&ch, hw->conf.chandef.chan, sizeof(struct ieee80211_channel));
chandef.chan = &ch;
#else
struct ieee80211_conf chandef = {0,};
memcpy(&chandef, &hw->conf, sizeof(struct ieee80211_conf));
memcpy(&ch, hw->conf.channel, sizeof(struct ieee80211_channel));
chandef.channel = &ch;
#endif

#if defined(CONFIG_SUPPORT_BD)
if(g_supp_ch_list.num_ch) {
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
for(i=0; i < g_supp_ch_list.num_ch; i++) {
Expand All @@ -1190,13 +1245,31 @@ static int nrc_mac_config(struct ieee80211_hw *hw, u32 changed)
break;
}
}
if (!supp_ch_flag && nw->alpha2[0] != 'U' && nw->alpha2[1] != 'S' &&
hw->conf.chandef.chan->center_freq == 2412) {
supp_ch_flag = true;
#ifdef CONFIG_SUPPORT_CHANNEL_INFO
chandef.chan->center_freq = g_supp_ch_list.nons1g_ch_freq[0];
#else
chandef.channel->center_freq = g_supp_ch_list.nons1g_ch_freq[0];
#endif /* CONFIG_SUPPORT_CHANNEL_INFO */
}
if(!supp_ch_flag) {
nrc_mac_dbg("%s: Not supported channel %u",
__func__, hw->conf.chandef.chan->center_freq);
return -EINVAL;
}
}
}
#else
if (nw->alpha2[0] != 'U' && nw->alpha2[1] != 'S' &&
hw->conf.chandef.chan->center_freq == 2412) {
#ifdef CONFIG_SUPPORT_CHANNEL_INFO
chandef.chan->center_freq = get_base_freq();
#else
chandef.channel->center_freq = get_base_freq();
#endif /* CONFIG_SUPPORT_CHANNEL_INFO */
}
#endif /* defined(CONFIG_SUPPORT_BD) */

skb = nrc_wim_alloc_skb(nw, WIM_CMD_SET, WIM_MAX_SIZE);
Expand All @@ -1213,11 +1286,7 @@ static int nrc_mac_config(struct ieee80211_hw *hw, u32 changed)
#endif

if (!atomic_read(&nw->d_deauth.delayed_deauth)) {
#ifdef CONFIG_SUPPORT_CHANNEL_INFO
nrc_mac_add_tlv_channel(skb, &hw->conf.chandef);
#else
nrc_mac_add_tlv_channel(skb, &hw->conf);
#endif
nrc_mac_add_tlv_channel(skb, &chandef);
} else {
#ifdef CONFIG_SUPPORT_CHANNEL_INFO
memcpy(&nw->d_deauth.c, &hw->conf.chandef, sizeof(struct cfg80211_chan_def));
Expand Down Expand Up @@ -2891,7 +2960,8 @@ int nrc_reg_notifier(struct wiphy *wiphy,
nrc_mac_dbg("info: cfg80211 regulatory domain callback for %c%c",
request->alpha2[0], request->alpha2[1]);
nrc_mac_dbg("request->initiator:%d", request->initiator);

nrc_cc[0] = request->alpha2[0];
nrc_cc[1] = request->alpha2[1];
if((request->alpha2[0] == '0' && request->alpha2[1] == '0') ||
(request->alpha2[0] == '9' && request->alpha2[1] == '9')) {
nrc_mac_dbg("CC is 00 or 99. Skip loading BD and setting CC");
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host_kr_mic/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev09 - KR MIC
rev10 - KR MIC
2 changes: 1 addition & 1 deletion package/host_kr_mic/evk/binary/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev09 - KR MIC
rev10 - KR MIC
Binary file modified package/host_kr_mic/evk/binary/cli_app
Binary file not shown.
Binary file modified package/host_kr_mic/evk/binary/nrc.ko
Binary file not shown.
Binary file modified package/host_kr_mic/evk/binary/nrc7292_cspi.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host_kr_mic/evk/sw_pkg/nrc_pkg/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev09 - KR MIC
rev10 - KR MIC
Binary file modified package/host_kr_mic/evk/sw_pkg/nrc_pkg/script/cli_app
Binary file not shown.
Binary file modified package/host_kr_mic/evk/sw_pkg/nrc_pkg/sw/driver/nrc.ko
Binary file not shown.
Binary file not shown.
9 changes: 4 additions & 5 deletions package/host_kr_mic/src/cli_app/cli_util.c
Expand Up @@ -441,7 +441,6 @@ int cmd_sta_umac_info_mini_result_parse(char *value, int *display_start_index, i
return more;
}


int cmd_set_maxagg_result_parse(char *value)
{
const char *str_ac[4] ={"BK", "BE", "VI", "VO"};
Expand All @@ -462,17 +461,17 @@ int cmd_set_maxagg_result_parse(char *value)

printf("-- updated aggregation\n");

if(maxagg_info->is_ap)
printf("[STA AID: %4d]\n", maxagg_info->aid);
if(maxagg_info->is_ap && maxagg_info->aid) {
printf("[STA AID: %4d]\n", maxagg_info->aid);
}

printf("AC(%s): STATUS(%s) MAXNUM(%2d) SIZE(%d)\n",
str_ac[maxagg_info->ac], str_state[maxagg_info->state],
maxagg_info->max_agg_num, maxagg_info->agg_num_size);
maxagg_info->max_agg_num, maxagg_info->agg_num_size);

return 0;
}


int cmd_show_maxagg_result_parse(char *value, int *display_start_index)
{
const char *str_ac[4] ={"BK", "BE", "VI", "VO"};
Expand Down
3 changes: 1 addition & 2 deletions package/host_kr_mic/src/nrc/hif.c
Expand Up @@ -909,8 +909,7 @@ static int hif_receive_skb(struct nrc_hif_device *dev, struct sk_buff *skb)
#endif
default:
print_hex_dump(KERN_DEBUG, "hif type err ", DUMP_PREFIX_NONE,
16, 1, skb->data, skb->len, false);
BUG();
16, 1, skb->data, skb->len > 32 ? 32 : skb->len, false);
dev_kfree_skb(skb);
}
return 0;
Expand Down
1 change: 0 additions & 1 deletion package/host_kr_mic/src/nrc/nrc-hif-cspi.c
Expand Up @@ -605,7 +605,6 @@ static struct sk_buff *spi_rx_skb(struct spi_device *spi,
skb->data, 480, false);
priv->slot[RX_SLOT].tail++;
msleep(100);
//BUG();
goto fail;
}

Expand Down

0 comments on commit 5c864e2

Please sign in to comment.