Skip to content

Commit f74dc3f

Browse files
authored
Merge branch 'develop' into RDKB-58489
2 parents 40b0ec6 + 384def1 commit f74dc3f

File tree

8 files changed

+146
-76
lines changed

8 files changed

+146
-76
lines changed

platform/banana-pi/platform.c

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,7 @@ int platform_set_radio_pre_init(wifi_radio_index_t index, wifi_radio_operationPa
127127

128128
int platform_create_vap(wifi_radio_index_t index, wifi_vap_info_map_t *map)
129129
{
130-
char output_val[BPI_LEN_32];
131130
wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
132-
133-
if (map == NULL)
134-
{
135-
wifi_hal_dbg_print("%s:%d: wifi_vap_info_map_t *map is NULL \n", __func__, __LINE__);
136-
}
137-
for (index = 0; index < map->num_vaps; index++)
138-
{
139-
if (map->vap_array[index].vap_mode == wifi_vap_mode_ap)
140-
{
141-
// Assigning default radius values
142-
wifi_nvram_defaultRead("radius_s_port",output_val);
143-
map->vap_array[index].u.bss_info.security.u.radius.s_port = atoi(output_val);
144-
wifi_nvram_defaultRead("radius_s_ip",map->vap_array[index].u.bss_info.security.u.radius.s_ip);
145-
wifi_nvram_defaultRead("radius_key",map->vap_array[index].u.bss_info.security.u.radius.s_key);
146-
}
147-
}
148131
return 0;
149132
}
150133

@@ -240,7 +223,30 @@ int nvram_get_current_ssid(char *l_ssid, int vap_index)
240223

241224
int platform_pre_create_vap(wifi_radio_index_t index, wifi_vap_info_map_t *map)
242225
{
243-
wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
226+
char output_val[BPI_LEN_32];
227+
int i;
228+
wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
229+
230+
if (map == NULL)
231+
{
232+
wifi_hal_dbg_print("%s:%d: wifi_vap_info_map_t *map is NULL \n", __func__, __LINE__);
233+
}
234+
for (i = 0; i < map->num_vaps; i++)
235+
{
236+
if (map->vap_array[i].vap_mode == wifi_vap_mode_ap)
237+
{
238+
if ((get_security_mode_support_radius(map->vap_array[i].u.bss_info.security.mode)) || is_wifi_hal_vap_lnf_radius(map->vap_array[i].vap_index) || is_wifi_hal_vap_hotspot_secure(map->vap_array[i].vap_index)) {
239+
// Assigning default radius values
240+
wifi_nvram_defaultRead("radius_s_port",output_val);
241+
map->vap_array[i].u.bss_info.security.u.radius.s_port = atoi(output_val);
242+
map->vap_array[i].u.bss_info.security.u.radius.port = atoi(output_val);
243+
wifi_nvram_defaultRead("radius_s_ip",map->vap_array[i].u.bss_info.security.u.radius.s_ip);
244+
wifi_nvram_defaultRead("radius_s_ip",map->vap_array[i].u.bss_info.security.u.radius.ip);
245+
wifi_nvram_defaultRead("radius_key",map->vap_array[i].u.bss_info.security.u.radius.s_key);
246+
wifi_nvram_defaultRead("radius_key",map->vap_array[i].u.bss_info.security.u.radius.key);
247+
}
248+
}
249+
}
244250
return 0;
245251
}
246252

platform/broadcom/platform.c

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT
3030

3131
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
32-
defined(TCHCBRV2_PORT)
32+
defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
3333
#undef ENABLE
3434
#undef BW_20MHZ
3535
#undef BW_40MHZ
@@ -41,10 +41,12 @@
4141
#define mld_link_info _mld_link_info
4242
#if defined(SCXER10_PORT)
4343
#include <wifi-include/wlioctl.h>
44+
#elif defined(SKYSR213_PORT)
45+
#include <wlioctl.h>
4446
#else
4547
#include <wifi/wlioctl.h>
4648
#endif
47-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
49+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
4850

4951
#if defined(SCXER10_PORT) && defined(CONFIG_IEEE80211BE)
5052
static bool l_eht_set = false;
@@ -3146,7 +3148,7 @@ int platform_set_dfs(wifi_radio_index_t index, wifi_radio_operationParam_t *oper
31463148
}
31473149

31483150
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
3149-
defined(TCHCBRV2_PORT)
3151+
defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
31503152

31513153
static int get_rates(char *ifname, int *rates, size_t rates_size, unsigned int *num_rates)
31523154
{
@@ -3206,22 +3208,27 @@ static void platform_get_radio_caps_2g(wifi_radio_info_t *radio, wifi_interface_
32063208
static const u8 ext_cap[] = { 0x85, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00,
32073209
0x20 };
32083210
#endif // TCHCBRV2_PORT
3211+
#if defined(SKYSR213_PORT)
3212+
static const u8 ext_cap[] = { 0x85, 0x00, 0x08, 0x82, 0x01, 0x00, 0x40, 0x40, 0x00, 0x40,
3213+
0x20 };
3214+
#endif // SKYSR213_PORT
32093215
static const u8 ht_mcs[16] = { 0xff, 0xff, 0xff, 0xff };
3210-
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT)
3216+
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
3217+
defined(SKYSR213_PORT)
32113218
static const u8 he_mac_cap[HE_MAX_MAC_CAPAB_SIZE] = { 0x05, 0x00, 0x18, 0x12, 0x00, 0x10 };
3212-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT
3219+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || SKYSR213_PORT
32133220
#if defined(TCHCBRV2_PORT)
32143221
static const u8 he_mac_cap[HE_MAX_MAC_CAPAB_SIZE] = { 0x01, 0x00, 0x08, 0x12, 0x00, 0x10 };
32153222
#endif // TCHCBRV2_PORT
32163223
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
3217-
defined(TCHCBRV2_PORT)
3224+
defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
32183225
static const u8 he_mcs[HE_MAX_MCS_CAPAB_SIZE] = { 0xaa, 0xff, 0xaa, 0xff };
32193226
static const u8 he_ppet[HE_MAX_PPET_CAPAB_SIZE] = { 0x1b, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71 };
3220-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3221-
#if defined(TCXB7_PORT) || defined(TCHCBRV2_PORT)
3227+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
3228+
#if defined(TCXB7_PORT) || defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
32223229
static const u8 he_phy_cap[HE_MAX_PHY_CAPAB_SIZE] = { 0x22, 0x20, 0x02, 0xc0, 0x0f, 0x03, 0x95,
32233230
0x18, 0x00, 0xcc, 0x00 };
3224-
#endif // TCXB7_PORT || TCHCBRV2_PORT
3231+
#endif // TCXB7_PORT || TCHCBRV2_PORT || SKYSR213_PORT
32253232
#if defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT)
32263233
static const u8 he_phy_cap[HE_MAX_PHY_CAPAB_SIZE] = { 0x22, 0x20, 0x02, 0xc0, 0x02, 0x03, 0x95,
32273234
0x00, 0x00, 0xcc, 0x00 };
@@ -3233,15 +3240,15 @@ static void platform_get_radio_caps_2g(wifi_radio_info_t *radio, wifi_interface_
32333240

32343241
radio->driver_data.capa.flags |= WPA_DRIVER_FLAGS_AP_UAPSD;
32353242

3236-
#if defined(XB10_PORT) || defined(SCXER10_PORT) || defined(TCHCBRV2_PORT)
3243+
#if defined(XB10_PORT) || defined(SCXER10_PORT) || defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
32373244
free(radio->driver_data.extended_capa);
32383245
radio->driver_data.extended_capa = malloc(sizeof(ext_cap));
32393246
memcpy(radio->driver_data.extended_capa, ext_cap, sizeof(ext_cap));
32403247
free(radio->driver_data.extended_capa_mask);
32413248
radio->driver_data.extended_capa_mask = malloc(sizeof(ext_cap));
32423249
memcpy(radio->driver_data.extended_capa_mask, ext_cap, sizeof(ext_cap));
32433250
radio->driver_data.extended_capa_len = sizeof(ext_cap);
3244-
#endif // XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3251+
#endif // XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
32453252

32463253
for (int i = 0; i < iface->num_hw_features; i++) {
32473254
#if defined(XB10_PORT) || defined(SCXER10_PORT)
@@ -3257,14 +3264,14 @@ static void platform_get_radio_caps_2g(wifi_radio_info_t *radio, wifi_interface_
32573264
#endif /* HOSTAPD_VERSION >= 211 */
32583265

32593266
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
3260-
defined(TCHCBRV2_PORT)
3267+
defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
32613268
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].mac_cap, he_mac_cap,
32623269
sizeof(he_mac_cap));
32633270
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].phy_cap, he_phy_cap,
32643271
sizeof(he_phy_cap));
32653272
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].mcs, he_mcs, sizeof(he_mcs));
32663273
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].ppet, he_ppet, sizeof(he_ppet));
3267-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3274+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
32683275

