From: Michal Kazior <michal.kazior@tieto.com> To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior <michal.kazior@tieto.com> Subject: [PATCH 02/13] ath10k: unify txpath decision Date: Thu, 21 Jan 2016 14:46:35 +0100 [thread overview] Message-ID: <1453384006-31907-3-git-send-email-michal.kazior@tieto.com> (raw) In-Reply-To: <1453384006-31907-1-git-send-email-michal.kazior@tieto.com> Some future changes will need to determine final tx method early on. Prepare the code. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> --- drivers/net/wireless/ath/ath10k/mac.c | 58 +++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index a684718f6389..9abb52924432 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2997,6 +2997,13 @@ static void ath10k_reg_notifier(struct wiphy *wiphy, /* TX handlers */ /***************/ +enum ath10k_mac_tx_path { + ATH10K_MAC_TX_HTT, + ATH10K_MAC_TX_HTT_MGMT, + ATH10K_MAC_TX_WMI_MGMT, + ATH10K_MAC_TX_UNKNOWN, +}; + void ath10k_mac_tx_lock(struct ath10k *ar, int reason) { lockdep_assert_held(&ar->htt.tx_lock); @@ -3330,27 +3337,52 @@ unlock: return ret; } +static enum ath10k_mac_tx_path +ath10k_mac_tx_h_get_txpath(struct ath10k *ar, + struct sk_buff *skb, + enum ath10k_hw_txrx_mode txmode) +{ + switch (txmode) { + case ATH10K_HW_TXRX_RAW: + case ATH10K_HW_TXRX_NATIVE_WIFI: + case ATH10K_HW_TXRX_ETHERNET: + return ATH10K_MAC_TX_HTT; + case ATH10K_HW_TXRX_MGMT: + if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, + ar->fw_features)) + return ATH10K_MAC_TX_WMI_MGMT; + else if (ar->htt.target_version_major >= 3) + return ATH10K_MAC_TX_HTT; + else + return ATH10K_MAC_TX_HTT_MGMT; + } + + return ATH10K_MAC_TX_UNKNOWN; +} + static int ath10k_mac_tx_submit(struct ath10k *ar, enum ath10k_hw_txrx_mode txmode, struct sk_buff *skb) { struct ath10k_htt *htt = &ar->htt; - int ret = 0; + enum ath10k_mac_tx_path txpath; + int ret; - switch (txmode) { - case ATH10K_HW_TXRX_RAW: - case ATH10K_HW_TXRX_NATIVE_WIFI: - case ATH10K_HW_TXRX_ETHERNET: + txpath = ath10k_mac_tx_h_get_txpath(ar, skb, txmode); + + switch (txpath) { + case ATH10K_MAC_TX_HTT: ret = ath10k_htt_tx(htt, txmode, skb); break; - case ATH10K_HW_TXRX_MGMT: - if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, - ar->fw_features)) - ret = ath10k_mac_tx_wmi_mgmt(ar, skb); - else if (ar->htt.target_version_major >= 3) - ret = ath10k_htt_tx(htt, txmode, skb); - else - ret = ath10k_htt_mgmt_tx(htt, skb); + case ATH10K_MAC_TX_HTT_MGMT: + ret = ath10k_htt_mgmt_tx(htt, skb); + break; + case ATH10K_MAC_TX_WMI_MGMT: + ret = ath10k_mac_tx_wmi_mgmt(ar, skb); + break; + case ATH10K_MAC_TX_UNKNOWN: + WARN_ON_ONCE(1); + ret = -EINVAL; break; } -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Michal Kazior <michal.kazior@tieto.com> To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior <michal.kazior@tieto.com> Subject: [PATCH 02/13] ath10k: unify txpath decision Date: Thu, 21 Jan 2016 14:46:35 +0100 [thread overview] Message-ID: <1453384006-31907-3-git-send-email-michal.kazior@tieto.com> (raw) In-Reply-To: <1453384006-31907-1-git-send-email-michal.kazior@tieto.com> Some future changes will need to determine final tx method early on. Prepare the code. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> --- drivers/net/wireless/ath/ath10k/mac.c | 58 +++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index a684718f6389..9abb52924432 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2997,6 +2997,13 @@ static void ath10k_reg_notifier(struct wiphy *wiphy, /* TX handlers */ /***************/ +enum ath10k_mac_tx_path { + ATH10K_MAC_TX_HTT, + ATH10K_MAC_TX_HTT_MGMT, + ATH10K_MAC_TX_WMI_MGMT, + ATH10K_MAC_TX_UNKNOWN, +}; + void ath10k_mac_tx_lock(struct ath10k *ar, int reason) { lockdep_assert_held(&ar->htt.tx_lock); @@ -3330,27 +3337,52 @@ unlock: return ret; } +static enum ath10k_mac_tx_path +ath10k_mac_tx_h_get_txpath(struct ath10k *ar, + struct sk_buff *skb, + enum ath10k_hw_txrx_mode txmode) +{ + switch (txmode) { + case ATH10K_HW_TXRX_RAW: + case ATH10K_HW_TXRX_NATIVE_WIFI: + case ATH10K_HW_TXRX_ETHERNET: + return ATH10K_MAC_TX_HTT; + case ATH10K_HW_TXRX_MGMT: + if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, + ar->fw_features)) + return ATH10K_MAC_TX_WMI_MGMT; + else if (ar->htt.target_version_major >= 3) + return ATH10K_MAC_TX_HTT; + else + return ATH10K_MAC_TX_HTT_MGMT; + } + + return ATH10K_MAC_TX_UNKNOWN; +} + static int ath10k_mac_tx_submit(struct ath10k *ar, enum ath10k_hw_txrx_mode txmode, struct sk_buff *skb) { struct ath10k_htt *htt = &ar->htt; - int ret = 0; + enum ath10k_mac_tx_path txpath; + int ret; - switch (txmode) { - case ATH10K_HW_TXRX_RAW: - case ATH10K_HW_TXRX_NATIVE_WIFI: - case ATH10K_HW_TXRX_ETHERNET: + txpath = ath10k_mac_tx_h_get_txpath(ar, skb, txmode); + + switch (txpath) { + case ATH10K_MAC_TX_HTT: ret = ath10k_htt_tx(htt, txmode, skb); break; - case ATH10K_HW_TXRX_MGMT: - if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, - ar->fw_features)) - ret = ath10k_mac_tx_wmi_mgmt(ar, skb); - else if (ar->htt.target_version_major >= 3) - ret = ath10k_htt_tx(htt, txmode, skb); - else - ret = ath10k_htt_mgmt_tx(htt, skb); + case ATH10K_MAC_TX_HTT_MGMT: + ret = ath10k_htt_mgmt_tx(htt, skb); + break; + case ATH10K_MAC_TX_WMI_MGMT: + ret = ath10k_mac_tx_wmi_mgmt(ar, skb); + break; + case ATH10K_MAC_TX_UNKNOWN: + WARN_ON_ONCE(1); + ret = -EINVAL; break; } -- 2.1.4 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2016-01-21 13:45 UTC|newest] Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-21 13:46 [PATCH 00/13] ath10k: implement push-pull tx model Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 01/13] ath10k: refactor tx code Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` Michal Kazior [this message] 2016-01-21 13:46 ` [PATCH 02/13] ath10k: unify txpath decision Michal Kazior 2016-01-21 13:46 ` [PATCH 03/13] ath10k: refactor tx pending management Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 04/13] ath10k: maintain peer_id for each sta and vif Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 05/13] ath10k: add fast peer_map lookup Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 06/13] ath10k: add new htt message generation/parsing logic Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 07/13] ath10k: implement wake_tx_queue Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 08/13] ath10k: implement updating shared htt txq state Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 09/13] ath10k: add txq placeholder Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 10/13] ath10k: implement flushing of pending frames in txqs Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-03-04 9:17 ` Valo, Kalle 2016-03-04 9:17 ` Valo, Kalle 2016-03-04 9:52 ` Michal Kazior 2016-03-04 9:52 ` Michal Kazior 2016-03-04 15:37 ` Valo, Kalle 2016-03-04 15:37 ` Valo, Kalle 2016-01-21 13:46 ` [PATCH 11/13] ath10k: store txq in skb_cb Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 12/13] ath10k: keep track of queue depth per txq Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 13:46 ` [PATCH 13/13] ath10k: implement push-pull tx Michal Kazior 2016-01-21 13:46 ` Michal Kazior 2016-01-21 17:40 ` Peter Oh 2016-01-21 17:40 ` Peter Oh 2016-01-22 7:47 ` Michal Kazior 2016-01-22 7:47 ` Michal Kazior 2016-01-26 10:28 ` Michal Kazior 2016-01-26 10:28 ` Michal Kazior 2016-01-26 19:03 ` Peter Oh 2016-01-26 19:03 ` Peter Oh 2016-01-28 8:36 ` Kalle Valo 2016-01-28 8:36 ` Kalle Valo 2016-01-22 0:43 ` [PATCH 00/13] ath10k: implement push-pull tx model Ben Greear 2016-01-22 0:43 ` Ben Greear 2016-03-01 10:32 ` [PATCH v2 00/11] " Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 01/11] ath10k: refactor tx code Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 02/11] ath10k: unify txpath decision Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 03/11] ath10k: refactor tx pending management Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 04/11] ath10k: maintain peer_id for each sta and vif Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 05/11] ath10k: add fast peer_map lookup Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 06/11] ath10k: add new htt message generation/parsing logic Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 07/11] ath10k: implement wake_tx_queue Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-06 14:27 ` Valo, Kalle 2016-03-06 14:27 ` Valo, Kalle 2016-03-07 6:04 ` Michal Kazior 2016-03-07 6:04 ` Michal Kazior 2016-03-07 9:36 ` Valo, Kalle 2016-03-07 9:36 ` Valo, Kalle 2016-03-01 10:32 ` [PATCH v2 08/11] ath10k: implement updating shared htt txq state Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 09/11] ath10k: store txq in skb_cb Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 10/11] ath10k: keep track of queue depth per txq Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-01 10:32 ` [PATCH v2 11/11] ath10k: implement push-pull tx Michal Kazior 2016-03-01 10:32 ` Michal Kazior 2016-03-06 14:18 ` [PATCH v2 00/11] ath10k: implement push-pull tx model Valo, Kalle 2016-03-06 14:18 ` Valo, Kalle 2016-03-07 6:13 ` Michal Kazior 2016-03-07 6:13 ` Michal Kazior 2016-03-07 9:48 ` Valo, Kalle 2016-03-07 9:48 ` Valo, Kalle
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1453384006-31907-3-git-send-email-michal.kazior@tieto.com \ --to=michal.kazior@tieto.com \ --cc=ath10k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.