Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ath10k-ct: workaround TX rate code firmware bug #129

Merged
merged 1 commit into from Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions ath10k-5.4/core.h
Expand Up @@ -43,6 +43,7 @@
/* Antenna noise floor */
#define ATH10K_DEFAULT_NOISE_FLOOR -95

#define ATH10K_CT_TX_BEACON_INVALID_RATE_CODE 0xff
#define ATH10K_INVALID_RSSI 128

/* This used to be 128, but klukonin reports increasing this helps in at least
Expand Down
12 changes: 12 additions & 0 deletions ath10k-5.4/htt_rx.c
Expand Up @@ -2813,6 +2813,12 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
tx_done.mpdus_tried,
tx_done.mpdus_failed);

/* workaround for possibly firmware bug */
if (unlikely(tx_done.tx_rate_code == ATH10K_CT_TX_BEACON_INVALID_RATE_CODE)) {
dev_warn_once(ar->dev, "htt tx ct: fixing invalid VHT TX rate code 0xff\n");
tx_done.tx_rate_code = 0;
}

/* kfifo_put: In practice firmware shouldn't fire off per-CE
* interrupt and main interrupt (MSI/-X range case) for the same
* HTC service so it should be safe to use kfifo_put w/o lock.
Expand Down Expand Up @@ -2901,6 +2907,12 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
if (unlikely(tx_done.status != HTT_TX_COMPL_STATE_ACK))
tx_done.ack_rssi = 0;

/* workaround for possibly firmware bug */
if (unlikely(tx_done.tx_rate_code == ATH10K_CT_TX_BEACON_INVALID_RATE_CODE)) {
dev_warn_once(ar->dev, "htt tx: fixing invalid VHT TX rate code 0xff\n");
tx_done.tx_rate_code = 0;
}

ath10k_txrx_tx_unref(htt, &tx_done);
}
} else {
Expand Down
8 changes: 7 additions & 1 deletion ath10k-5.4/wmi.c
Expand Up @@ -6201,7 +6201,7 @@ static void ath10k_wmi_generic_buffer_eventid(struct ath10k *ar, struct sk_buff
static void ath10k_wmi_event_beacon_tx(struct ath10k *ar, struct sk_buff *skb)
{
struct ath10k_vif *arvif;
const struct wmi_beacon_tx_event *ev;
struct wmi_beacon_tx_event *ev;
u32 vdev_id;
u32 status;

Expand All @@ -6221,6 +6221,12 @@ static void ath10k_wmi_event_beacon_tx(struct ath10k *ar, struct sk_buff *skb)
status == 0 ? "OK" : (status == 1 ? "XRETRY" : (status == 2 ? "DROP" : "UNKNOWN")),
ev->mpdus_tried, ev->mpdus_failed, ev->tx_rate_code, ev->tx_rate_flags, ev->tsFlags);

/* workaround for possibly firmware bug */
if (unlikely(ev->tx_rate_code == ATH10K_CT_TX_BEACON_INVALID_RATE_CODE)) {
dev_warn_once(ar->dev, "wmi: fixing invalid VHT TX rate code 0xff\n");
ev->tx_rate_code = 0;
}

arvif = ath10k_get_arvif(ar, vdev_id);
if (!arvif) {
ath10k_warn(ar, "wmi-event-beacon-tx, could not find vdev for id: %u\n",
Expand Down