32693276
for (int ch = 0; ch < iface->hw_features[i].num_channels; ch++) {
32703277
iface->hw_features[i].channels[ch].max_tx_power = 30; // dBm
@@ -3282,20 +3289,24 @@ static void platform_get_radio_caps_5g(wifi_radio_info_t *radio, wifi_interface_
32823289
static const u8 ext_cap[] = { 0x84, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x40, 0x00, 0x40,
32833290
0x20 };
32843291
#endif // TCHCBRV2_PORT
3292+
#if defined(SKYSR213_PORT)
3293+
static const u8 ext_cap[] = { 0x84, 0x00, 0x08, 0x82, 0x01, 0x00, 0x40, 0x40, 0x00, 0x40,
3294+
0x20 };
3295+
#endif // SKYSR213_PORT
32853296
static const u8 ht_mcs[16] = { 0xff, 0xff, 0xff, 0xff };
32863297
static const u8 vht_mcs[8] = { 0xaa, 0xff, 0x00, 0x00, 0xaa, 0xff, 0x00, 0x20 };
32873298
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
3288-
defined(TCHCBRV2_PORT)
3299+
defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
32893300
static const u8 he_mac_cap[HE_MAX_MAC_CAPAB_SIZE] = { 0x05, 0x00, 0x18, 0x12, 0x00, 0x10 };
32903301
static const u8 he_mcs[HE_MAX_MCS_CAPAB_SIZE] = { 0xaa, 0xff, 0xaa, 0xff, 0xaa, 0xff, 0xaa,
32913302
0xff };
32923303
static const u8 he_ppet[HE_MAX_PPET_CAPAB_SIZE] = { 0x7b, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71,
32933304
0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71 };
3294-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3295-
#if defined(TCXB7_PORT) || defined(TCHCBRV2_PORT)
3305+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
3306+
#if defined(TCXB7_PORT) || defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
32963307
static const u8 he_phy_cap[HE_MAX_PHY_CAPAB_SIZE] = { 0x4c, 0x20, 0x02, 0xc0, 0x6f, 0x1b, 0x95,
32973308
0x18, 0x00, 0xcc, 0x00 };
3298-
#endif // TCXB7_PORT || TCHCBRV2_PORT
3309+
#endif // TCXB7_PORT || TCHCBRV2_PORT || SKYSR213_PORT
32993310
#if defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT)
33003311
static const u8 he_phy_cap[HE_MAX_PHY_CAPAB_SIZE] = { 0x4c, 0x20, 0x02, 0xc0, 0x02, 0x1b, 0x95,
33013312
0x00, 0x00, 0xcc, 0x00 };
@@ -3311,15 +3322,15 @@ static void platform_get_radio_caps_5g(wifi_radio_info_t *radio, wifi_interface_
33113322

33123323
radio->driver_data.capa.flags |= WPA_DRIVER_FLAGS_AP_UAPSD | WPA_DRIVER_FLAGS_DFS_OFFLOAD;
33133324

3314-
#if defined(XB10_PORT) || defined(SCXER10_PORT) || defined(TCHCBRV2_PORT)
3325+
#if defined(XB10_PORT) || defined(SCXER10_PORT) || defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
33153326
free(radio->driver_data.extended_capa);
33163327
radio->driver_data.extended_capa = malloc(sizeof(ext_cap));
33173328
memcpy(radio->driver_data.extended_capa, ext_cap, sizeof(ext_cap));
33183329
free(radio->driver_data.extended_capa_mask);
33193330
radio->driver_data.extended_capa_mask = malloc(sizeof(ext_cap));
33203331
memcpy(radio->driver_data.extended_capa_mask, ext_cap, sizeof(ext_cap));
33213332
radio->driver_data.extended_capa_len = sizeof(ext_cap);
3322-
#endif // XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3333+
#endif // XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
33233334

33243335
for (int i = 0; i < iface->num_hw_features; i++) {
33253336
#if defined(XB10_PORT) || defined(SCXER10_PORT)
@@ -3338,14 +3349,14 @@ static void platform_get_radio_caps_5g(wifi_radio_info_t *radio, wifi_interface_
33383349
memcpy(iface->hw_features[i].vht_mcs_set, vht_mcs, sizeof(vht_mcs));
33393350

33403351
#if defined(TCXB7_PORT) || defined(TCXB8_PORT) || defined(XB10_PORT) || defined(SCXER10_PORT) || \
3341-
defined(TCHCBRV2_PORT)
3352+
defined(TCHCBRV2_PORT) || defined(SKYSR213_PORT)
33423353
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].mac_cap, he_mac_cap,
33433354
sizeof(he_mac_cap));
33443355
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].phy_cap, he_phy_cap,
33453356
sizeof(he_phy_cap));
33463357
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].mcs, he_mcs, sizeof(he_mcs));
33473358
memcpy(iface->hw_features[i].he_capab[IEEE80211_MODE_AP].ppet, he_ppet, sizeof(he_ppet));
3348-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3359+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
33493360

