Skip to contentSkip to conversation

compat-wireless-old: Fix problem with TX on amd64

PATCH In review Gao Lei 2 participants 4 messages Jul 22, 2009 – Jul 23, 2009 mac80211

lore
Share & tools
lore

Gao Lei

author
#0 lore raw

PATCH 1/1 compat-wireless-old: Fix problem with TX on amd64

On amd64, the `ieee80211_tx_info' struct takes 56 bytes, thus cannot fit into skb's control buffer.

The very first result is that nothing can be really sent out, because skb's next member `len' also gets cleared when doing:

	info = IEEE80211_SKB_CB(skb);
	memset(info, 0, sizeof(*info));

A quick fix may be removing the TX control's sta pointer, since IMHO it's rarely used for now (the only place that I found was a function assigning values to it).

It has been working well for me so far, but please let me know if there're better solutions. Thanks!

Best regards,
Gao Lei

include/net/mac80211.h +0 -1
index e3adf99..b9a5ae7 100644
@@ -331,7 +331,6 @@ struct ieee80211_tx_info {
 		struct {
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
 			unsigned long jiffies;
 			int ifindex;
 			u16 aid;
net/mac80211/tx.c +0 -6
index 7d1b32c..ee0ed32 100644
@@ -540,9 +540,6 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx)
 
 	sband = tx->local->hw.wiphy->bands[tx->channel->band];
 
-	if (tx->sta)
-		info->control.sta = &tx->sta->sta;
-
 	if (!info->control.retry_limit) {
 		if (!is_multicast_ether_addr(hdr->addr1)) {
 			int len = min_t(int, tx->skb->len + FCS_LEN,
@@ -620,9 +617,6 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx)
 			info->control.rts_cts_rate_idx = 0;
 	}
 
-	if (tx->sta)
-		info->control.sta = &tx->sta->sta;
-
 	return TX_CONTINUE;
 }
 
#1 lore raw
Quoted 13 lines · Gao Lei

On amd64, the `ieee80211_tx_info' struct takes 56 bytes, thus cannot fit into skb's control buffer.

The very first result is that nothing can be really sent out, because skb's next member `len' also gets cleared when doing:

       info = IEEE80211_SKB_CB(skb);
       memset(info, 0, sizeof(*info));

A quick fix may be removing the TX control's sta pointer, since IMHO it's rarely used for now (the only place that I found was a function assigning values to it).

Quoted 5 lines

It has been working well for me so far, but please let me know if there're better solutions. Thanks!

Best regards,
Gao Lei

Thanks, what kernel is this against BTW? Just so you know we should be able to bring down compat-wireless down to 2.6.21 and maybe even further now that we no longer are using the master netdev, which used the multiqueue support added as of 2.6.27. Last I checked compat-wireless now compiles on 2.6.25, but I never actually tried loading it as I'm on ext4. So if you are on 2.6.25 or 2.6.26 you may want to try out compat-wireless directly and see if to works. If you are on 2.6.21..2.6.24 you can try adding backport support. I've added a few files already for older kernel support based on our old compat-wireless-old effort, so only the new stuff that mac80211 makes use of should require backporting.

Luis

author
#2 lore raw
Quoted 16 lines · Luis R. Rodriguez
Quoted 2 lines · Gao Lei

On amd64, the `ieee80211_tx_info' struct takes 56 bytes, thus cannot fit into skb's control buffer.

Thanks, what kernel is this against BTW? Just so you know we should be able to bring down compat-wireless down to 2.6.21 and maybe even further now that we no longer are using the master netdev, which used the multiqueue support added as of 2.6.27. Last I checked compat-wireless now compiles on 2.6.25, but I never actually tried loading it as I'm on ext4. So if you are on 2.6.25 or 2.6.26 you may want to try out compat-wireless directly and see if to works. If you are on 2.6.21..2.6.24 you can try adding backport support. I've added a few files already for older kernel support based on our old compat-wireless-old effort, so only the new stuff that mac80211 makes use of should require backporting.

Quoted 1 line

Luis

Hi,

I am using kernel 2.6.26. Just tested compat-wireless and yes it works! Here the TX info struct takes exactly 48 bytes so it can fit well into the control buffer.

Btw, I came up with the 'iwlagn: Unknown symbol iwl4965_agn_cfg' issue though (actually also in compat-wireless-old). Strange as it seems there're already some treatments there. Will look at it later.

While it's great to see compat-wireless working for more old kernels, I wonder if compat-wireless-old is still actively maintained? Asking this because currently most of the documentations still describe it as 'compat-wireless-old for <= 2.6.26 and compat-wireless for >= 2.6.27', and I was probably not the only amd64 user reading that. :)

Best regards,
Gao Lei

#3 lore raw
Quoted 21 lines · Gao Lei
Quoted 16 lines · Luis R. Rodriguez
Quoted 2 lines · Gao Lei

On amd64, the `ieee80211_tx_info' struct takes 56 bytes, thus cannot fit into skb's control buffer.

Thanks, what kernel is this against BTW? Just so you know we should be able to bring down compat-wireless down to 2.6.21 and maybe even further now that we no longer are using the master netdev, which used the multiqueue support added as of 2.6.27. Last I checked compat-wireless now compiles on 2.6.25, but I never actually tried loading it as I'm on ext4. So if you are on 2.6.25 or 2.6.26 you may want to try out compat-wireless directly and see if to works. If you are on 2.6.21..2.6.24 you can try adding backport support. I've added a few files already for older kernel support based on our old compat-wireless-old effort, so only the new stuff that mac80211 makes use of should require backporting.

Quoted 1 line

  Luis

Hi,

Quoted 7 lines

I am using kernel 2.6.26. Just tested compat-wireless and yes it works! Here the TX info struct takes exactly 48 bytes so it can fit well into the control buffer.

Btw, I came up with the 'iwlagn: Unknown symbol iwl4965_agn_cfg' issue though (actually also in compat-wireless-old). Strange as it seems there're already some treatments there. Will look at it later.

May be a real issue. You can try wireless-testing directly and see if it happens there.

Quoted 2 lines

While it's great to see compat-wireless working for more old kernels, I wonder if compat-wireless-old is still actively maintained?

Well sure its maintained, its just deprecated now as we can backport compat-wireless. The issue we had with compat-wireless-old is lack of interest from developers to support it as no one cared for old drivers and that old kernels.

Quoted 4 lines

Asking this
because currently most of the documentations still describe it as 'compat-wireless-old for <= 2.6.26 and compat-wireless for >= 2.6.27', and I was probably not the only amd64 user reading that. :)

Well so a few things:

1) We hadn't announced compat-wireless was available for older kernels now. This was really because we had no testers.
2) you are the first to report success with 2.6.26 so that's a plus, so now you can go ahead and update the documentation (its a wiki after all) to mention this
3) If someone reports success with 2.6.25 then we bring the documentation down to 2.6.25 and so on

Luis