@@ -461,7 +461,7 @@ static struct wlcore_conf wl18xx_conf = {
461461 },
462462 .fwlog = {
463463 .mode = WL12XX_FWLOG_CONTINUOUS ,
464- .mem_blocks = 2 ,
464+ .mem_blocks = 0 ,
465465 .severity = 0 ,
466466 .timestamp = WL12XX_FWLOG_TIMESTAMP_DISABLED ,
467467 .output = WL12XX_FWLOG_OUTPUT_DBG_PINS ,
@@ -584,7 +584,7 @@ static const struct wlcore_partition_set wl18xx_ptable[PART_TABLE_LEN] = {
584584 .mem = { .start = 0x00A00000 , .size = 0x00012000 },
585585 .reg = { .start = 0x00807000 , .size = 0x00005000 },
586586 .mem2 = { .start = 0x00800000 , .size = 0x0000B000 },
587- .mem3 = { .start = 0x00000000 , .size = 0x00000000 },
587+ .mem3 = { .start = 0x00401594 , .size = 0x00001020 },
588588 },
589589 [PART_DOWN ] = {
590590 .mem = { .start = 0x00000000 , .size = 0x00014000 },
@@ -602,7 +602,7 @@ static const struct wlcore_partition_set wl18xx_ptable[PART_TABLE_LEN] = {
602602 .mem = { .start = 0x00800000 , .size = 0x000050FC },
603603 .reg = { .start = 0x00B00404 , .size = 0x00001000 },
604604 .mem2 = { .start = 0x00C00000 , .size = 0x00000400 },
605- .mem3 = { .start = 0x00000000 , .size = 0x00000000 },
605+ .mem3 = { .start = 0x00401594 , .size = 0x00001020 },
606606 },
607607 [PART_PHY_INIT ] = {
608608 .mem = { .start = WL18XX_PHY_INIT_MEM_ADDR ,
@@ -1030,7 +1030,8 @@ static int wl18xx_boot(struct wl1271 *wl)
10301030 SMART_CONFIG_SYNC_EVENT_ID |
10311031 SMART_CONFIG_DECODE_EVENT_ID |
10321032 RX_BA_WIN_SIZE_CHANGE_EVENT_ID |
1033- TIME_SYNC_EVENT_ID ;
1033+ TIME_SYNC_EVENT_ID |
1034+ FW_LOGGER_INDICATION ;
10341035
10351036 wl -> ap_event_mask = MAX_TX_FAILURE_EVENT_ID ;
10361037
@@ -1176,6 +1177,13 @@ static int wl18xx_hw_init(struct wl1271 *wl)
11761177 return ret ;
11771178}
11781179
1180+ static int wl18xx_init_vif (struct wl1271 * wl , struct wl12xx_vif * wlvif )
1181+ {
1182+ return wlcore_cmd_generic_cfg (wl , wlvif ,
1183+ WLCORE_CFG_FEATURE_DIVERSITY_MODE ,
1184+ wl -> diversity_mode , 0 );
1185+ }
1186+
11791187static void wl18xx_convert_fw_status (struct wl1271 * wl , void * raw_fw_status ,
11801188 struct wl_fw_status * fw_status )
11811189{
@@ -1384,24 +1392,24 @@ static int wl18xx_get_pg_ver(struct wl1271 *wl, s8 *ver)
13841392
13851393#define WL18XX_CONF_FILE_NAME "ti-connectivity/wl18xx-conf.bin"
13861394
1387- static int wl18xx_load_conf_file ( struct device * dev , struct wlcore_conf * conf ,
1388- struct wl18xx_priv_conf * priv_conf )
1395+ static struct wlcore_conf_file *
1396+ wl18xx_load_conf_file ( struct device * dev , const struct firmware * * _fw )
13891397{
13901398 struct wlcore_conf_file * conf_file ;
13911399 const struct firmware * fw ;
13921400 int ret ;
13931401
1394- ret = request_firmware (& fw , WL18XX_CONF_FILE_NAME , dev );
1402+ ret = request_firmware (_fw , WL18XX_CONF_FILE_NAME , dev );
13951403 if (ret < 0 ) {
1396- wl1271_error ("could not get configuration binary %s: %d" ,
1404+ wl1271_info ("could not get configuration binary %s: %d" ,
13971405 WL18XX_CONF_FILE_NAME , ret );
1398- return ret ;
1406+ return NULL ;
13991407 }
14001408
1409+ fw = * _fw ;
14011410 if (fw -> size != WL18XX_CONF_SIZE ) {
1402- wl1271_error ("configuration binary file size is wrong, expected %zu got %zu" ,
1411+ wl1271_info ("configuration binary file size is wrong, expected %zu got %zu" ,
14031412 WL18XX_CONF_SIZE , fw -> size );
1404- ret = - EINVAL ;
14051413 goto out_release ;
14061414 }
14071415
@@ -1411,35 +1419,39 @@ static int wl18xx_load_conf_file(struct device *dev, struct wlcore_conf *conf,
14111419 wl1271_error ("configuration binary file magic number mismatch, "
14121420 "expected 0x%0x got 0x%0x" , WL18XX_CONF_MAGIC ,
14131421 conf_file -> header .magic );
1414- ret = - EINVAL ;
14151422 goto out_release ;
14161423 }
14171424
14181425 if (conf_file -> header .version != cpu_to_le32 (WL18XX_CONF_VERSION )) {
14191426 wl1271_error ("configuration binary file version not supported, "
14201427 "expected 0x%08x got 0x%08x" ,
14211428 WL18XX_CONF_VERSION , conf_file -> header .version );
1422- ret = - EINVAL ;
14231429 goto out_release ;
14241430 }
14251431
1426- memcpy (conf , & conf_file -> core , sizeof (* conf ));
1427- memcpy (priv_conf , & conf_file -> priv , sizeof (* priv_conf ));
1432+ return conf_file ;
14281433
14291434out_release :
14301435 release_firmware (fw );
1431- return ret ;
1436+ return NULL ;
14321437}
14331438
14341439static int wl18xx_conf_init (struct wl1271 * wl , struct device * dev )
14351440{
14361441 struct wl18xx_priv * priv = wl -> priv ;
1442+ struct wlcore_conf_file * conf_file ;
1443+ const struct firmware * fw ;
14371444
1438- if (wl18xx_load_conf_file (dev , & wl -> conf , & priv -> conf ) < 0 ) {
1445+ conf_file = wl18xx_load_conf_file (dev , & fw );
1446+ if (conf_file ) {
1447+ memcpy (& wl -> conf , & conf_file -> core , sizeof (wl18xx_conf ));
1448+ memcpy (& priv -> conf , & conf_file -> priv , sizeof (priv -> conf ));
1449+ release_firmware (fw );
1450+ } else {
14391451 wl1271_warning ("falling back to default config" );
14401452
14411453 /* apply driver default configuration */
1442- memcpy (& wl -> conf , & wl18xx_conf , sizeof (wl -> conf ));
1454+ memcpy (& wl -> conf , & wl18xx_conf , sizeof (wl18xx_conf ));
14431455 /* apply default private configuration */
14441456 memcpy (& priv -> conf , & wl18xx_default_priv_conf ,
14451457 sizeof (priv -> conf ));
@@ -1713,6 +1725,7 @@ static struct wlcore_ops wl18xx_ops = {
17131725 .tx_immediate_compl = wl18xx_tx_immediate_completion ,
17141726 .tx_delayed_compl = NULL ,
17151727 .hw_init = wl18xx_hw_init ,
1728+ .init_vif = wl18xx_init_vif ,
17161729 .convert_fw_status = wl18xx_convert_fw_status ,
17171730 .set_tx_desc_csum = wl18xx_set_tx_desc_csum ,
17181731 .get_pg_ver = wl18xx_get_pg_ver ,
@@ -1886,6 +1899,28 @@ wl18xx_iface_combinations[] = {
18861899 BIT (NL80211_CHAN_HT20 ) |
18871900 BIT (NL80211_CHAN_HT40MINUS ) |
18881901 BIT (NL80211_CHAN_HT40PLUS ),
1902+ },
1903+ {
1904+ .max_interfaces = 3 ,
1905+ .limits = wl18xx_iface_ap_cl_limits ,
1906+ .n_limits = ARRAY_SIZE (wl18xx_iface_ap_cl_limits ),
1907+ .num_different_channels = 2 ,
1908+ },
1909+ {
1910+ .max_interfaces = 3 ,
1911+ .limits = wl18xx_iface_ap_cl_limits ,
1912+ .n_limits = ARRAY_SIZE (wl18xx_iface_ap_cl_limits ),
1913+ .num_different_channels = 1 ,
1914+ .radar_detect_widths = BIT (NL80211_CHAN_NO_HT ) |
1915+ BIT (NL80211_CHAN_HT20 ) |
1916+ BIT (NL80211_CHAN_HT40MINUS ) |
1917+ BIT (NL80211_CHAN_HT40PLUS ),
1918+ },
1919+ {
1920+ .max_interfaces = 3 ,
1921+ .limits = wl18xx_iface_ap_go_limits ,
1922+ .n_limits = ARRAY_SIZE (wl18xx_iface_ap_go_limits ),
1923+ .num_different_channels = 1 ,
18891924 }
18901925};
18911926
@@ -2005,10 +2040,8 @@ static int wl18xx_setup(struct wl1271 *wl)
20052040 & wl18xx_siso20_ht_cap );
20062041 }
20072042
2008- if (!checksum_param ) {
2043+ if (!checksum_param )
20092044 wl18xx_ops .set_rx_csum = NULL ;
2010- wl18xx_ops .init_vif = NULL ;
2011- }
20122045
20132046 /* Enable 11a Band only if we have 5G antennas */
20142047 wl -> enable_11a = (priv -> conf .phy .number_of_assembled_ant5 != 0 );
0 commit comments