33503361
// XER-10 uses old kernel that does not support EHT cap NL parameters
33513362
#if defined(SCXER10_PORT)
@@ -3501,7 +3512,7 @@ int platform_get_radio_caps(wifi_radio_index_t index)
35013512
{
35023513
return RETURN_OK;
35033514
}
3504-
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT
3515+
#endif // TCXB7_PORT || TCXB8_PORT || XB10_PORT || SCXER10_PORT || TCHCBRV2_PORT || SKYSR213_PORT
35053516

35063517
#if defined(SCXER10_PORT) && defined(CONFIG_IEEE80211BE)
35073518
static bool platform_radio_state(wifi_radio_index_t index)

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ librdk_wifihal_la_CPPFLAGS += -I$(top_srcdir)/../platform/banana-pi -I${PKG_CONF
129129
librdk_wifihal_la_SOURCES += ../platform/banana-pi/platform.c
130130
endif
131131

132-
include_HEADERS = wifi_hal_rdk.h wifi_hal_rdk_framework.h ieee80211.h ../util_crypto/aes_siv.h
132+
include_HEADERS = wifi_hal_rdk.h wifi_hal_rdk_framework.h ieee80211.h ../util_crypto/aes_siv.h
133133

134134
if ONE_WIFIBUILD
135135
include_HEADERS += wifi_hal_priv.h wifi_hal_wnm_rrm.h

0 commit comments

Comments
 (0)