Skip to contentSkip to conversation

mac80211: add station aid into ieee80211_tx_control

PATCH In review Chr 3 participants 8 messages Apr 1, 2008 – Apr 3, 2008 mac80211

lore
Share & tools
lore

Chr

author
#0 lore raw

PATCH 1/1 mac80211: add station aid into ieee80211_tx_control

This patch is necessary for the upcoming Accesspoint patch for p54.

include/net/mac80211.h +1 -0
index 48428a6..b428472 100644
@@ -287,6 +287,7 @@ struct ieee80211_tx_control {
 	u8 iv_len;		/* length of the IV field in octets */
 	u8 queue;		/* hardware queue to use for this frame;
 				 * 0 = highest, hw->queues-1 = lowest */
+	u16 aid;		/* Station AID */
 	int type;	/* internal */
 };
 
net/mac80211/tx.c +1 -0
index 80f4343..ea3fa0f 100644
@@ -741,6 +741,7 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx)
 	}
 
 	if (tx->sta) {
+		control->aid = tx->sta->aid;
 		tx->sta->tx_packets++;
 		tx->sta->tx_fragments++;
 		tx->sta->tx_bytes += tx->skb->len;
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Chr

This patch is necessary for the upcoming Accesspoint patch for p54.

Hm. I don't like increasing the tx control structure size but I guess you really need that :)

Quoted 1 line

Please CC the appropriate maintainers (i.e. at least me for mac80211) on code changes.

Quoted 24 lines

diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 48428a6..b428472 100644

include/net/mac80211.h +1 -0
@@ -287,6 +287,7 @@ struct ieee80211_tx_control {
        u8 iv_len;              /* length of the IV field in octets */
        u8 queue;               /* hardware queue to use for this frame;
                                 * 0 = highest, hw->queues-1 = lowest */
+       u16 aid;                /* Station AID */
        int type;       /* internal */
 };
 
net/mac80211/tx.c +1 -0
index 80f4343..ea3fa0f 100644
@@ -741,6 +741,7 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx)
        }
 
        if (tx->sta) {
+               control->aid = tx->sta->aid;
                tx->sta->tx_packets++;
                tx->sta->tx_fragments++;
                tx->sta->tx_bytes += tx->skb->len;
#2 lore raw
Quoted 8 lines · Johannes Berg
Quoted 1 line · Chr

This patch is necessary for the upcoming Accesspoint patch for p54.

Hm. I don't like increasing the tx control structure size but I guess you really need that :)

Quoted 7 lines
Quoted 1 line

Please CC the appropriate maintainers (i.e. at least me for mac80211) on code changes.

Not sure why this cannot be bookeeped in the driver.
Upon association AID is delivered to driver, so every packet that will be sent to this AP has this AID?

author
#3 lore raw
Quoted 11 lines · On Wednesday 02 April 2008 22:05:46 Tomas Winkler wrote:

On Wed, Apr 2, 2008 at 12:34 PM, Johannes Berg

Quoted 8 lines · <[email protected]> wrote:
Quoted 1 line · Chr

This patch is necessary for the upcoming Accesspoint patch for p54.

Hm. I don't like increasing the tx control structure size but I guess you really need that :)

Quoted 1 line
Quoted 8 lines
Quoted 4 lines

Please CC the appropriate maintainers (i.e. at least me for mac80211) on code changes.

Not sure why this cannot be bookeeped in the driver.
Upon association AID is delivered to driver, so every packet that will be sent to this AP has this AID?

hmm? where? sta_notify just gives us the mac-address and a command. (maybe you have mixed it up with set_tim?!)

Or do I miss something obvious here?

Regards,
Chr.

#4 lore raw
Quoted 18 lines · Chr
Quoted 16 lines · On Wednesday 02 April 2008 22:05:46 Tomas Winkler wrote:

On Wed, Apr 2, 2008 at 12:34 PM, Johannes Berg

Quoted 12 lines · <[email protected]> wrote:
Quoted 1 line · Chr

This patch is necessary for the upcoming Accesspoint patch for p54.

Hm. I don't like increasing the tx control structure size but I guess you really need that :)

Quoted 1 line

Please CC the appropriate maintainers (i.e. at least me for mac80211) on code changes.

Quoted 8 lines
Quoted 3 lines

Not sure why this cannot be bookeeped in the driver.
Upon association AID is delivered to driver, so every packet that will be sent to this AP has this AID?

hmm? where? sta_notify just gives us the mac-address and a command. (maybe you have mixed it up with set_tim?!)

Or do I miss something obvious here?

This patch series introduces this. It was posted week ago so I've assumed it was already merged.

Quoted 15 lines

[PATCH 1/4] mac80211: eliminate conf_ht
[PATCH 2/4] iwlwifi: eliminate conf_ht
[PATCH 3/4] mac80211: add association capabilty and timing info into bss_conf
[PATCH 4/4] iwlwifi: Eliminate association from beacon

Regards,
Chr.

maintainer
#5 lore raw
In reply to Tomas Winkler
Quoted 10 lines
Quoted 6 lines · Chr
Quoted 1 line

This patch is necessary for the upcoming Accesspoint patch for p54.

Hm. I don't like increasing the tx control structure size but I guess you really need that :)

Not sure why this cannot be bookeeped in the driver.
Upon association AID is delivered to driver, so every packet that will be sent to this AP has this AID?

We're talking about AP mode, and afaict to do that in the driver you'd have to have a hash table from sta MAC -> AID.

johannes

#6 lore raw
Quoted 8 lines · Johannes Berg
Quoted 6 lines
Quoted 6 lines · Chr
Quoted 1 line

This patch is necessary for the upcoming Accesspoint patch for p54.

Hm. I don't like increasing the tx control structure size but I guess you really need that :)

Quoted 6 lines
Quoted 3 lines

Not sure why this cannot be bookeeped in the driver.
Upon association AID is delivered to driver, so every packet that will be sent to this AP has this AID?

We're talking about AP mode, and afaict to do that in the driver you'd have to have a hash table from sta MAC -> AID.

I see, AP mode is different story and in second thought it think we can use this to speed up TX path
also for iwliwfi, we waste significant time on searching for STA based on MAC address.
So it's ACK from me. Thanks for opening my eyes :)

Another question is if there will be more info needed for station in the driver. Currently in iwlwifi we have STA representation, this is HW requirement but some data are kept twice in iwlwifi and mac.
The question is whether STA mac80211 representation cannot be more accessible to the driver? Not sure how this can be done
without over complicated station book keeping.

Thanks
Tomas.

maintainer
#7 lore raw
Quoted 7 lines

I see, AP mode is different story and in second thought it think we can use this to speed up TX path
also for iwliwfi, we waste significant time on searching for STA based on MAC address.
So it's ACK from me. Thanks for opening my eyes :)

Quoted 6 lines

Another question is if there will be more info needed for station in the driver. Currently in iwlwifi we have STA representation, this is HW requirement but some data are kept twice in iwlwifi and mac.
The question is whether STA mac80211 representation cannot be more accessible to the driver? Not sure how this can be done
without over complicated station book keeping.

Yeah, that's a bit tough, I'm not sure how to do it.

Maybe we could have a struct ieee80211_sta_info (defined in mac80211.h) embedded into struct sta_info and pass that along everywhere sort of like we do with struct key/key_conf?

johannes