Commit 0fdd9099 authored by Shrirang Bagul's avatar Shrirang Bagul Committed by Kleber Sacilotto de Souza

UBUNTU: SAUCE: Redpine: Upgrade to ver. 1.2 production release

BugLink: https://bugs.launchpad.net/bugs/1697829
BugLink: https://bugs.launchpad.net/bugs/1694733
BugLink: https://bugs.launchpad.net/bugs/1700941

Vendor release ver: 1.2 (production version)

1.2 -
 WLAN Supported Features:
 ------------------------
 1) Station mode
 2) 802.11bgn
 3) Secutiry modes: Open, WEP, WPA, WPA2
 4) AP mode
 5) Bgscan and roaming
 6) Legacy and UAPSD power save
 7) Regulatory support
 8) WoWLAN
 9) Management frame protection
 10) Wi-Fi direct mode

 WLAN Bug Fixes:
 ---------------
 1) WoWLAN from S5 fails (lp: #1686283)
 2) After wifi-ap is set, system will kernel panic  (lp: #1699753)
 3) Connect to "n" AP will cause system kernel panic (lp: #1699686)
 4) Low throughput observed in some channels for TCP downlink traffic in
 Coex mode.

 WLAN Limitations/Features NOT Supported:
 ----------------------------------------
 1) For GTK rekey, wakeup trigger send to host.

 BT Supported Features:
 ----------------------
 1) BT EDR mode
 2) BT LE mode
 3) BT Coex mode
	* WLAN STA + BT EDR
	* WLAN STA + BT LE
	* WLAN STA + BT EDR + BT LE
	* WLAN AP + BT EDR
	* WLAN AP + BT EDR + BT LE

 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.RC16 -
 WLAN Bug Fixes:
 ---------------
 1) WoWLAN from S5 fails (lp: #1686283)
 2) After wifi-ap is set, system will kernel panic  (lp: #1699753)
 3) Connect to "n" AP will cause system kernel panic (lp: #1699686)

 WLAN Limitations/Features NOT Supported:
 ----------------------------------------
 1) For GTK rekey, wakeup trigger send to host.
 2) 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.RC15 -
 WLAN Bug Fixes:
 ---------------
 1) Coverity scan fixes (lp: #1694733)
 2) Avoid driver reload at S4 resume

 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.RC14 -
 WLAN Bug Fixes:
 ---------------
 1) Low throughput with 40MHz issue resolved.

 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.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.
