linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] iwl4965: report A-MPDU status
@ 2013-01-18 22:47 Christian Lamparter
  2013-01-28 10:08 ` Stanislaw Gruszka
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Lamparter @ 2013-01-18 22:47 UTC (permalink / raw)
  To: linux-wireless; +Cc: sgruszka, John Linville

This patch is based on "iwlwifi: report A-MPDU status".
(12bf6f45d1703858)

Since the firmware will give us an A-MPDU bit and
only a single PHY information packet for all the
subframes in an A-MPDU, we can easily report the
minimal A-MPDU information for radiotap.

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
 drivers/net/wireless/iwlegacy/4965-mac.c |   11 +++++++++++
 drivers/net/wireless/iwlegacy/commands.h |    1 +
 drivers/net/wireless/iwlegacy/common.h   |    1 +
 3 files changed, 13 insertions(+)

diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index f1dc040..2afc548 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -725,6 +725,16 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
 	if (rate_n_flags & RATE_MCS_SGI_MSK)
 		rx_status.flag |= RX_FLAG_SHORT_GI;
 
+	if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) {
+		/* We know which subframes of an A-MPDU belong
+		 * together since we get a single PHY response
+		 * from the firmware for all of them.
+		 */
+
+		rx_status.flag |= RX_FLAG_AMPDU_DETAILS;
+		rx_status.ampdu_reference = il->_4965.ampdu_ref;
+	}
+
 	il4965_pass_packet_to_mac80211(il, header, len, ampdu_status, rxb,
 				       &rx_status);
 }
@@ -736,6 +746,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb)
 {
 	struct il_rx_pkt *pkt = rxb_addr(rxb);
 	il->_4965.last_phy_res_valid = true;
+	il->_4965.ampdu_ref++;
 	memcpy(&il->_4965.last_phy_res, pkt->u.raw,
 	       sizeof(struct il_rx_phy_res));
 }
diff --git a/drivers/net/wireless/iwlegacy/commands.h b/drivers/net/wireless/iwlegacy/commands.h
index 829d3b9..3b6c994 100644
--- a/drivers/net/wireless/iwlegacy/commands.h
+++ b/drivers/net/wireless/iwlegacy/commands.h
@@ -1136,6 +1136,7 @@ struct il_wep_cmd {
 #define RX_RES_PHY_FLAGS_NARROW_BAND_MSK	cpu_to_le16(1 << 3)
 #define RX_RES_PHY_FLAGS_ANTENNA_MSK		0x70
 #define RX_RES_PHY_FLAGS_ANTENNA_POS		4
+#define RX_RES_PHY_FLAGS_AGG_MSK	cpu_to_le16(1 << 7)
 
 #define RX_RES_STATUS_SEC_TYPE_MSK	(0x7 << 8)
 #define RX_RES_STATUS_SEC_TYPE_NONE	(0x0 << 8)
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 37fe553..96f2025 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1356,6 +1356,7 @@ struct il_priv {
 		struct {
 			struct il_rx_phy_res last_phy_res;
 			bool last_phy_res_valid;
+			u32 ampdu_ref;
 
 			struct completion firmware_loading_complete;
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] iwl4965: report A-MPDU status
  2013-01-18 22:47 [PATCH 2/2] iwl4965: report A-MPDU status Christian Lamparter
@ 2013-01-28 10:08 ` Stanislaw Gruszka
  2013-01-30 19:07   ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislaw Gruszka @ 2013-01-28 10:08 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, John Linville

On Fri, Jan 18, 2013 at 11:47:19PM +0100, Christian Lamparter wrote:
> This patch is based on "iwlwifi: report A-MPDU status".
> (12bf6f45d1703858)
> 
> Since the firmware will give us an A-MPDU bit and
> only a single PHY information packet for all the
> subframes in an A-MPDU, we can easily report the
> minimal A-MPDU information for radiotap.
> 
> Cc: Stanislaw Gruszka <sgruszka@redhat.com>
> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>

ACK


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] iwl4965: report A-MPDU status
  2013-01-28 10:08 ` Stanislaw Gruszka
@ 2013-01-30 19:07   ` John W. Linville
  2013-01-30 19:58     ` Christian Lamparter
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2013-01-30 19:07 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Christian Lamparter, linux-wireless

On Mon, Jan 28, 2013 at 11:08:58AM +0100, Stanislaw Gruszka wrote:
> On Fri, Jan 18, 2013 at 11:47:19PM +0100, Christian Lamparter wrote:
> > This patch is based on "iwlwifi: report A-MPDU status".
> > (12bf6f45d1703858)
> > 
> > Since the firmware will give us an A-MPDU bit and
> > only a single PHY information packet for all the
> > subframes in an A-MPDU, we can easily report the
> > minimal A-MPDU information for radiotap.
> > 
> > Cc: Stanislaw Gruszka <sgruszka@redhat.com>
> > Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> 
> ACK

OK, I'm confused...this ACK is for the patch posted on 18 Jan as
"[PATCH 2/2] iwl4965: report A-MPDU status".  But on the next day
(19 Jan) there was a patch posted as "[RFC ] iwl4965: report A-MPDU
status" that seems to be different.  What a I missing?  Is this the
right patch to merge?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] iwl4965: report A-MPDU status
  2013-01-30 19:07   ` John W. Linville
