public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Christian Lamparter <chunkeey@googlemail.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [05/88] carl9170: fix frame drop and WARN due to minstrel_ht change
Date: Tue, 13 Aug 2013 18:15:28 +0100	[thread overview]
Message-ID: <877gfp4imn.fsf@canonical.com> (raw)
In-Reply-To: <20130813155824.466423327@goodmis.org> (Steven Rostedt's message of "Tue, 13 Aug 2013 11:56:59 -0400")

Steven Rostedt <rostedt@goodmis.org> writes:

> 3.6.11.7-rc1 stable review patch.
> If anyone has any objections, please let me know.

Not exactly an objection, but the commit text refers to:

 a0497f9 mac80211/minstrel_ht: add support for using CCK rates

which doesn't seem to exist in 3.6 kernel.  I wonder if this commit is
actually needed.

Cheers,
-- 
Luis


>
> ------------------
>
> From: Christian Lamparter <chunkeey@googlemail.com>
>
> [ Upstream commit 5f34608fa2acbfef5a06d0072a978c9943c28a2d ]
>
> With "mac80211/minstrel_ht: add support for using CCK rates"
> minstrel_ht selects legacy CCK rates as viable rates for
> outgoing frames which might be sent as part of an A-MPDU
> [IEEE80211_TX_CTL_AMPDU is set].
>
> This behavior triggered the following WARN_ON in the driver:
>> WARNING: at carl9170/tx.c:995 carl9170_op_tx+0x1dd/0x6fd
> The driver assumed that the rate control algorithm made a
> mistake and dropped the frame.
>
> This patch removes the noisy warning altogether and allows
> said A-MPDU frames with CCK sample and/or fallback rates to
> be transmitted seamlessly.
>
> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  drivers/net/wireless/ath/carl9170/tx.c |   69 +++++++++++++-------------------
>  1 file changed, 28 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
> index 6a86814..745e9dd 100644
> --- a/drivers/net/wireless/ath/carl9170/tx.c
> +++ b/drivers/net/wireless/ath/carl9170/tx.c
> @@ -387,8 +387,7 @@ static void carl9170_tx_status_process_ampdu(struct ar9170 *ar,
>  	u8 tid;
>  
>  	if (!(txinfo->flags & IEEE80211_TX_CTL_AMPDU) ||
> -	    txinfo->flags & IEEE80211_TX_CTL_INJECTED ||
> -	   (!(super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_AGGR))))
> +	    txinfo->flags & IEEE80211_TX_CTL_INJECTED)
>  		return;
>  
>  	rcu_read_lock();
> @@ -982,30 +981,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
>  
>  		SET_VAL(CARL9170_TX_SUPER_AMPDU_FACTOR,
>  			txc->s.ampdu_settings, factor);
> -
> -		for (i = 0; i < CARL9170_TX_MAX_RATES; i++) {
> -			txrate = &info->control.rates[i];
> -			if (txrate->idx >= 0) {
> -				txc->s.ri[i] =
> -					CARL9170_TX_SUPER_RI_AMPDU;
> -
> -				if (WARN_ON(!(txrate->flags &
> -					      IEEE80211_TX_RC_MCS))) {
> -					/*
> -					 * Not sure if it's even possible
> -					 * to aggregate non-ht rates with
> -					 * this HW.
> -					 */
> -					goto err_out;
> -				}
> -				continue;
> -			}
> -
> -			txrate->idx = 0;
> -			txrate->count = ar->hw->max_rate_tries;
> -		}
> -
> -		mac_tmp |= cpu_to_le16(AR9170_TX_MAC_AGGR);
>  	}
>  
>  	/*
> @@ -1013,11 +988,31 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
>  	 * taken from mac_control. For all fallback rate, the firmware
>  	 * updates the mac_control flags from the rate info field.
>  	 */
> -	for (i = 1; i < CARL9170_TX_MAX_RATES; i++) {
> +	for (i = 0; i < CARL9170_TX_MAX_RATES; i++) {
> +		__le32 phy_set;
>  		txrate = &info->control.rates[i];
>  		if (txrate->idx < 0)
>  			break;
>  
> +		phy_set = carl9170_tx_physet(ar, info, txrate);
> +		if (i == 0) {
> +			/* first rate - part of the hw's frame header */
> +			txc->f.phy_control = phy_set;
> +
> +			if (ampdu && txrate->flags & IEEE80211_TX_RC_MCS)
> +				mac_tmp |= cpu_to_le16(AR9170_TX_MAC_AGGR);
> +			if (carl9170_tx_rts_check(ar, txrate, ampdu, no_ack))
> +				mac_tmp |= cpu_to_le16(AR9170_TX_MAC_PROT_RTS);
> +			else if (carl9170_tx_cts_check(ar, txrate))
> +				mac_tmp |= cpu_to_le16(AR9170_TX_MAC_PROT_CTS);
> +
> +		} else {
> +			/* fallback rates are stored in the firmware's
> +			 * retry rate set array.
> +			 */
> +			txc->s.rr[i - 1] = phy_set;
> +		}
> +
>  		SET_VAL(CARL9170_TX_SUPER_RI_TRIES, txc->s.ri[i],
>  			txrate->count);
>  
> @@ -1028,21 +1023,13 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
>  			txc->s.ri[i] |= (AR9170_TX_MAC_PROT_CTS <<
>  				CARL9170_TX_SUPER_RI_ERP_PROT_S);
>  
> -		txc->s.rr[i - 1] = carl9170_tx_physet(ar, info, txrate);
> +		if (ampdu && (txrate->flags & IEEE80211_TX_RC_MCS))
> +			txc->s.ri[i] |= CARL9170_TX_SUPER_RI_AMPDU;
>  	}
>  
> -	txrate = &info->control.rates[0];
> -	SET_VAL(CARL9170_TX_SUPER_RI_TRIES, txc->s.ri[0], txrate->count);
> -
> -	if (carl9170_tx_rts_check(ar, txrate, ampdu, no_ack))
> -		mac_tmp |= cpu_to_le16(AR9170_TX_MAC_PROT_RTS);
> -	else if (carl9170_tx_cts_check(ar, txrate))
> -		mac_tmp |= cpu_to_le16(AR9170_TX_MAC_PROT_CTS);
> -
>  	txc->s.len = cpu_to_le16(skb->len);
>  	txc->f.length = cpu_to_le16(len + FCS_LEN);
>  	txc->f.mac_control = mac_tmp;
> -	txc->f.phy_control = carl9170_tx_physet(ar, info, txrate);
>  
>  	arinfo = (void *)info->rate_driver_data;
>  	arinfo->timeout = jiffies;
> @@ -1382,9 +1369,9 @@ static void carl9170_tx(struct ar9170 *ar)
>  }
>  
>  static bool carl9170_tx_ampdu_queue(struct ar9170 *ar,
> -	struct ieee80211_sta *sta, struct sk_buff *skb)
> +	struct ieee80211_sta *sta, struct sk_buff *skb,
> +	struct ieee80211_tx_info *txinfo)
>  {
> -	struct _carl9170_tx_superframe *super = (void *) skb->data;
>  	struct carl9170_sta_info *sta_info;
>  	struct carl9170_sta_tid *agg;
>  	struct sk_buff *iter;
> @@ -1451,7 +1438,7 @@ err_unlock:
>  
>  err_unlock_rcu:
>  	rcu_read_unlock();
> -	super->f.mac_control &= ~cpu_to_le16(AR9170_TX_MAC_AGGR);
> +	txinfo->flags &= ~IEEE80211_TX_CTL_AMPDU;
>  	carl9170_tx_status(ar, skb, false);
>  	ar->tx_dropped++;
>  	return false;
> @@ -1485,7 +1472,7 @@ void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
>  	}
>  
>  	if (info->flags & IEEE80211_TX_CTL_AMPDU) {
> -		run = carl9170_tx_ampdu_queue(ar, sta, skb);
> +		run = carl9170_tx_ampdu_queue(ar, sta, skb, info);
>  		if (run)
>  			carl9170_tx_ampdu(ar);

  reply	other threads:[~2013-08-13 17:15 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 15:56 [00/88] 3.6.11.7-rc1-stable review Steven Rostedt
2013-08-13 15:56 ` [01/88] ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310 Steven Rostedt
2013-08-13 15:56 ` [02/88] ALSA: usb-audio: work around Android accessory firmware bug Steven Rostedt
2013-08-13 15:56 ` [03/88] clk: remove notifier from list before freeing it Steven Rostedt
2013-08-13 15:56 ` [04/88] tilepro: work around module link error with gcc 4.7 Steven Rostedt
2013-08-13 15:56 ` [05/88] carl9170: fix frame drop and WARN due to minstrel_ht change Steven Rostedt
2013-08-13 17:15   ` Luis Henriques [this message]
2013-08-13 20:00     ` Steven Rostedt
2013-08-13 15:57 ` [06/88] KVM: x86: remove vcpus CPL check in host-invoked XCR set Steven Rostedt
2013-08-13 15:57 ` [07/88] drm/radeon: prevent crash in the ring space allocation Steven Rostedt
2013-08-13 15:57 ` [08/88] drm/radeon: update lockup tracking when scheduling in empty ring Steven Rostedt
2013-08-13 15:57 ` [09/88] x86: fix build error and kconfig for ia32_emulation and binfmt Steven Rostedt
2013-08-13 15:57 ` [10/88] tcp: fix tcp_md5_hash_skb_data() Steven Rostedt
2013-08-13 15:57 ` [11/88] gianfar: add missing iounmap() on error in gianfar_ptp_probe() Steven Rostedt
2013-08-13 15:57 ` [12/88] ipv6: fix possible crashes in ip6_cork_release() Steven Rostedt
2013-08-13 15:57 ` [13/88] netlabel: improve domain mapping validation Steven Rostedt
2013-08-13 15:57 ` [14/88] 8139cp: reset BQL when ring tx ring cleared Steven Rostedt
2013-08-13 15:57 ` [15/88] tcp: bug fix in proportional rate reduction Steven Rostedt
2013-08-13 15:57 ` [16/88] tcp: xps: fix reordering issues Steven Rostedt
2013-08-13 15:57 ` [17/88] ip_tunnel: fix kernel panic with icmp_dest_unreach Steven Rostedt
2013-08-13 15:57 ` [18/88] net: phy: fix a bug when verify the EEE support Steven Rostedt
2013-08-13 15:57 ` [19/88] ipv4: fix redirect handling for TCP packets Steven Rostedt
2013-08-13 15:57 ` [20/88] net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg Steven Rostedt
2013-08-13 15:57 ` [21/88] net: Unbreak compat_sys_{send,recv}msg Steven Rostedt
2013-08-13 15:57 ` [22/88] net/core/sock.c: add missing VSOCK string in af_family_*_key_strings Steven Rostedt
2013-08-13 15:57 ` [23/88] net: force a reload of first item in hlist_nulls_for_each_entry_rcu Steven Rostedt
2013-08-13 15:57 ` [24/88] ipv6: assign rt6_info to inet6_ifaddr in init_loopback Steven Rostedt
2013-08-13 15:57 ` [25/88] net: sctp: fix NULL pointer dereference in socket destruction Steven Rostedt
2013-08-13 15:57 ` [26/88] team: check return value of team_get_port_by_index_rcu() for NULL Steven Rostedt
2013-08-13 15:57 ` [27/88] team: move add to port list before port enablement Steven Rostedt
2013-08-13 15:57 ` [28/88] packet: packet_getname_spkt: make sure string is always 0-terminated Steven Rostedt
2013-08-13 15:57 ` [29/88] l2tp: Fix PPP header erasure and memory leak Steven Rostedt
2013-08-13 15:57 ` [30/88] l2tp: Fix sendmsg() return value Steven Rostedt
2013-08-13 15:57 ` [31/88] sctp: fully initialize sctp_outq in sctp_outq_init Steven Rostedt
2013-08-13 15:57 ` [32/88] net: sh_eth: fix incorrect RX length error if R8A7740 Steven Rostedt
2013-08-13 15:57 ` [33/88] Input: cyttsp - fix memcpy size param Steven Rostedt
2013-08-13 15:57 ` [34/88] USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable Steven Rostedt
2013-08-13 15:57 ` [35/88] tcm_qla2xxx: Fix residual for underrun commands that fail Steven Rostedt
2013-08-13 15:57 ` [36/88] target/iscsi: dont corrupt bh_count in iscsit_stop_time2retain_timer() Steven Rostedt
2013-08-13 15:57 ` [37/88] perf: Fix perf mmap bugs Steven Rostedt
2013-08-13 15:57 ` [38/88] perf: Fix mmap() accounting hole Steven Rostedt
2013-08-13 15:57 ` [39/88] ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page Steven Rostedt
2013-08-13 15:57 ` [40/88] ARM: 7772/1: Fix missing flush_kernel_dcache_page() for noMMU Steven Rostedt
2013-08-13 15:57 ` [41/88] Bluetooth: Fix crash in l2cap_build_cmd() with small MTU Steven Rostedt
2013-08-13 15:57 ` [42/88] hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot() Steven Rostedt
2013-08-13 15:57 ` [43/88] ath9k_htc: Handle IDLE state transition properly Steven Rostedt
2013-08-13 15:57 ` [44/88] iwlwifi: dvm: fix chain noise calibration Steven Rostedt
2013-08-13 15:57 ` [45/88] dlci: acquire rtnl_lock before calling __dev_get_by_name() Steven Rostedt
2013-08-13 15:57 ` [46/88] dlci: validate the net device in dlci_del() Steven Rostedt
2013-08-13 15:57 ` [47/88] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets Steven Rostedt
2013-08-13 15:57 ` [48/88] perf: Disable monitoring on setuid processes for regular users Steven Rostedt
2013-08-13 15:57 ` [49/88] crypto: algboss - Hold ref count on larval Steven Rostedt
2013-08-13 15:57 ` [50/88] UBIFS: prepare to fix a horrid bug Steven Rostedt
2013-08-13 15:57 ` [51/88] UBIFS: " Steven Rostedt
2013-08-13 15:57 ` [52/88] libata-acpi: add back ACPI based hotplug functionality Steven Rostedt
2013-08-13 15:57 ` [53/88] libceph: Fix NULL pointer dereference in auth client code Steven Rostedt
2013-08-13 15:57 ` [54/88] drivers/cdrom/cdrom.c: use kzalloc() for failing hardware Steven Rostedt
2013-08-13 15:57 ` [55/88] charger-manager: Ensure event is not used as format string Steven Rostedt
2013-08-13 15:57 ` [56/88] hpfs: better test for errors Steven Rostedt
2013-08-13 15:57 ` [57/88] block: do not pass disk names as format strings Steven Rostedt
2013-08-13 15:57 ` [58/88] crypto: sanitize argument for format string Steven Rostedt
2013-08-13 15:57 ` [59/88] MAINTAINERS: add stable_kernel_rules.txt to stable maintainer information Steven Rostedt
2013-08-13 15:57 ` [60/88] futex: Take hugepages into account when generating futex_key Steven Rostedt
2013-08-13 15:57 ` [61/88] nfsd4: fix decoding of compounds across page boundaries Steven Rostedt
2013-08-13 15:57 ` [62/88] sd: Fix parsing of temporary cache mode prefix Steven Rostedt
2013-08-13 15:57 ` [63/88] use sensible file nlink values if unprovided Steven Rostedt
2013-08-13 15:57 ` [64/88] rtlwifi: rtl8192cu: Fix duplicate if test Steven Rostedt
2013-08-13 15:57 ` [65/88] jbd2: move superblock checksum calculation to jbd2_write_superblock() Steven Rostedt
2013-08-13 15:58 ` [66/88] jbd2: fix theoretical race in jbd2__journal_restart Steven Rostedt
2013-08-13 15:58 ` [67/88] ext3,ext4: dont mess with dir_file->f_pos in htree_dirblock_to_tree() Steven Rostedt
2013-08-13 15:58 ` [68/88] usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed Steven Rostedt
2013-08-13 15:58 ` [69/88] xhci: check for failed dma pool allocation Steven Rostedt
2013-08-13 15:58 ` [70/88] usb: host: xhci-plat: release mem region while removing module Steven Rostedt
2013-08-13 15:58 ` [71/88] drivers: hv: switch to use mb() instead of smp_mb() Steven Rostedt
2013-08-13 15:58 ` [72/88] pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status Steven Rostedt
2013-08-13 15:58 ` [73/88] cgroup: fix umount vs cgroup_event_remove() race Steven Rostedt
2013-08-13 15:58 ` [74/88] xen/time: remove blocked time accounting from xen "clockchip" Steven Rostedt
2013-08-13 15:58 ` [75/88] genirq: Fix can_request_irq() for IRQs without an action Steven Rostedt
2013-08-13 15:58 ` [76/88] drivers/rtc/rtc-rv3029c2.c: fix disabling AIE irq Steven Rostedt
2013-08-13 15:58 ` [77/88] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set Steven Rostedt
2013-08-13 15:58 ` [78/88] ocfs2: xattr: fix inlined xattr reflink Steven Rostedt
2013-08-13 15:58 ` [79/88] nbd: correct disconnect behavior Steven Rostedt
2013-08-13 15:58 ` [80/88] PCI: Fix refcount issue in pci_create_root_bus() error recovery path Steven Rostedt
2013-08-13 15:58 ` [81/88] ahci: remove pmp link online check in FBS EH Steven Rostedt
2013-08-13 15:58 ` [82/88] timer: Fix jiffies wrap behavior of round_jiffies_common() Steven Rostedt
2013-08-13 15:58 ` [83/88] ext4: fix data offset overflow in ext4_xattr_fiemap() on 32-bit archs Steven Rostedt
2013-08-13 15:58 ` [84/88] ext4: fix overflow when counting used blocks on 32-bit architectures Steven Rostedt
2013-08-13 15:58 ` [85/88] ext4: dont allow ext4_free_blocks() to fail due to ENOMEM Steven Rostedt
2013-08-13 15:58 ` [86/88] drivers/dma/pl330.c: fix locking in pl330_free_chan_resources() Steven Rostedt
2013-08-13 15:58 ` [87/88] mm/memory-hotplug: fix lowmem count overflow when offline pages Steven Rostedt
2013-08-13 15:58 ` [88/88] Handle big endianness in NTLM (ntlmv2) authentication Steven Rostedt
2013-08-13 16:25 ` [00/88] 3.6.11.7-rc1-stable review Steven Rostedt

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=877gfp4imn.fsf@canonical.com \
    --to=luis.henriques@canonical.com \
    --cc=chunkeey@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rostedt@goodmis.org \
    --cc=stable@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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox