ACK: [PATCH][Xenial SRU] UBUNTU: SAUCE: Redpine: Upgrade to ver. 1.2.RC12

Colin Ian King colin.king at canonical.com
Fri Jun 2 11:17:54 UTC 2017


On 02/06/17 10:27, Shrirang Bagul wrote:
> BugLink: https://bugs.launchpad.net/bugs/1694607
> 
> Vendor release ver: 1.2.RC12
> 
> Changelog:
> 
> 1.2.RC12 -
>     WLAN Bug Fixes:
>     ---------------
>     1) WoWLAN stress test cases issue resolved (when all wifi, bt, ble
>     traffics run and suspend)
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) Low throughput observed for TCP downlink traffic in Coex mode
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC11 -
>     WLAN New Features:
>     ------------------
>     1) Module parameter for debug level(ven_rsi_zone_enabled) is added.
>     2) Regulatory changes for Caracalla added
> 
>     WLAN Bug Fixes:
>     ---------------
>     1) Legacy power save issue is fixed.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) Low throughput observed for TCP downlink traffic in Coex mode
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC10 -
>     WLAN Bug Fixes:
>     ---------------
>     1) 1 minute time delay in sdio resume issue is resolved (Reduced to 10s).
>     2) Fail in multiple iterations of hibernate issue is resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT New Features:
>     ----------------
>     1) BT classic + BT LE mode is supported
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC9 -
>     WLAN Bug Fixes:
>     ---------------
>     1) BT reset added before going to S3/S4/S5 sleep when WoWLAN is enabled.
>     2) Station connection check before going to S3/S4/S5 sleep removed.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC8 -
>     WLAN Bug Fixes:
>     ---------------
>     1) Added power leak fixes for S4.
>     2) S5 WoLAN issue resolved.
>     3) Wakeup short pulse issue resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC7 -
>     WLAN Bug Fixes:
>     ---------------
>     1) Configured host wakeup pin as active low from driver.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC6 -
>     WLAN Bug Fixes:
>     ---------------
>     1) AP data throughput issue resolved.
>     2) Scan results issue resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC4 -
>     WLAN Bug Fixes:
>     ---------------
>     1) Buffer status interrupt handling improved.
>     2) Scan results update in sta+bt dual mode issue resolved
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC3 -
>     WLAN Bug Fixes:
>     ---------------
>     1) WoWLAN multiple cycles issue resolved.
>     2) Driver Version is correctly updated.
>     3) Default operating mode for Caracalla board is corrected.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
> 
>     BT New Features:
>     ----------------
>     1) Multiple slaves issue in WLAN-BT coex mode resolved.
> 
>     BT Limitations/Features NOT Supported:
>     --------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC2 -
>     WLAN Bug Fixes:
>     ---------------
>     1) Suspend/resume issues resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) EAP not tested
> 
>     BT Limitations/Features NOT Supported:
>     --------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.2.RC1 -
>     WLAN New Features:
>     ------------------
>     1) Restrict functional modes as per device operating mode
>     2) Default operating mode for Caracalla board is 13
> 
>     WLAN Bug Fixes:
>     ---------------
>     1) Driver oops issue if more than 4 clients try to connect in
>        operating mode 14 resolved.
>     2) Issue with connecting more than max clients and disconnection
>        issue resolved.
>     3) L2 test stop when wlan interface down issue resolved.
>     4) Driver version corrected.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) EAP not tested
>     4) For channels 12 and 13 in US region max TX power is coming 0 in
>        beacons.
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated
>        from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain
>        mobiles.
> 
> 1.1 -
>     Generic
>     -------
>     1) Firmware file name is displayed along with version information.
>        at the driver load time.
>     2) Device operating mode is made available in the below files:
>        /sys/module/rsi_sdio/parameters/dev_oper_mode
>        /sys/module/rsi_usb/parameters/dev_oper_mode
>     3) Wi-Fi BT radio sharing has been improved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) EAP not tested
>     4) For channels 12 and 13 in US region max TX power is coming 0 in beacons.
> 
>     BT Limitations/Features NOT Supported:
>     --------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.0.RC7 -
>     Generic
>     -------
>     1) Driver version, Firmware version and operating mode information is displayed
>        at the driver load time.
>     2) Driver version is made available in the below files:
>        /sys/module/rsi_91x/version
>        /sys/module/rsi_sdio/version
>        /sys/module/rsi_usb/version
> 
>     WLAN Bug Fixes:
>     ---------------
>     1) Power save latencies resolved
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) EAP not tested
> 
>     BT Limitations/Features NOT Supported:
>     --------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.0 -
>     WLAN New Features:
>     ------------------
>     1) Station mode
>     2) All Security modes (WEP/WPA/WPA2)
>     3) Station Power save (legacy and UAPSD)
>     4) Bgscan and roaming
>     5) External antenna selection
>     6) Neighbour report request in RRM
>     7) Regulatory (802)11d) support
>     8) Management frame protection support (802)11w)
>     9) Software RF-kill
>     10) AP mode
>     11) S3, S4 suspend and resume
>     12) WoWLAN
>     13) AP Power save
>     14) Wi-Fi direct
> 
>     WLAN Bug Fixes:
>     ---------------
>     1) Allowed channels 12 and 13 in FCC region.
>     2) For the allowed channels 12 and 13 in any region, power configuration
>        updated as per Caracalla regulatory rules.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S5 with WoWLAN does not work.
>     2) For GTK rekey, wakeup trigger send to host.
>     3) EAP not tested
> 
>     BT New Features:
>     ----------------
>     1) BT EDR mode
>     2) BT LE mode
>     3) BT coex mode (All the coex modes))
>     4) Multi-slave mode supported)
> 
>     BT Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) To connect multiple BT slaves, connection should be initiated from rsi module.
>     2) In coex mode, BT file transfer fails at times with certain mobiles.
> 
> 1.0_RC3 -
>     Gerenic:
>     --------
>     1) Device operating mode is changed as module parameter. Please check
>        README or TRM on how to configure this while loading the modules.
>     2) Max number of stations supported in Wi-Fi AP alone mode is 32, and AP +
>        BT coex mode is 4.
>     3) AP + BT-EDR + BLE support added.
> 
>     WLAN Bug Fixes:
>     ---------------
>     1) Bgscan probe request issue resolved.
>     2) WoWLAN before association issue resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) S4 with and without WoWLAN works with the work-around implemented by Canonical.
>     2) S5 with WoWLAN does not work.
>     3) For GTK rekey, wakeup trigger send to host.
>     4) EAP not tested
>     5) To connect multiple BT slaves, connection should be initiated from rsi module.
>     6) In coex mode, BT file transfer fails at times with certain mobiles.
> 
>     BT New Features:
>     ----------------
>     1) Multi-slave mode supported.
> 
>     BT Bug Fixes:
>     -------------
>     1) Radio sharing of coex modes improved.
> 
> 1.0.RC2 -
>     WLAN Bug Fixes:
>     ---------------
>     1) PVB preparation issue in AP mode resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Issue while Resume in S4 with or without WoWLAN.
>     3) S5 with WoWLAN does not work.
>     4) For GTK rekey, wakeup trigger send to host.
> 
>     BT Bug Fixes:
>     -------------
>     1) BT dual mode disconnection issue resolved
>     2) AP BT dual mode issue resolved
> 
> 1.0_RC1 -
>     WLAN Bug Fixes:
>     ---------------
>     1) WoWLAN in Co-ex mode issue resolved.
>     2) AP beacon DTIM count update issue resolved.
>     3) Firmware assertion (0x5d) in bgscan issue is resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Issue while Resume in S4 with or without WoWLAN.
>     3) S5 with WoWLAN does not work.
>     4) For GTK rekey, wakeup trigger send to host.
> 
> 0.9.8.5_RC6 -
>     WLAN Bug Fixes:
>     ---------------
>     1) Firmware CRC check fail issue resolved
>     2) Compilation fails on 4.10.1 kernel issue resolved
>     3) BG scan issues resolved
>     4) AP mode regulatory fixes
>     5) WoWLAN issues resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Issue while Resume in S4 with or without WoWLAN.
>     3) S5 with WoWLAN does not work.
>     4) For GTK rekey, wakeup trigger send to host.
> 
> 0.9.8.5_RC4 -
>     WLAN Bug Fixes:
>     -------------------
>     1) AP mode configuration in channels 12 and 13 for EU region issue resolved.
>     2) Data latencies in AP mode issue resolved.
>     3) Roaming issues resolved.
>     4) AP WEP mode issue resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Issue while Resume in S4 with or without WoWLAN.
>     3) S5 with WoWLAN does not work.
>     4) For GTK rekey, wakeup trigger send to host.
>     5) WoWLAN does not work in WEP mode.
> 
>     Others:
>     -------
>     1) USB binds only to RS9113, let upstream kernel driver handle other RSI chips
> 
> 0.9.8.5_RC3 -
>     WLAN Bug Fixes:
>     -------------------
>     1) Power save issue in station mode (By default UAPSD is enabled on
>     Caracalla board) fixed.
>     2) WoWLAN with S3 issue resolved
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Not verified removing SDIO interrupt polling
>     3) S4/S5 sleep states not supported (with and without WoWLAN)
> 
> 0.9.8.5_RC2 -
>     WLAN Bug Fixes:
>     -------------------
>     1) Power save issue in station mode (By default UAPSD is enabled on
>     Caracalla board) fixed.
>     2) Firmware assert 0x71 (while doing bgscan) issue fixed.
>     3) Keep alive functionality in station mode issue fixed.
>     4) Data traffic stops when connected to multiple stations issue resolved
>     5) WoWLAN not working issue is resolved
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Not verified removing SDIO interrupt polling
>     3) S4/S5 sleep states not supported (with and without WoWLAN)
>     4) Wi-Fi direct testing is in progress
> 
> 0.9.8.5_RC1 -
>     WLAN Bug Fixes:
>     -------------------
>     1) Observed unicast probe requests during bgscan issue fixed
>     2) Firmware assert 0x71 (while doing bgscan) issue fixed.
>     3) Crash when doing rmmod while data traffic is going on issue resolved.
>     4) Beacons stopped after 5 minutes of data traffic issue fixed.
>     5) Keep alive functionality in station mode issue fixed
>     6) 11n data rates issue in station mode resolved.
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) EAP not supported
>     2) Not verified removing SDIO interrupt polling
>     3) S4/S5 sleep states not supported (with.without WoWLAN)
>     4) power save is not working consistently
>     5) WoWLAN is not working consistently
> 
> 0.9.8.3 -
>     WLAN New Features:
>     -----------------------------------------
>     1) AP Mode
>     2) S3, S4 suspend and resume
>     3) WoWLAN [Testing in progress]
> 
>     WLAN Bug Fixes:
>     -------------------
>     1) First EAPOL drop issue is resolved
>     2) Firmware Assert while roaming issue is resolved
>        (Provide driver bgsan should be enabled along with supplicant bgscan)
>     3) Roaming takes longer time issue is resolved
>     4) Added polling support as a work-around for the SDIO interrupt issue
>        on some platforms
> 
>     WLAN Limitations/Features NOT Supported:
>     ----------------------------------------
>     1) Wi-Fi Direct mode not supported
>     2) EAP not supported
>     3) SDIO interrupts are not being delivered to the 9113 driver
>     4) In S4 state 9113 device gets reset but device isn't getting re-enumerated.
> 
> Signed-off-by: Shrirang Bagul <shrirang.bagul at canonical.com>
> ---
>  ubuntu/rsi/rsi_91x_core.c     |   3 ++
>  ubuntu/rsi/rsi_91x_hci.c      |   2 -
>  ubuntu/rsi/rsi_91x_mac80211.c | 106 +++++++++++++++++++++++++++++++++++-------
>  ubuntu/rsi/rsi_91x_main.c     |  12 ++++-
>  ubuntu/rsi/rsi_91x_sdio.c     |  79 +++++++++++++++++--------------
>  ubuntu/rsi/rsi_main.h         |   8 +++-
>  6 files changed, 151 insertions(+), 59 deletions(-)
> 
> diff --git a/ubuntu/rsi/rsi_91x_core.c b/ubuntu/rsi/rsi_91x_core.c
> index a349f973f0e8..db320e235388 100644
> --- a/ubuntu/rsi/rsi_91x_core.c
> +++ b/ubuntu/rsi/rsi_91x_core.c
> @@ -292,6 +292,9 @@ void rsi_core_qos_processor(struct rsi_common *common)
>  		if (q_num == INVALID_QUEUE)
>  			break;
>  
> +		if (common->hibernate_resume)
> +			break;
> +
>  		mutex_lock(&common->tx_lock);
>  
>  		status = adapter->host_intf_ops->check_hw_queue_status(adapter,
> diff --git a/ubuntu/rsi/rsi_91x_hci.c b/ubuntu/rsi/rsi_91x_hci.c
> index 2f982bdab470..559962229e28 100644
> --- a/ubuntu/rsi/rsi_91x_hci.c
> +++ b/ubuntu/rsi/rsi_91x_hci.c
> @@ -295,8 +295,6 @@ int rsi_hci_recv_pkt(struct rsi_common *common, u8 *pkt)
>  			return 0;
>  		}
>  
> -		rsi_send_rfmode_frame(common);
> -
>  		ven_rsi_dbg(INFO_ZONE, "Attaching HCI module\n");
>  
>  		if (rsi_hci_attach(common)) {
> diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
> index 185444f77cf9..75aaa0897d59 100644
> --- a/ubuntu/rsi/rsi_91x_mac80211.c
> +++ b/ubuntu/rsi/rsi_91x_mac80211.c
> @@ -193,6 +193,29 @@ static const struct ieee80211_iface_combination rsi_iface_combinations[] = {
>  };
>  #endif
>  
> +#ifdef CONFIG_CARACALLA_BOARD
> +struct reg_map {
> +	char country_code[2];
> +	u8 region_code; 
> +};
> +
> +static struct reg_map rsi_caracalla_reg_db[MAX_REG_COUNTRIES] = {
> +	{"AU", NL80211_DFS_ETSI}, {"AT", NL80211_DFS_ETSI},
> +	{"BE", NL80211_DFS_ETSI}, {"BR", NL80211_DFS_WORLD},
> +	{"CA", NL80211_DFS_FCC}, {"CL", NL80211_DFS_WORLD},
> +	{"CN", NL80211_DFS_WORLD}, {"CO", NL80211_DFS_FCC},
> +	{"CZ", NL80211_DFS_ETSI}, {"DK", NL80211_DFS_ETSI},
> +	{"FI", NL80211_DFS_ETSI}, {"FR", NL80211_DFS_ETSI},
> +	{"DE", NL80211_DFS_ETSI}, {"HK", NL80211_DFS_WORLD},
> +	{"IN", NL80211_DFS_WORLD}, {"ID", NL80211_DFS_WORLD},
> +	{"IE", NL80211_DFS_ETSI}, {"IL", NL80211_DFS_ETSI},
> +	{"IT", NL80211_DFS_ETSI}, {"JP", NL80211_DFS_JP},
> +	{"KR", NL80211_DFS_WORLD}, {"LU", NL80211_DFS_ETSI},
> +	{"MY", NL80211_DFS_WORLD}, {"MX", NL80211_DFS_FCC},
> +	{"MA", NL80211_DFS_WORLD}, {"NL", NL80211_DFS_ETSI},
> +};
> +#endif
> +
>  struct ieee80211_vif *rsi_get_vif(struct rsi_hw *adapter, u8 *mac)
>  {
>  	u8 i;
> @@ -337,6 +360,9 @@ static int rsi_mac80211_hw_scan_start(struct ieee80211_hw *hw,
>  
>  	ven_rsi_dbg(INFO_ZONE, "***** Hardware scan start *****\n");
>  
> +	if (common->fsm_state != FSM_MAC_INIT_DONE)
> +		return -ENODEV;
> +
>  	if (scan_req->n_channels == 0)
>  		return -EINVAL;
>  
> @@ -585,6 +611,9 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw)
>  #endif
>  	ven_rsi_dbg(ERR_ZONE, "===> Interface DOWN <===\n");
>  
> +	if (common->fsm_state != FSM_MAC_INIT_DONE)
> +		return;
> +
>  	mutex_lock(&common->mutex);
>  	
>  	common->iface_down = true;
> @@ -1001,6 +1030,9 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw,
>  	struct ieee80211_conf *conf = &hw->conf;
>  	int status = -EOPNOTSUPP;
>  
> +	if (common->fsm_state != FSM_MAC_INIT_DONE)
> +		return -ENODEV;
> +
>  	mutex_lock(&common->mutex);
>  
>  	/* channel */
> @@ -1139,6 +1171,9 @@ static void rsi_mac80211_bss_info_changed(struct ieee80211_hw *hw,
>  	ven_rsi_dbg(INFO_ZONE, "%s: BSS status changed; changed=%08x\n",
>  		__func__, changed);
>  
> +	if (common->fsm_state != FSM_MAC_INIT_DONE)
> +		return;
> +
>  	mutex_lock(&common->mutex);
>  
>  	if ((changed & BSS_CHANGED_ASSOC) &&
> @@ -1176,10 +1211,13 @@ static void rsi_mac80211_bss_info_changed(struct ieee80211_hw *hw,
>  			bss->dtim_period);
>  
>  		/* If UAPSD is updated send ps params */
> -		if (common->uapsd_bitmap) {
> -			ven_rsi_dbg(INFO_ZONE, "Configuring UAPSD\n");
> -			rsi_conf_uapsd(adapter);
> -		}
> +		if (bss->assoc) {
> +			if (common->uapsd_bitmap) {
> +				ven_rsi_dbg(INFO_ZONE, "Configuring UAPSD\n");
> +				rsi_conf_uapsd(adapter);
> +			}
> +		} else
> +			common->uapsd_bitmap = 0;
>  	}
>  
>  	if ((vif->type == NL80211_IFTYPE_STATION) &&
> @@ -1300,6 +1338,8 @@ static int rsi_mac80211_conf_tx(struct ieee80211_hw *hw,
>  
>  	if (params->uapsd)
>  		common->uapsd_bitmap |= idx;
> +	else
> +		common->uapsd_bitmap &= (~idx);
>  
>  	mutex_unlock(&common->mutex);
>  	return 0;
> @@ -1985,6 +2025,9 @@ static void rsi_mac80211_sw_scan_start(struct ieee80211_hw *hw,
>  	struct rsi_common *common = adapter->priv;
>  	struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
>  
> +	if (common->fsm_state != FSM_MAC_INIT_DONE)
> +		return -ENODEV;
> +
>  	if (common->p2p_enabled)
>  		return;
>  	if (!bss->assoc)
> @@ -2120,6 +2163,8 @@ static const char *regdfs_region_str(enum nl80211_dfs_regions dfs_region)
>                  return "ETSI";
>          case NL80211_DFS_JP:
>                  return "JP";
> +	case NL80211_DFS_WORLD:
> +		return "WORLD";
>          }
>          return "Unknown";
>  }
> @@ -2136,14 +2181,32 @@ static void rsi_reg_notify(struct wiphy *wiphy,
>  	struct ieee80211_vif *vif = adapter->vifs[adapter->sc_nvifs -1];
>  #endif
>  	int i;
> +	u8 region_code;
>  
>  	mutex_lock(&common->mutex);
>  
> +	ven_rsi_dbg(INFO_ZONE,
> +		"%s: country = %s dfs_region = %d\n",
> +		__func__, request->alpha2, request->dfs_region);
> +
> +	region_code = request->dfs_region;
> +#ifdef CONFIG_CARACALLA_BOARD
> +	for (i = 0; i < ARRAY_SIZE(rsi_caracalla_reg_db); i++) {
> +		if (!memcmp(rsi_caracalla_reg_db[i].country_code,
> +		            request->alpha2, 2)) {
> +			region_code = rsi_caracalla_reg_db[i].region_code;
> +			break;
> +		}
> +	}
> +	if (!memcmp(request->alpha2, "00", 2))
> +		region_code = NL80211_DFS_JP;
> +#endif
> +
>  	ven_rsi_dbg(ERR_ZONE, "%s: Updating regulatory for region %s\n",
> -		__func__, regdfs_region_str(request->dfs_region));
> +		__func__, regdfs_region_str(region_code));
>  
>  	sband = wiphy->bands[NL80211_BAND_2GHZ];
> -	switch (request->dfs_region) {
> +	switch (region_code) {
>  	case NL80211_DFS_FCC:
>  		for(i = 0; i < sband->n_channels; i++){
>  	 		ch = &sband->channels[i];
> @@ -2170,7 +2233,7 @@ static void rsi_reg_notify(struct wiphy *wiphy,
>  
>  	case NL80211_DFS_UNSET:
>  	case NL80211_DFS_ETSI:
> -		
> +	case NL80211_DFS_WORLD:
>  		for(i = 0; i < sband->n_channels; i++){
>  	 		ch = &sband->channels[i];
>  			
> @@ -2208,7 +2271,7 @@ static void rsi_reg_notify(struct wiphy *wiphy,
>  	default:
>  		ven_rsi_dbg(ERR_ZONE,
>  			"Wrong Country region code seleted\ndfs_region = %d\n",
> -			request->dfs_region);
> +			region_code);
>  		break;
>  	}
>  
> @@ -2224,15 +2287,11 @@ static void rsi_reg_notify(struct wiphy *wiphy,
>  				ch->flags |= IEEE80211_CHAN_NO_IR;
>  		}
>  	}
> -	
> -	ven_rsi_dbg(INFO_ZONE,
> -		"country = %s dfs_region = %d\n",
> -		request->alpha2, request->dfs_region);
>  
>  #ifndef CONFIG_HW_SCAN_OFFLOAD 
>  	/* If DFS region or country is changed configure back ground scan
>  	 * params to device again */
> -	if ((adapter->dfs_region != request->dfs_region) ||
> +	if ((adapter->dfs_region != region_code) ||
>  	    (memcmp(adapter->country, request->alpha2, 2))) {
>  		if (common->bgscan_en) {
>  			rsi_send_bgscan_params(common, 0);
> @@ -2244,7 +2303,15 @@ static void rsi_reg_notify(struct wiphy *wiphy,
>  	}
>  #endif
>  	
> -	adapter->dfs_region = request->dfs_region;
> +	if (region_code == NL80211_DFS_UNSET)
> +		region_code = NL80211_DFS_WORLD;
> +	ven_rsi_dbg(INFO_ZONE, "Region code: %s\n", regdfs_region_str(region_code));
> +
> +	/* Firmware region code values 1 less than the standard
> +	 * linux values; At this point DFS_UNSET is not set
> +	 * as this is set to WORLD (4)
> +	 */
> +	adapter->dfs_region = region_code - 1;
>  	adapter->country[0] = request->alpha2[0];
>  	adapter->country[1] = request->alpha2[1];
>  	mutex_unlock(&common->mutex);
> @@ -2355,19 +2422,21 @@ fail_wow:
>  
>  static int rsi_mac80211_resume(struct ieee80211_hw *hw)
>  {
> -#ifdef CONFIG_VEN_RSI_WOW
>  	struct rsi_hw *adapter = hw->priv;
>  	struct rsi_common *common = adapter->priv;
> +#ifdef CONFIG_VEN_RSI_WOW
>  	u16 rx_filter_word = 0;
> -
> -	adapter->priv->wow_flags = 0;
>  #endif
> +        
> +	adapter->priv->wow_flags = 0;
>  	
>  	ven_rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__);
>  
> +	if (common->hibernate_resume)
> +		return 0;
> +
>  #ifdef CONFIG_VEN_RSI_WOW
>  	rsi_send_wowlan_request(common, 0, 0);
> -	//rx_filter_word = 0xE ;
>  
>  	rx_filter_word = (ALLOW_DATA_ASSOC_PEER |
>  			  ALLOW_CTRL_ASSOC_PEER |
> @@ -2378,6 +2447,7 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
>  	return 0;
>  }
>  #endif
> +
>  char *rsi_vif_type_to_name(enum nl80211_iftype vif_type)
>  {
>  	switch (vif_type) {
> diff --git a/ubuntu/rsi/rsi_91x_main.c b/ubuntu/rsi/rsi_91x_main.c
> index 72b80ba1a878..0bae9fed3d64 100644
> --- a/ubuntu/rsi/rsi_91x_main.c
> +++ b/ubuntu/rsi/rsi_91x_main.c
> @@ -42,7 +42,7 @@
>  #include "rsi_coex.h"
>  #endif
>  
> -u32 ven_rsi_zone_enabled =	//INFO_ZONE |
> +u16 ven_rsi_zone_enabled =	//INFO_ZONE |
>  				//INIT_ZONE |
>  				//MGMT_TX_ZONE |
>  				//MGMT_RX_ZONE |
> @@ -53,6 +53,16 @@ u32 ven_rsi_zone_enabled =	//INFO_ZONE |
>  				ERR_ZONE |
>  				0;
>  EXPORT_SYMBOL_GPL(ven_rsi_zone_enabled);
> +MODULE_PARM_DESC(ven_rsi_zone_enabled,
> +		 "BIT(0) - ERROR ZONE \
> +		  BIT(1) - INFO ZONE \
> +		  BIT(2) - INIT ZONE \
> +		  BIT(3) - MGMT TX ZONE \
> +		  BIT(4) - MGMT RX ZONE \
> +		  BIT(5) - DATA TX ZONE \
> +		  BIT(6) - DATA RX ZONE \
> +		  BIT(7) - FSM ZONE \
> +		  BIT(8) - ISR ZONE");
>  
>  /**
>   * ven_rsi_dbg() - This function outputs informational messages.
> diff --git a/ubuntu/rsi/rsi_91x_sdio.c b/ubuntu/rsi/rsi_91x_sdio.c
> index 8eb939868b0b..eb7821b7b8d7 100644
> --- a/ubuntu/rsi/rsi_91x_sdio.c
> +++ b/ubuntu/rsi/rsi_91x_sdio.c
> @@ -1122,6 +1122,7 @@ static int rsi_probe(struct sdio_func *pfunction,
>  		goto fail;
>  	}
>  	sdio_release_host(pfunction);
> +	adapter->priv->hibernate_resume = false;
>  
>  	return 0;
>  
> @@ -1156,24 +1157,24 @@ static void rsi_disconnect(struct sdio_func *pfunction)
>  	sdio_claim_host(pfunction);
>  	sdio_release_irq(pfunction);
>  	sdio_release_host(pfunction);
> -	mdelay(10);
>  
>  	ven_rsi_mac80211_detach(adapter);
> -	mdelay(10);
>  
>  #if defined(CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX)
>  	rsi_hci_detach(adapter->priv);
> -	mdelay(10);
>  #endif
>  
> -	/* Reset Chip */
> -	rsi_reset_chip(adapter);
> +	if (!adapter->priv->hibernate_resume) {
> +		/* Reset Chip */
> +		rsi_reset_chip(adapter);
>  
> -	/* Resetting to take care of the case, where-in driver is re-loaded */
> -	sdio_claim_host(pfunction);
> -	rsi_reset_card(pfunction);
> -	sdio_disable_func(pfunction);
> -	sdio_release_host(pfunction);
> +		/* Resetting to take care of the case, where-in driver
> +		 * is re-loaded */
> +		sdio_claim_host(pfunction);
> +		rsi_reset_card(pfunction);
> +		sdio_disable_func(pfunction);
> +		sdio_release_host(pfunction);
> +	}
>  	dev->write_fail = 2;
>  	ven_rsi_91x_deinit(adapter);
>  	ven_rsi_dbg(ERR_ZONE, "##### RSI SDIO device disconnected #####\n");
> @@ -1295,12 +1296,10 @@ static int rsi_suspend(struct device *dev)
>  	struct sdio_func *pfunction = dev_to_sdio_func(dev);
>  	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
>  	struct rsi_common *common = adapter->priv;
> -#ifdef CONFIG_VEN_RSI_WOW
>  	struct rsi_91x_sdiodev *sdev =
>  		(struct rsi_91x_sdiodev *)adapter->rsi_dev;
> -#endif
>  
> -	ven_rsi_dbg(INFO_ZONE, "SDIO Bus suspend ===>\n");
> +	ven_rsi_dbg(ERR_ZONE, "SDIO Bus suspend ===>\n");
>  
>  	if (!adapter) {
>  		ven_rsi_dbg(ERR_ZONE, "Device is not ready\n");
> @@ -1314,29 +1313,28 @@ static int rsi_suspend(struct device *dev)
>  			ven_rsi_dbg(ERR_ZONE,
>  				"##### Device can not wake up through WLAN\n");
>  
> +#if 0
>  #if defined(CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX)
>  		if ((common->coex_mode == 2) || (common->coex_mode == 4)) {
>  			/* Deregister BT protocol */
>  			rsi_hci_detach(common);
>  		}
>  #endif
> +#endif
>  	}
>  #endif
>  
>  	ret = rsi_sdio_disable_interrupts(pfunction);
> -	if (ret)
> -		return ret;
>  
> -	if (sdev->write_fail) {
> +	if (sdev->write_fail)
>  		ven_rsi_dbg(INFO_ZONE, "###### Device is not ready #######\n");
> -		return 0;
> -	}
>  
>  	ret = rsi_set_sdio_pm_caps(adapter);
>  	if (ret)
>  		ven_rsi_dbg(INFO_ZONE,
>  			"Setting power management caps failed\n");
>  
> +	common->fsm_state = FSM_CARD_NOT_READY;
>  	ven_rsi_dbg(INFO_ZONE, "***** SDIO BUS SUSPEND DONE ******\n");
>  
>  	return 0;
> @@ -1352,11 +1350,11 @@ int rsi_resume(struct device *dev)
>  	ven_rsi_dbg(INFO_ZONE, "***** BUS RESUME ******\n");
>  
>  	common->suspend_in_prog = false;
> +	common->fsm_state = FSM_MAC_INIT_DONE;
>  
>  	ret = rsi_sdio_enable_interrupts(pfunction);
> -	if (ret)
> -		return ret;
>  
> +#if 0
>  #ifdef CONFIG_VEN_RSI_WOW
>  #if defined(CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX)
>  	if ((common->wow_flags & RSI_WOW_ENABLED) &&
> @@ -1367,6 +1365,7 @@ int rsi_resume(struct device *dev)
>  #endif
>          adapter->priv->wow_flags = 0;
>  #endif
> +#endif
>  
>  	ven_rsi_dbg(INFO_ZONE, "***** RSI module resumed *****\n");
>  	return 0;
> @@ -1378,10 +1377,8 @@ static int rsi_freeze(struct device *dev)
>  	struct sdio_func *pfunction = dev_to_sdio_func(dev);
>  	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
>  	struct rsi_common *common = adapter->priv;
> -#ifdef CONFIG_VEN_RSI_WOW
>  	struct rsi_91x_sdiodev *sdev =
>  		(struct rsi_91x_sdiodev *)adapter->rsi_dev;
> -#endif
>  
>  	ven_rsi_dbg(INFO_ZONE, "SDIO Bus freeze ===>\n");
>  
> @@ -1397,23 +1394,21 @@ static int rsi_freeze(struct device *dev)
>  			ven_rsi_dbg(ERR_ZONE,
>  				"##### Device can not wake up through WLAN\n");
>  
> +#if 0
>  #if defined(CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX)
>  		if ((common->coex_mode == 2) || (common->coex_mode == 4)) {
>  			/* Deregister BT protocol */
>  			rsi_deregister_bt(common);
>  		}
>  #endif
> +#endif
>  	}
>  #endif
>  
>  	ret = rsi_sdio_disable_interrupts(pfunction);
> -	if (ret)
> -		return ret;
>  
> -	if (sdev->write_fail) {
> +	if (sdev->write_fail)
>  		ven_rsi_dbg(INFO_ZONE, "###### Device is not ready #######\n");
> -		return 0;
> -	}
>  	
>  	ret = rsi_set_sdio_pm_caps(adapter);
>  	if (ret)
> @@ -1424,17 +1419,18 @@ static int rsi_freeze(struct device *dev)
>  
>  int rsi_thaw(struct device *dev)
>  {
> -	int ret;
>  	struct sdio_func *pfunction = dev_to_sdio_func(dev);
>  	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
>  
> -	ven_rsi_dbg(INFO_ZONE, "***** BUS THAW ******\n");
> +	ven_rsi_dbg(ERR_ZONE, "***** BUS THAW ******\n");
>  
> -	adapter->priv->suspend_in_prog = false;
> +//	adapter->priv->suspend_in_prog = false;
> +	adapter->priv->hibernate_resume = true;
> +	adapter->priv->fsm_state = FSM_CARD_NOT_READY;
> +	adapter->priv->bt_fsm_state = BT_DEVICE_NOT_READY;
> +	adapter->priv->iface_down = true;
>  
> -	ret = rsi_sdio_enable_interrupts(pfunction);
> -	if (ret)
> -		return ret;
> +	rsi_sdio_enable_interrupts(pfunction);
>  
>  	ven_rsi_dbg(INFO_ZONE, "RSI module resumed\n");
>  	return 0;
> @@ -1442,17 +1438,28 @@ int rsi_thaw(struct device *dev)
>  
>  static int rsi_poweroff(struct device *dev)
>  {
> -	return rsi_suspend(dev);
> +	return rsi_freeze(dev);
>  }
>  
>  static void rsi_shutdown(struct device *dev)
>  {
> -	rsi_suspend(dev);
> +	rsi_freeze(dev);
>  }
>  
>  int rsi_restore(struct device *dev)
>  {
> -	return rsi_thaw(dev);
> +	struct sdio_func *pfunction = dev_to_sdio_func(dev);
> +	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
> +
> +	adapter->priv->suspend_in_prog = false;
> +	adapter->priv->hibernate_resume = true;
> +	adapter->priv->fsm_state = FSM_CARD_NOT_READY;
> +	adapter->priv->bt_fsm_state = BT_DEVICE_NOT_READY;
> +	adapter->priv->iface_down = true;
> +
> +	ven_rsi_dbg(INFO_ZONE, "RSI module restored\n");
> +
> +	return 0;
>  }
>  
>  static const struct dev_pm_ops rsi_pm_ops = {
> diff --git a/ubuntu/rsi/rsi_main.h b/ubuntu/rsi/rsi_main.h
> index 0fc3ce316bf1..eb1afbb6c4c5 100644
> --- a/ubuntu/rsi/rsi_main.h
> +++ b/ubuntu/rsi/rsi_main.h
> @@ -41,7 +41,7 @@ struct rsi_hw;
>  
>  #include "rsi_ps.h"
>  
> -#define DRV_VER				"RS9113.NB0.NL.GNU.LNX.1.2.RC9"
> +#define DRV_VER				"RS9113.NB0.NL.GNU.LNX.1.2.RC12"
>  
>  #define ERR_ZONE                        BIT(0) /* Error Msgs		*/
>  #define INFO_ZONE                       BIT(1) /* Generic Debug Msgs	*/
> @@ -63,7 +63,7 @@ struct rsi_hw;
>  #define FSM_BB_RF_PROG_SENT             7
>  #define FSM_MAC_INIT_DONE               8
>  
> -extern u32 ven_rsi_zone_enabled;
> +extern u16 ven_rsi_zone_enabled;
>  extern __printf(2, 3) void ven_rsi_dbg(u32 zone, const char *fmt, ...);
>  void rsi_hex_dump(u32 zone, char *msg_str, const u8 *msg, u32 len);
>  
> @@ -131,6 +131,9 @@ void rsi_hex_dump(u32 zone, char *msg_str, const u8 *msg, u32 len);
>  #define RSI_WOW_ENABLED			BIT(0)
>  #define RSI_WOW_NO_CONNECTION		BIT(1)
>  
> +#define MAX_REG_COUNTRIES		30
> +#define NL80211_DFS_WORLD		4
> +
>  struct version_info {
>  	u16 major;
>  	u16 minor;
> @@ -327,6 +330,7 @@ struct rsi_common {
>  	int tx_power;
>  	u8 ant_in_use;
>  	bool suspend_in_prog;
> +	bool hibernate_resume;
>  #ifdef CONFIG_VEN_RSI_WOW
>  	u8 wow_flags;
>  #endif
> 

Update to a specific driver, resolves known issues

Acked-by: Colin Ian King <colin.king at canonical.com>





More information about the kernel-team mailing list