@ 2013-01-30 19:58     ` Christian Lamparter
  2013-01-30 20:13       ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Lamparter @ 2013-01-30 19:58 UTC (permalink / raw)
  To: John W. Linville; +Cc: Stanislaw Gruszka, linux-wireless

On Wednesday, January 30, 2013 08:07:04 PM John W. Linville wrote:
> On Mon, Jan 28, 2013 at 11:08:58AM +0100, Stanislaw Gruszka wrote:
> > On Fri, Jan 18, 2013 at 11:47:19PM +0100, Christian Lamparter wrote:
> > > This patch is based on "iwlwifi: report A-MPDU status".
> > > (12bf6f45d1703858)
> > > 
> > > Since the firmware will give us an A-MPDU bit and
> > > only a single PHY information packet for all the
> > > subframes in an A-MPDU, we can easily report the
> > > minimal A-MPDU information for radiotap.
> > > 
> > > Cc: Stanislaw Gruszka <sgruszka@redhat.com>
> > > Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> > 
> > ACK
> 
> OK, I'm confused...
Ah yes, maybe I can explain it.

> this ACK is for the patch posted on 18 Jan as
> "[PATCH 2/2] iwl4965: report A-MPDU status". 
> But on the next day (19 Jan) there was a patch
> posted as "[RFC ] iwl4965: report A-MPDU
> status" that seems to be different.  What a I
> missing?
Nothing I hope.

The patch "[PATCH 2/2] iwl4965: report A-MPDU status" might have
the date 2013-01-18, but it was sent on the 26th... A week after
the RFC. 

Note: The RFC is just both patches ("report A-MPDU status" and
"iwlegacy: fix antenna mask") merged into one. I did that because
I wanted to point out the issue of the *shared* bit (antenna mask
vs ampdu indicator). And thankfully, Johannes explained that... 
"the definition in question has always been the same for all
hardware. I just didn't fix it for 4965 since it was split off
to iwlegacy already."

Note2: I had to edit the patch "fix antenna mask" a second time,
that's why it has a newer date.

> Is this the right patch to merge?
Yes.

Best Regards,
	Christian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] iwl4965: report A-MPDU status
  2013-01-30 19:58     ` Christian Lamparter
@ 2013-01-30 20:13       ` John W. Linville
  0 siblings, 0 replies; 5+ messages in thread
From: John W. Linville @ 2013-01-30 20:13 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: Stanislaw Gruszka, linux-wireless

On Wed, Jan 30, 2013 at 08:58:13PM +0100, Christian Lamparter wrote:
> On Wednesday, January 30, 2013 08:07:04 PM John W. Linville wrote:
> > On Mon, Jan 28, 2013 at 11:08:58AM +0100, Stanislaw Gruszka wrote:
> > > On Fri, Jan 18, 2013 at 11:47:19PM +0100, Christian Lamparter wrote:
> > > > This patch is based on "iwlwifi: report A-MPDU status".
> > > > (12bf6f45d1703858)
> > > > 
> > > > Since the firmware will give us an A-MPDU bit and
> > > > only a single PHY information packet for all the
> > > > subframes in an A-MPDU, we can easily report the
> > > > minimal A-MPDU information for radiotap.
> > > > 
> > > > Cc: Stanislaw Gruszka <sgruszka@redhat.com>
> > > > Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> > > 
> > > ACK
> > 
> > OK, I'm confused...
> Ah yes, maybe I can explain it.
> 
> > this ACK is for the patch posted on 18 Jan as
> > "[PATCH 2/2] iwl4965: report A-MPDU status". 
> > But on the next day (19 Jan) there was a patch
> > posted as "[RFC ] iwl4965: report A-MPDU
> > status" that seems to be different.  What a I
> > missing?
> Nothing I hope.
> 
> The patch "[PATCH 2/2] iwl4965: report A-MPDU status" might have
> the date 2013-01-18, but it was sent on the 26th... A week after
> the RFC. 
> 
> Note: The RFC is just both patches ("report A-MPDU status" and
> "iwlegacy: fix antenna mask") merged into one. I did that because
> I wanted to point out the issue of the *shared* bit (antenna mask
> vs ampdu indicator). And thankfully, Johannes explained that... 
> "the definition in question has always been the same for all
> hardware. I just didn't fix it for 4965 since it was split off
> to iwlegacy already."
> 
> Note2: I had to edit the patch "fix antenna mask" a second time,
> that's why it has a newer date.
> 
> > Is this the right patch to merge?
> Yes.

Cool, thanks for the explanation!

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-30 20:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 22:47 [PATCH 2/2] iwl4965: report A-MPDU status Christian Lamparter
2013-01-28 10:08 ` Stanislaw Gruszka
2013-01-30 19:07   ` John W. Linville
2013-01-30 19:58     ` Christian Lamparter
2013-01-30 20:13       ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).