Signed-off-by: default avatarShrirang Bagul <shrirang.bagul@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKleber Souza <kleber.souza@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 8bce7ff2
...@@ -105,6 +105,7 @@ int rsi_coex_recv_pkt(struct rsi_common *common, u8 *msg) ...@@ -105,6 +105,7 @@ int rsi_coex_recv_pkt(struct rsi_common *common, u8 *msg)
u16 msg_type = msg[2]; u16 msg_type = msg[2];
if (msg_type == COMMON_CARD_READY_IND) { if (msg_type == COMMON_CARD_READY_IND) {
common->hibernate_resume = false;
ven_rsi_dbg(INFO_ZONE, "COMMON CARD READY RECEIVED\n"); ven_rsi_dbg(INFO_ZONE, "COMMON CARD READY RECEIVED\n");
rsi_handle_card_ready(common, msg); rsi_handle_card_ready(common, msg);
} else if (msg_type == SLEEP_NOTIFY_IND) { } else if (msg_type == SLEEP_NOTIFY_IND) {
......
...@@ -321,16 +321,16 @@ void rsi_core_qos_processor(struct rsi_common *common) ...@@ -321,16 +321,16 @@ void rsi_core_qos_processor(struct rsi_common *common)
} }
skb = rsi_core_dequeue_pkt(common, q_num); skb = rsi_core_dequeue_pkt(common, q_num);
if ((adapter->peer_notify) &&
(skb->data[2] == PEER_NOTIFY)) {
adapter->peer_notify = false;
ven_rsi_dbg(INFO_ZONE, "%s RESET PEER_NOTIFY\n", __func__);
}
if (!skb) { if (!skb) {
ven_rsi_dbg(ERR_ZONE, "skb null\n"); ven_rsi_dbg(ERR_ZONE, "skb null\n");
mutex_unlock(&common->tx_lock); mutex_unlock(&common->tx_lock);
break; break;
} }
if ((adapter->peer_notify) &&
(skb->data[2] == PEER_NOTIFY)) {
adapter->peer_notify = false;
ven_rsi_dbg(INFO_ZONE, "%s RESET PEER_NOTIFY\n", __func__);
}
#ifdef CONFIG_VEN_RSI_COEX #ifdef CONFIG_VEN_RSI_COEX
if (q_num == MGMT_BEACON_Q) { if (q_num == MGMT_BEACON_Q) {
status = rsi_send_pkt(common, skb); status = rsi_send_pkt(common, skb);
......
...@@ -247,7 +247,7 @@ int rsi_prepare_mgmt_desc(struct rsi_common *common,struct sk_buff *skb) ...@@ -247,7 +247,7 @@ int rsi_prepare_mgmt_desc(struct rsi_common *common,struct sk_buff *skb)
struct rsi_hw *adapter = common->priv; struct rsi_hw *adapter = common->priv;
struct ieee80211_hdr *wh = NULL; struct ieee80211_hdr *wh = NULL;
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
struct ieee80211_conf *conf = &adapter->hw->conf; struct ieee80211_conf *conf;// = &adapter->hw->conf;
struct ieee80211_vif *vif = NULL; struct ieee80211_vif *vif = NULL;
struct skb_info *tx_params; struct skb_info *tx_params;
int status = -EINVAL; int status = -EINVAL;
...@@ -257,6 +257,9 @@ int rsi_prepare_mgmt_desc(struct rsi_common *common,struct sk_buff *skb) ...@@ -257,6 +257,9 @@ int rsi_prepare_mgmt_desc(struct rsi_common *common,struct sk_buff *skb)
u8 vap_id = 0; u8 vap_id = 0;
u32 dword_align_bytes = 0; u32 dword_align_bytes = 0;
if (!adapter->hw)
goto err;
conf = &adapter->hw->conf;
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
tx_params = (struct skb_info *)info->driver_data; tx_params = (struct skb_info *)info->driver_data;
...@@ -1272,6 +1275,7 @@ int rsi_hal_device_init(struct rsi_hw *adapter) ...@@ -1272,6 +1275,7 @@ int rsi_hal_device_init(struct rsi_hw *adapter)
return -EINVAL; return -EINVAL;
} }
adapter->common_hal_fsm = COMMAN_HAL_WAIT_FOR_CARD_READY; adapter->common_hal_fsm = COMMAN_HAL_WAIT_FOR_CARD_READY;
common->fsm_state = FSM_CARD_NOT_READY;
#if defined(CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX) #if defined(CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX)
adapter->priv->bt_fsm_state = BT_DEVICE_NOT_READY; adapter->priv->bt_fsm_state = BT_DEVICE_NOT_READY;
......
...@@ -227,6 +227,7 @@ int rsi_send_rfmode_frame(struct rsi_common *common) ...@@ -227,6 +227,7 @@ int rsi_send_rfmode_frame(struct rsi_common *common)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct rsi_bt_rfmode_frame *cmd_frame; struct rsi_bt_rfmode_frame *cmd_frame;
int status;
ven_rsi_dbg(MGMT_TX_ZONE, "%s: Sending BT RF mode frame\n", __func__); ven_rsi_dbg(MGMT_TX_ZONE, "%s: Sending BT RF mode frame\n", __func__);
...@@ -246,7 +247,11 @@ int rsi_send_rfmode_frame(struct rsi_common *common) ...@@ -246,7 +247,11 @@ int rsi_send_rfmode_frame(struct rsi_common *common)
skb_put(skb, sizeof(struct rsi_bt_rfmode_frame)); skb_put(skb, sizeof(struct rsi_bt_rfmode_frame));
// return rsi_coex_send_pkt(common, skb, RSI_BT_Q); // return rsi_coex_send_pkt(common, skb, RSI_BT_Q);
return common->priv->host_intf_ops->write_pkt(common->priv, skb->data, skb->len); status = common->priv->host_intf_ops->write_pkt(common->priv,
skb->data,
skb->len);
dev_kfree_skb(skb);
return status;
} }
EXPORT_SYMBOL_GPL(rsi_send_rfmode_frame); EXPORT_SYMBOL_GPL(rsi_send_rfmode_frame);
...@@ -254,6 +259,7 @@ int rsi_deregister_bt(struct rsi_common *common) ...@@ -254,6 +259,7 @@ int rsi_deregister_bt(struct rsi_common *common)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct rsi_bt_cmd_frame *cmd_frame; struct rsi_bt_cmd_frame *cmd_frame;
int status;
ven_rsi_dbg(MGMT_TX_ZONE, "%s: Sending BT register frame\n", __func__); ven_rsi_dbg(MGMT_TX_ZONE, "%s: Sending BT register frame\n", __func__);
...@@ -271,7 +277,11 @@ int rsi_deregister_bt(struct rsi_common *common) ...@@ -271,7 +277,11 @@ int rsi_deregister_bt(struct rsi_common *common)
skb_put(skb, sizeof(struct rsi_bt_cmd_frame)); skb_put(skb, sizeof(struct rsi_bt_cmd_frame));
//return rsi_coex_send_pkt(common, skb, RSI_BT_Q); //return rsi_coex_send_pkt(common, skb, RSI_BT_Q);
return common->priv->host_intf_ops->write_pkt(common->priv, skb->data, skb->len); status = common->priv->host_intf_ops->write_pkt(common->priv,
skb->data,
skb->len);
dev_kfree_skb(skb);
return status;
} }
EXPORT_SYMBOL_GPL(rsi_deregister_bt); EXPORT_SYMBOL_GPL(rsi_deregister_bt);
...@@ -578,9 +588,6 @@ void rsi_hci_detach(struct rsi_common *common) ...@@ -578,9 +588,6 @@ void rsi_hci_detach(struct rsi_common *common)
if (!h_adapter) if (!h_adapter)
return; return;
if (common->suspend_in_prog)
rsi_deregister_bt(common);
hdev = h_adapter->hdev; hdev = h_adapter->hdev;
if (hdev) { if (hdev) {
//hci_dev_hold(hdev); //hci_dev_hold(hdev);
......
...@@ -456,6 +456,9 @@ static void rsi_mac80211_hw_scan_cancel(struct ieee80211_hw *hw, ...@@ -456,6 +456,9 @@ static void rsi_mac80211_hw_scan_cancel(struct ieee80211_hw *hw,
void ven_rsi_mac80211_detach(struct rsi_hw *adapter) void ven_rsi_mac80211_detach(struct rsi_hw *adapter)
{ {
struct ieee80211_hw *hw = adapter->hw; struct ieee80211_hw *hw = adapter->hw;
#ifdef CONFIG_HW_SCAN_OFFLOAD
struct rsi_common *common = adapter->priv;
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
enum nl80211_band band; enum nl80211_band band;
#else #else
...@@ -464,11 +467,15 @@ void ven_rsi_mac80211_detach(struct rsi_hw *adapter) ...@@ -464,11 +467,15 @@ void ven_rsi_mac80211_detach(struct rsi_hw *adapter)
ven_rsi_dbg(INFO_ZONE, "Detach mac80211...\n"); ven_rsi_dbg(INFO_ZONE, "Detach mac80211...\n");
#ifdef CONFIG_HW_SCAN_OFFLOAD
flush_workqueue(common->scan_workqueue);
#endif
if (hw) { if (hw) {
ieee80211_stop_queues(hw); ieee80211_stop_queues(hw);
ieee80211_unregister_hw(hw); ieee80211_unregister_hw(hw);
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
adapter->hw = NULL; adapter->hw = NULL;
adapter->sc_nvifs = 0;
} }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
...@@ -606,13 +613,8 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw) ...@@ -606,13 +613,8 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw)
{ {
struct rsi_hw *adapter = hw->priv; struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv; struct rsi_common *common = adapter->priv;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
struct cfg80211_scan_info info;
#endif
ven_rsi_dbg(ERR_ZONE, "===> Interface DOWN <===\n");
if (common->fsm_state != FSM_MAC_INIT_DONE) ven_rsi_dbg(ERR_ZONE, "===> Interface DOWN <===\n");
return;
mutex_lock(&common->mutex); mutex_lock(&common->mutex);
...@@ -625,7 +627,8 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw) ...@@ -625,7 +627,8 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw)
wiphy_rfkill_stop_polling(hw->wiphy); wiphy_rfkill_stop_polling(hw->wiphy);
/* Block all rx frames */ /* Block all rx frames */
rsi_send_rx_filter_frame(common, 0xffff); if (common->fsm_state == FSM_MAC_INIT_DONE)
rsi_send_rx_filter_frame(common, 0xffff);
mutex_unlock(&common->mutex); mutex_unlock(&common->mutex);
} }
...@@ -1489,6 +1492,7 @@ static int rsi_mac80211_set_key(struct ieee80211_hw *hw, ...@@ -1489,6 +1492,7 @@ static int rsi_mac80211_set_key(struct ieee80211_hw *hw,
* *
* Return: status: 0 on success, negative error code on failure. * Return: status: 0 on success, negative error code on failure.
*/ */
#ifndef CONFIG_CARACALLA_BOARD
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0))
static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
...@@ -1511,6 +1515,12 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, ...@@ -1511,6 +1515,12 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct ieee80211_ampdu_params *params) struct ieee80211_ampdu_params *params)
#endif #endif
#else
static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_ampdu_params *params)
#endif
{ {
int status = 1; int status = 1;
struct rsi_hw *adapter = hw->priv; struct rsi_hw *adapter = hw->priv;
...@@ -1520,7 +1530,7 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, ...@@ -1520,7 +1530,7 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
u8 ii = 0; u8 ii = 0;
u8 sta_id = 0; u8 sta_id = 0;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)) #if ((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)) || defined(CONFIG_CARACALLA_BOARD))
u16 tid = params->tid; u16 tid = params->tid;
u8 buf_size = params->buf_size; u8 buf_size = params->buf_size;
enum ieee80211_ampdu_mlme_action action = params->action; enum ieee80211_ampdu_mlme_action action = params->action;
...@@ -1534,7 +1544,7 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, ...@@ -1534,7 +1544,7 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
mutex_lock(&common->mutex); mutex_lock(&common->mutex);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)) #if ((LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)) && !(defined(CONFIG_CARACALLA_BOARD)))
if (ssn != NULL) if (ssn != NULL)
seq_no = *ssn; seq_no = *ssn;
#else #else
...@@ -2026,7 +2036,7 @@ static void rsi_mac80211_sw_scan_start(struct ieee80211_hw *hw, ...@@ -2026,7 +2036,7 @@ static void rsi_mac80211_sw_scan_start(struct ieee80211_hw *hw,
struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf; struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
if (common->fsm_state != FSM_MAC_INIT_DONE) if (common->fsm_state != FSM_MAC_INIT_DONE)
return -ENODEV; return;
if (common->p2p_enabled) if (common->p2p_enabled)
return; return;
...@@ -2152,7 +2162,7 @@ static int rsi_mac80211_get_antenna(struct ieee80211_hw *hw, ...@@ -2152,7 +2162,7 @@ static int rsi_mac80211_get_antenna(struct ieee80211_hw *hw,
return 0; return 0;
} }
static const char *regdfs_region_str(enum nl80211_dfs_regions dfs_region) static const char *regdfs_region_str(u8 dfs_region)
{ {
switch (dfs_region) { switch (dfs_region) {
case NL80211_DFS_UNSET: case NL80211_DFS_UNSET:
...@@ -2367,41 +2377,31 @@ static u16 rsi_wow_map_triggers(struct rsi_common *common, ...@@ -2367,41 +2377,31 @@ static u16 rsi_wow_map_triggers(struct rsi_common *common,
} }
#endif #endif
#ifdef CONFIG_PM
int rsi_mac80211_suspend(struct ieee80211_hw *hw,
struct cfg80211_wowlan *wowlan)
{
#ifdef CONFIG_VEN_RSI_WOW #ifdef CONFIG_VEN_RSI_WOW
struct rsi_hw *adapter = hw->priv; int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan)
{
struct rsi_common *common = adapter->priv; struct rsi_common *common = adapter->priv;
u16 triggers = 0; u16 triggers = 0;
u16 rx_filter_word = 0; u16 rx_filter_word = 0;
struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf; struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
#endif
int ret = 0;
ven_rsi_dbg(INFO_ZONE, "***** mac80211 suspend called ******\n"); ven_rsi_dbg(INFO_ZONE, "Config WoWLAN to device\n");
#ifdef CONFIG_VEN_RSI_WOW
if (WARN_ON(!wowlan)) { if (WARN_ON(!wowlan)) {
ven_rsi_dbg(ERR_ZONE, ven_rsi_dbg(ERR_ZONE, "WoW triggers not enabled\n");
"##### WoW triggers not enabled #####\n"); return -EINVAL;
ret = -EINVAL;
goto fail_wow;
} }
triggers = rsi_wow_map_triggers(common, wowlan); triggers = rsi_wow_map_triggers(common, wowlan);
if (!triggers) { if (!triggers) {
ven_rsi_dbg(ERR_ZONE, "%s:No valid WoW triggers\n",__func__); ven_rsi_dbg(ERR_ZONE, "%s:No valid WoW triggers\n",__func__);
ret = -EINVAL; return -EINVAL;
goto fail_wow;
} }
if (!bss->assoc) { if (!bss->assoc) {
ven_rsi_dbg(ERR_ZONE, ven_rsi_dbg(ERR_ZONE,
"Cannot configure WoWLAN (Station not connected)\n"); "Cannot configure WoWLAN (Station not connected)\n");
common->wow_flags |= RSI_WOW_NO_CONNECTION; common->wow_flags |= RSI_WOW_NO_CONNECTION;
ret = 0; return 0;
goto fail_wow;
} }
ven_rsi_dbg(INFO_ZONE, "TRIGGERS %x\n", triggers); ven_rsi_dbg(INFO_ZONE, "TRIGGERS %x\n", triggers);
rsi_send_wowlan_request(common, triggers, 1); rsi_send_wowlan_request(common, triggers, 1);
...@@ -2415,9 +2415,29 @@ int rsi_mac80211_suspend(struct ieee80211_hw *hw, ...@@ -2415,9 +2415,29 @@ int rsi_mac80211_suspend(struct ieee80211_hw *hw,
rsi_send_rx_filter_frame(common, rx_filter_word); rsi_send_rx_filter_frame(common, rx_filter_word);
common->wow_flags |= RSI_WOW_ENABLED; common->wow_flags |= RSI_WOW_ENABLED;
fail_wow:
return 0;
}
EXPORT_SYMBOL_GPL(rsi_config_wowlan);
#endif
#ifdef CONFIG_PM
static int rsi_mac80211_suspend(struct ieee80211_hw *hw,
struct cfg80211_wowlan *wowlan)
{
#ifdef CONFIG_VEN_RSI_WOW
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
mutex_lock(&common->mutex);
if (rsi_config_wowlan(adapter, wowlan)) {
ven_rsi_dbg(ERR_ZONE, "Failed to configure WoWLAN\n");
mutex_unlock(&common->mutex);
return 1;
}
mutex_unlock(&common->mutex);
#endif #endif
return (ret ? 1 : 0); return 0;
} }
static int rsi_mac80211_resume(struct ieee80211_hw *hw) static int rsi_mac80211_resume(struct ieee80211_hw *hw)
...@@ -2426,9 +2446,9 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw) ...@@ -2426,9 +2446,9 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
struct rsi_common *common = adapter->priv; struct rsi_common *common = adapter->priv;
#ifdef CONFIG_VEN_RSI_WOW #ifdef CONFIG_VEN_RSI_WOW
u16 rx_filter_word = 0; u16 rx_filter_word = 0;
#endif
adapter->priv->wow_flags = 0; adapter->priv->wow_flags = 0;
#endif
ven_rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__); ven_rsi_dbg(INFO_ZONE, "%s: mac80211 resume\n", __func__);
...@@ -2436,6 +2456,7 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw) ...@@ -2436,6 +2456,7 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
return 0; return 0;
#ifdef CONFIG_VEN_RSI_WOW #ifdef CONFIG_VEN_RSI_WOW
mutex_lock(&common->mutex);
rsi_send_wowlan_request(common, 0, 0); rsi_send_wowlan_request(common, 0, 0);
rx_filter_word = (ALLOW_DATA_ASSOC_PEER | rx_filter_word = (ALLOW_DATA_ASSOC_PEER |
...@@ -2443,7 +2464,9 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw) ...@@ -2443,7 +2464,9 @@ static int rsi_mac80211_resume(struct ieee80211_hw *hw)
ALLOW_MGMT_ASSOC_PEER | ALLOW_MGMT_ASSOC_PEER |
0); 0);
rsi_send_rx_filter_frame(common, rx_filter_word); rsi_send_rx_filter_frame(common, rx_filter_word);
mutex_unlock(&common->mutex);
#endif #endif
return 0; return 0;
} }
#endif #endif
...@@ -2741,7 +2764,7 @@ int rsi_mac80211_attach(struct rsi_common *common) ...@@ -2741,7 +2764,7 @@ int rsi_mac80211_attach(struct rsi_common *common)
hw->uapsd_queues = IEEE80211_MARKALL_UAPSD_QUEUES; hw->uapsd_queues = IEEE80211_MARKALL_UAPSD_QUEUES;
hw->uapsd_max_sp_len = IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL; hw->uapsd_max_sp_len = IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL;
hw->max_tx_aggregation_subframes = 8; hw->max_tx_aggregation_subframes = 8;
// hw->max_rx_aggregation_subframes = 8; hw->max_rx_aggregation_subframes = 8;
rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ); rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ);
wiphy->bands[NL80211_BAND_2GHZ] = wiphy->bands[NL80211_BAND_2GHZ] =
......
...@@ -52,7 +52,7 @@ u16 ven_rsi_zone_enabled = //INFO_ZONE | ...@@ -52,7 +52,7 @@ u16 ven_rsi_zone_enabled = //INFO_ZONE |
//ISR_ZONE | //ISR_ZONE |
ERR_ZONE | ERR_ZONE |
0; 0;
EXPORT_SYMBOL_GPL(ven_rsi_zone_enabled); module_param(ven_rsi_zone_enabled, ushort, S_IRUGO);
MODULE_PARM_DESC(ven_rsi_zone_enabled, MODULE_PARM_DESC(ven_rsi_zone_enabled,
"BIT(0) - ERROR ZONE \ "BIT(0) - ERROR ZONE \
BIT(1) - INFO ZONE \ BIT(1) - INFO ZONE \
......
This diff is collapsed.
...@@ -74,6 +74,50 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter, ...@@ -74,6 +74,50 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter,
return status; return status;
} }
void rsi_sdio_rx_thread(struct rsi_common *common)
{
struct rsi_hw *adapter = common->priv;
struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
struct sk_buff *skb;
int status;
bool done = false;
do {
rsi_wait_event(&sdev->rx_thread.event, EVENT_WAIT_FOREVER);
if (atomic_read(&sdev->rx_thread.thread_done))
break;
while (true) {
skb = skb_dequeue(&sdev->rx_q.head);
if (!skb)
break;
status = ven_rsi_read_pkt(common, skb->data, skb->len);
if (status) {
ven_rsi_dbg(ERR_ZONE, "Failed to read the packet\n");
dev_kfree_skb(skb);
return;
}
dev_kfree_skb(skb);
if (sdev->rx_q.num_rx_pkts > 0)
sdev->rx_q.num_rx_pkts--;
if (atomic_read(&sdev->rx_thread.thread_done)) {
done = true;
break;
}
}
rsi_reset_event(&sdev->rx_thread.event);
if (done)
break;
} while (1);
ven_rsi_dbg(INFO_ZONE, "%s: Terminated SDIO RX thread\n", __func__);
skb_queue_purge(&sdev->rx_q.head);
atomic_inc(&sdev->rx_thread.thread_done);
complete_and_exit(&sdev->rx_thread.completion, 0);
}
/** /**
* rsi_process_pkt() - This Function reads rx_blocks register and figures out * rsi_process_pkt() - This Function reads rx_blocks register and figures out
* the size of the rx pkt. * the size of the rx pkt.
...@@ -91,6 +135,7 @@ static int rsi_process_pkt(struct rsi_common *common) ...@@ -91,6 +135,7 @@ static int rsi_process_pkt(struct rsi_common *common)
int status = 0; int status = 0;
u8 value = 0; u8 value = 0;
u8 protocol = 0, unaggr_pkt = 0; u8 protocol = 0, unaggr_pkt = 0;
struct sk_buff *skb;
#define COEX_PKT 0 #define COEX_PKT 0
#define WLAN_PKT 3 #define WLAN_PKT 3
...@@ -128,28 +173,30 @@ static int rsi_process_pkt(struct rsi_common *common) ...@@ -128,28 +173,30 @@ static int rsi_process_pkt(struct rsi_common *common)
unaggr_pkt = 1; unaggr_pkt = 1;
rcv_pkt_len = (num_blks * 256); rcv_pkt_len = (num_blks * 256);
if (dev->rx_q.num_rx_pkts >= RSI_SDIO_MAX_RX_PKTS)
return -EINVAL;
common->rx_data_pkt = kmalloc(rcv_pkt_len, GFP_KERNEL); skb = dev_alloc_skb(rcv_pkt_len);
if (!common->rx_data_pkt) { if (!skb) {
ven_rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n", ven_rsi_dbg(ERR_ZONE, "%s: Failed to allocate rx packet\n",
__func__); __func__);
return -ENOMEM; return -ENOMEM;
} }
skb_put(skb, rcv_pkt_len);
status = rsi_sdio_host_intf_read_pkt(adapter, status = rsi_sdio_host_intf_read_pkt(adapter, skb->data, skb->len);
common->rx_data_pkt,
rcv_pkt_len);
if (status) { if (status) {
ven_rsi_dbg(ERR_ZONE, "%s: Failed to read packet from card\n", ven_rsi_dbg(ERR_ZONE, "%s: Failed to read packet from card\n",
__func__); __func__);
goto fail; dev_kfree_skb(skb);
return status;
} }
skb_queue_tail(&dev->rx_q.head, skb);
dev->rx_q.num_rx_pkts++;
rsi_set_event(&dev->rx_thread.event);
status = ven_rsi_read_pkt(common, common->rx_data_pkt, rcv_pkt_len); return 0;
fail:
kfree(common->rx_data_pkt);
return status;
} }
/** /**
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
/* Default operating mode is Wi-Fi alone */ /* Default operating mode is Wi-Fi alone */
#ifdef CONFIG_CARACALLA_BOARD #ifdef CONFIG_CARACALLA_BOARD
#if defined (CONFIG_VEN_RSI_COEX) || defined(CONFIG_VEN_RSI_BT_ALONE) #if defined (CONFIG_VEN_RSI_COEX) || defined(CONFIG_VEN_RSI_BT_ALONE)
u16 dev_oper_mode = DEV_OPMODE_STA_BT_DUAL; static u16 dev_oper_mode = DEV_OPMODE_STA_BT_DUAL;
#else #else
u16 dev_oper_mode = DEV_OPMODE_WIFI_ALONE; static u16 dev_oper_mode = DEV_OPMODE_WIFI_ALONE;
#endif #endif
#else #else
u16 dev_oper_mode = DEV_OPMODE_WIFI_ALONE; static u16 dev_oper_mode = DEV_OPMODE_WIFI_ALONE;
#endif #endif
module_param(dev_oper_mode, ushort, S_IRUGO); module_param(dev_oper_mode, ushort, S_IRUGO);
MODULE_PARM_DESC(dev_oper_mode, MODULE_PARM_DESC(dev_oper_mode,
...@@ -359,9 +359,14 @@ static void rsi_rx_done_handler(struct urb *urb) ...@@ -359,9 +359,14 @@ static void rsi_rx_done_handler(struct urb *urb)
ven_rsi_dbg(INFO_ZONE, "%s: Zero length packet\n", __func__); ven_rsi_dbg(INFO_ZONE, "%s: Zero length packet\n", __func__);
return; return;
} }
rx_cb->pend = 1; skb_put(rx_cb->rx_skb, urb->actual_length);
skb_queue_tail(&dev->rx_q[rx_cb->ep_num - 1], rx_cb->rx_skb);
rsi_set_event(&dev->rx_thread.event); rsi_set_event(&dev->rx_thread.event);
if (rsi_rx_urb_submit(dev->priv, rx_cb->ep_num))
ven_rsi_dbg(ERR_ZONE, "%s: Failed in urb submission", __func__);
} }
/** /**
...@@ -370,12 +375,24 @@ static void rsi_rx_done_handler(struct urb *urb) ...@@ -370,12 +375,24 @@ static void rsi_rx_done_handler(struct urb *urb)
* *
* Return: 0 on success, a negative error code on failure. * Return: 0 on success, a negative error code on failure.
*/ */
static int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num) int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num)
{ {
struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num - 1]; struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num - 1];
struct urb *urb = rx_cb->rx_urb; struct urb *urb = rx_cb->rx_urb;
int status; int status;
struct sk_buff *skb;
u8 dword_align_bytes;
skb = dev_alloc_skb(3000);
if (!skb)
return -ENOMEM;
skb_reserve(skb, 64); /* For dword alignment */
dword_align_bytes = (unsigned long)skb->data & 0x3f;
if (dword_align_bytes)
skb_push(skb, dword_align_bytes);
urb->transfer_buffer = skb->data;
rx_cb->rx_skb = skb;
usb_fill_bulk_urb(urb, usb_fill_bulk_urb(urb,
dev->usbdev, dev->usbdev,
...@@ -488,12 +505,13 @@ int rsi_usb_load_data_master_write(struct rsi_hw *adapter, ...@@ -488,12 +505,13 @@ int rsi_usb_load_data_master_write(struct rsi_hw *adapter,
int rsi_usb_check_queue_status(struct rsi_hw *adapter, u8 q_num) int rsi_usb_check_queue_status(struct rsi_hw *adapter, u8 q_num)
{ {
return QUEUE_NOT_FULL;
#if 0
struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
int status; int status;
u32 buf_status = 0; u32 buf_status = 0;
return QUEUE_NOT_FULL;
if (adapter->priv->fsm_state != FSM_MAC_INIT_DONE) if (adapter->priv->fsm_state != FSM_MAC_INIT_DONE)
return QUEUE_NOT_FULL; return QUEUE_NOT_FULL;
...@@ -534,6 +552,7 @@ int rsi_usb_check_queue_status(struct rsi_hw *adapter, u8 q_num) ...@@ -534,6 +552,7 @@ int rsi_usb_check_queue_status(struct rsi_hw *adapter, u8 q_num)
return QUEUE_FULL; return QUEUE_FULL;
return QUEUE_NOT_FULL; return QUEUE_NOT_FULL;
#endif
} }
/** /**
...@@ -549,10 +568,12 @@ static void rsi_deinit_usb_interface(struct rsi_hw *adapter) ...@@ -549,10 +568,12 @@ static void rsi_deinit_usb_interface(struct rsi_hw *adapter)
ven_rsi_dbg(INFO_ZONE, "Deinitializing USB interface...\n"); ven_rsi_dbg(INFO_ZONE, "Deinitializing USB interface...\n");
rsi_kill_thread(&dev->rx_thread); rsi_kill_thread(&dev->rx_thread);
kfree(dev->rx_cb[0].rx_buffer); //kfree(dev->rx_cb[0].rx_buffer);
skb_queue_purge(&dev->rx_q[0]);
usb_free_urb(dev->rx_cb[0].rx_urb); usb_free_urb(dev->rx_cb[0].rx_urb);
#if defined (CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX) #if defined (CONFIG_VEN_RSI_BT_ALONE) || defined(CONFIG_VEN_RSI_COEX)
kfree(dev->rx_cb[1].rx_buffer); //kfree(dev->rx_cb[1].rx_buffer);
skb_queue_purge(&dev->rx_q[1]);
usb_free_urb(dev->rx_cb[1].rx_urb); usb_free_urb(dev->rx_cb[1].rx_urb);
#endif #endif
kfree(dev->saved_tx_buffer); kfree(dev->saved_tx_buffer);
...@@ -621,36 +642,26 @@ static int rsi_usb_init_rx(struct rsi_hw *adapter) ...@@ -621,36 +642,26 @@ static int rsi_usb_init_rx(struct rsi_hw *adapter)
{ {
struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
struct rx_usb_ctrl_block *rx_cb; struct rx_usb_ctrl_block *rx_cb;
u8 dword_align_bytes = 0, idx; u8 idx;
for (idx = 0; idx < MAX_RX_URBS; idx++) { for (idx = 0; idx < MAX_RX_URBS; idx++) {
rx_cb = &dev->rx_cb[idx]; rx_cb = &dev->rx_cb[idx];
rx_cb->rx_buffer = kzalloc(2000 * 4, GFP_KERNEL | GFP_DMA);
if (!rx_cb->rx_buffer)
return -ENOMEM
;
rx_cb->orig_rx_buffer = rx_cb->rx_buffer;
dword_align_bytes = (unsigned long)rx_cb->rx_buffer & 0x3f;
if (dword_align_bytes)
rx_cb->rx_buffer = rx_cb->rx_buffer +
(64 - dword_align_bytes);
rx_cb->rx_urb = usb_alloc_urb(0, GFP_KERNEL); rx_cb->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!rx_cb->rx_urb) { if (!rx_cb->rx_urb) {
ven_rsi_dbg(ERR_ZONE, "Failed alloc rx urb[%d]\n", idx); ven_rsi_dbg(ERR_ZONE, "Failed alloc rx urb[%d]\n", idx);
goto err; goto err;
} }
rx_cb->rx_urb->transfer_buffer = rx_cb->rx_buffer;
rx_cb->ep_num = idx + 1; rx_cb->ep_num = idx + 1;
rx_cb->data = (void *)dev; rx_cb->data = (void *)dev;
skb_queue_head_init(&dev->rx_q[idx]);
} }
return 0; return 0;
err: err:
kfree(rx_cb[0].rx_buffer);
kfree(rx_cb[0].rx_urb); kfree(rx_cb[0].rx_urb);
kfree(rx_cb[1].rx_buffer);
kfree(rx_cb[1].rx_urb); kfree(rx_cb[1].rx_urb);
return -1; return -1;
} }
...@@ -676,6 +687,7 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter, ...@@ -676,6 +687,7 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
adapter->rsi_dev = rsi_dev; adapter->rsi_dev = rsi_dev;
rsi_dev->usbdev = interface_to_usbdev(pfunction); rsi_dev->usbdev = interface_to_usbdev(pfunction);
rsi_dev->priv = (void *)adapter;
if (rsi_find_bulk_in_and_out_endpoints(pfunction, adapter)) if (rsi_find_bulk_in_and_out_endpoints(pfunction, adapter))
return -EINVAL; return -EINVAL;
...@@ -708,11 +720,10 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter, ...@@ -708,11 +720,10 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
adapter->check_hw_queue_status = rsi_usb_check_queue_status; adapter->check_hw_queue_status = rsi_usb_check_queue_status;
adapter->determine_event_timeout = rsi_usb_event_timeout; adapter->determine_event_timeout = rsi_usb_event_timeout;
adapter->host_intf_ops = &usb_host_intf_ops; adapter->host_intf_ops = &usb_host_intf_ops;
rsi_dev->priv = (void *)adapter;
rsi_init_event(&rsi_dev->rx_thread.event); rsi_init_event(&rsi_dev->rx_thread.event);
status = rsi_create_kthread(common, &rsi_dev->rx_thread, status = rsi_create_kthread(common, &rsi_dev->rx_thread,
rsi_usb_rx_thread, "RX-Thread"); rsi_usb_rx_thread, "USB-RX-Thread");
if (status) { if (status) {
ven_rsi_dbg(ERR_ZONE, "%s: Unable to init rx thrd\n", __func__); ven_rsi_dbg(ERR_ZONE, "%s: Unable to init rx thrd\n", __func__);
goto fail_2; goto fail_2;
......
...@@ -42,7 +42,7 @@ void rsi_usb_rx_thread(struct rsi_common *common) ...@@ -42,7 +42,7 @@ void rsi_usb_rx_thread(struct rsi_common *common)
{ {
struct rsi_hw *adapter = common->priv; struct rsi_hw *adapter = common->priv;
struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
struct rx_usb_ctrl_block *rx_cb; struct sk_buff *skb;
int status, idx; int status, idx;
do { do {
...@@ -52,28 +52,18 @@ void rsi_usb_rx_thread(struct rsi_common *common) ...@@ -52,28 +52,18 @@ void rsi_usb_rx_thread(struct rsi_common *common)
break; break;
for (idx = 0; idx < MAX_RX_URBS; idx++) { for (idx = 0; idx < MAX_RX_URBS; idx++) {
rx_cb = &dev->rx_cb[idx]; while (true) {
if (!rx_cb->pend) skb = skb_dequeue(&dev->rx_q[idx]);
continue; if (!skb)
break;
mutex_lock(&common->rx_lock);
status = ven_rsi_read_pkt(common, rx_cb->rx_buffer, 0); status = ven_rsi_read_pkt(common, skb->data, 0);
if (status) { if (status) {
ven_rsi_dbg(ERR_ZONE, "%s: Failed To read data", ven_rsi_dbg(ERR_ZONE, "%s: Failed To read data",
__func__); __func__);
mutex_unlock(&common->rx_lock); }
break; dev_kfree_skb(skb);
}
rx_cb->pend = 0;
mutex_unlock(&common->rx_lock);
if (adapter->rx_urb_submit(adapter, rx_cb->ep_num)) {
ven_rsi_dbg(ERR_ZONE,
"%s: Failed in urb submission", __func__);
break;
} }
/* Update TX buffer status */
//rsi_usb_check_queue_status(adapter, 0);
} }
rsi_reset_event(&dev->rx_thread.event); rsi_reset_event(&dev->rx_thread.event);
} while (1); } while (1);
......
...@@ -112,4 +112,7 @@ void init_sdio_intr_status_poll_thread(struct rsi_common *common); ...@@ -112,4 +112,7 @@ void init_sdio_intr_status_poll_thread(struct rsi_common *common);
#endif #endif
void rsi_roc_timeout(unsigned long data); void rsi_roc_timeout(unsigned long data);
struct ieee80211_vif *rsi_get_vif(struct rsi_hw *adapter, u8 *mac); struct ieee80211_vif *rsi_get_vif(struct rsi_hw *adapter, u8 *mac);
#ifdef CONFIG_VEN_RSI_WOW
int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan);
#endif
#endif #endif
...@@ -41,7 +41,7 @@ struct rsi_hw; ...@@ -41,7 +41,7 @@ struct rsi_hw;
#include "rsi_ps.h" #include "rsi_ps.h"
#define DRV_VER "RS9113.NB0.NL.GNU.LNX.1.2.RC12" #define DRV_VER "RS9113.NB0.NL.GNU.LNX.1.2"
#define ERR_ZONE BIT(0) /* Error Msgs */ #define ERR_ZONE BIT(0) /* Error Msgs */
#define INFO_ZONE BIT(1) /* Generic Debug Msgs */ #define INFO_ZONE BIT(1) /* Generic Debug Msgs */
...@@ -53,15 +53,16 @@ struct rsi_hw; ...@@ -53,15 +53,16 @@ struct rsi_hw;
#define FSM_ZONE BIT(7) /* State Machine Msgs */ #define FSM_ZONE BIT(7) /* State Machine Msgs */
#define ISR_ZONE BIT(8) /* Interrupt Msgs */ #define ISR_ZONE BIT(8) /* Interrupt Msgs */
#define FSM_CARD_NOT_READY 0 #define FSM_FW_NOT_LOADED 0
#define FSM_COMMON_DEV_PARAMS_SENT 1 #define FSM_CARD_NOT_READY 1
#define FSM_BOOT_PARAMS_SENT 2 #define FSM_COMMON_DEV_PARAMS_SENT 2
#define FSM_EEPROM_READ_MAC_ADDR 3 #define FSM_BOOT_PARAMS_SENT 3
#define FSM_EEPROM_READ_RF_TYPE 4 #define FSM_EEPROM_READ_MAC_ADDR 4
#define FSM_RESET_MAC_SENT 5 #define FSM_EEPROM_READ_RF_TYPE 5
#define FSM_RADIO_CAPS_SENT 6 #define FSM_RESET_MAC_SENT 6
#define FSM_BB_RF_PROG_SENT 7 #define FSM_RADIO_CAPS_SENT 7
#define FSM_MAC_INIT_DONE 8 #define FSM_BB_RF_PROG_SENT 8
#define FSM_MAC_INIT_DONE 9
extern u16 ven_rsi_zone_enabled; extern u16 ven_rsi_zone_enabled;
extern __printf(2, 3) void ven_rsi_dbg(u32 zone, const char *fmt, ...); extern __printf(2, 3) void ven_rsi_dbg(u32 zone, const char *fmt, ...);
...@@ -179,8 +180,8 @@ struct wmm_qinfo { ...@@ -179,8 +180,8 @@ struct wmm_qinfo {
}; };
struct transmit_q_stats { struct transmit_q_stats {
u32 total_tx_pkt_send[NUM_EDCA_QUEUES + 1]; u32 total_tx_pkt_send[NUM_EDCA_QUEUES + 2];
u32 total_tx_pkt_freed[NUM_EDCA_QUEUES + 1]; u32 total_tx_pkt_freed[NUM_EDCA_QUEUES + 2];
}; };
struct vif_priv { struct vif_priv {
...@@ -285,7 +286,6 @@ struct rsi_common { ...@@ -285,7 +286,6 @@ struct rsi_common {
/* Generic */ /* Generic */
u8 channel; u8 channel;
u8 *rx_data_pkt;
u8 *saved_rx_data_pkt; u8 *saved_rx_data_pkt;
u8 mac_id; u8 mac_id;
u8 radio_id; u8 radio_id;
......
...@@ -116,6 +116,12 @@ struct receive_info { ...@@ -116,6 +116,12 @@ struct receive_info {
u32 buf_available_counter; u32 buf_available_counter;
}; };
#define RSI_SDIO_MAX_RX_PKTS 32
struct rsi_sdio_rx_q {
u8 num_rx_pkts;
struct sk_buff_head head;
};
struct rsi_91x_sdiodev { struct rsi_91x_sdiodev {
struct sdio_func *pfunction; struct sdio_func *pfunction;
struct task_struct *sdio_irq_task; struct task_struct *sdio_irq_task;
...@@ -128,6 +134,8 @@ struct rsi_91x_sdiodev { ...@@ -128,6 +134,8 @@ struct rsi_91x_sdiodev {
u32 tx_blk_size; u32 tx_blk_size;
u8 write_fail; u8 write_fail;
u8 buff_status_updated; u8 buff_status_updated;
struct rsi_sdio_rx_q rx_q;
struct rsi_thread rx_thread;
}; };
void rsi_interrupt_handler(struct rsi_hw *adapter); void rsi_interrupt_handler(struct rsi_hw *adapter);
...@@ -157,4 +165,5 @@ void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit); ...@@ -157,4 +165,5 @@ void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit);
int rsi_sdio_determine_event_timeout(struct rsi_hw *adapter); int rsi_sdio_determine_event_timeout(struct rsi_hw *adapter);
int rsi_sdio_check_buffer_status(struct rsi_hw *adapter, u8 q_num); int rsi_sdio_check_buffer_status(struct rsi_hw *adapter, u8 q_num);
int rsi_read_intr_status_reg(struct rsi_hw *adapter); int rsi_read_intr_status_reg(struct rsi_hw *adapter);
void rsi_sdio_rx_thread(struct rsi_common *common);
#endif #endif
...@@ -54,10 +54,8 @@ ...@@ -54,10 +54,8 @@
struct rx_usb_ctrl_block { struct rx_usb_ctrl_block {
u8 *data; u8 *data;
struct urb *rx_urb; struct urb *rx_urb;
u8 *rx_buffer; struct sk_buff *rx_skb;
u8 *orig_rx_buffer;
u8 ep_num; u8 ep_num;
u8 pend;
}; };
struct receive_info { struct receive_info {
...@@ -87,6 +85,7 @@ struct rsi_91x_usbdev { ...@@ -87,6 +85,7 @@ struct rsi_91x_usbdev {
u8 bulkout_endpoint_addr[MAX_BULK_EP]; u8 bulkout_endpoint_addr[MAX_BULK_EP];
u32 tx_blk_size; u32 tx_blk_size;
u8 write_fail; u8 write_fail;
struct sk_buff_head rx_q[MAX_RX_URBS];
}; };
static inline int rsi_usb_event_timeout(struct rsi_hw *adapter) static inline int rsi_usb_event_timeout(struct rsi_hw *adapter)
...@@ -111,4 +110,5 @@ int rsi_usb_load_data_master_write(struct rsi_hw *adapter, u32 base_address, ...@@ -111,4 +110,5 @@ int rsi_usb_load_data_master_write(struct rsi_hw *adapter, u32 base_address,
u16 block_size, u16 block_size,
u8 *ta_firmware); u8 *ta_firmware);
int rsi_usb_check_queue_status(struct rsi_hw *adapter, u8 q_num); int rsi_usb_check_queue_status(struct rsi_hw *adapter, u8 q_num);
int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment