hostapd with mac80211 progress
Subsystems (2)
Johannes,
What's the current state for hostapd and mac80211? I'm using below trees. Do I need to apply additional patches from your
http://johannes.sipsolutions.net/patches/?
mac80211 from
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git;a=summary
hostapd from
http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=summary
Thanks,
-yi
Quoted 8 lines · Zhu Yi
Johannes,
What's the current state for hostapd and mac80211? I'm using below trees. Do I need to apply additional patches from your
http://johannes.sipsolutions.net/patches/?mac80211 from
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git;a=summary
I'd guess you want the wireless-testing (or at least wireless-2.6.26) version.
Signature · 2 lines
John W. Linville [email protected]
Johannes Berg
maintainerQuoted 5 lines · Zhu Yi
Johannes,
What's the current state for hostapd and mac80211? I'm using below trees. Do I need to apply additional patches from your
http://johannes.sipsolutions.net/patches/?
Yes, you need at least the one hostapd patch I still have and also the trivial AP mode enable patch. I'll rebase my patches on the current wireless-testing tree in a minute so check for patch uploads later than this email.
Quoted 2 lines
mac80211 from
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git;a=summary
As John said, you need -testing.
johannes
Quoted 5 lines · Johannes Berg
Yes, you need at least the one hostapd patch I still have and also the trivial AP mode enable patch. I'll rebase my patches on the current wireless-testing tree in a minute so check for patch uploads later than this email.
OK, I've applied all these patches. The kernel doesn't compile unless I enabled CONFIG_NETDEVICES_MULTIQUEUE && CONFIG_MAC80211_MESH and with below patch.
Thanks,
-yi
(quoted diff) +0 -0
b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 2c69e5b..b54bdf8 100644
drivers/net/wireless/iwlwifi/iwl4965-base.c +0 -0
@@ -3584,8 +3584,6 @@ static int iwl4965_tx_status_reply_tx(struct
iwl4965_priv *priv,
tx_status = &(priv->txq[txq_id].txb[idx].status); tx_status->retry_count = tx_resp->failure_frame;
- tx_status->queue_number = status & 0xff;
- tx_status->queue_length = tx_resp->failure_rts;
tx_status->control.flags &= ~IEEE80211_TXCTL_AMPDU; tx_status->flags = iwl4965_is_tx_success(status)?
IEEE80211_TX_STATUS_ACK : 0;
net/mac80211/wme.c +0 -0
@@ -28,7 +28,7 @@ const int ieee802_1d_to_ac[8] = { 2, 3, 3, 2, 1, 1, 0,
0 };
struct ieee80211_sched_data
{
- unsigned long qdisc_pool[BITS_TO_LONGS(TC_80211_MAX_QUEUES)];
+ unsigned long qdisc_pool[BITS_TO_LONGS(QD_MAX_QUEUES)];
struct tcf_proto *filter_list; struct Qdisc *queues[QD_MAX_QUEUES]; struct sk_buff_head requeued[QD_MAX_QUEUES];
net/mac80211/wme.h +1 -0
@@ -23,6 +23,7 @@#define QOS_CONTROL_TID_MASK 0x0f#define QOS_CONTROL_ACK_POLICY_SHIFT 5 +#define QOS_CONTROL_TAG1D_MASK 0x07extern const int ieee802_1d_to_ac[8 ];
Johannes Berg
maintainerQuoted 10 lines · Zhu Yi
Quoted 5 lines · Johannes Berg
Yes, you need at least the one hostapd patch I still have and also the trivial AP mode enable patch. I'll rebase my patches on the current wireless-testing tree in a minute so check for patch uploads later than this email.
OK, I've applied all these patches. The kernel doesn't compile unless I enabled
CONFIG_NETDEVICES_MULTIQUEUE&&CONFIG_MAC80211_MESHand with below patch.
yeah mesh is a bug, and multiqueue means you applied the BROKEN qos patch :) Go for all patches up to that, not including.
johannes
Johannes Berg
maintainerQuoted 10 lines · Zhu Yi
Quoted 5 lines · Johannes Berg
Yes, you need at least the one hostapd patch I still have and also the trivial AP mode enable patch. I'll rebase my patches on the current wireless-testing tree in a minute so check for patch uploads later than this email.
OK, I've applied all these patches. The kernel doesn't compile unless I enabled
CONFIG_NETDEVICES_MULTIQUEUE&&CONFIG_MAC80211_MESHand with below patch.
Ok, now that John merged more stuff you should only need the hostapd patch and the allow-ap-vlan-modes patch from my kernel series :)
johannes
Quoted 2 lines · Johannes Berg
now that John merged more stuff you should only need the hostapd patch and the allow-ap-vlan-modes patch from my kernel series :)
OK. This time is much better. Now I can at least ping my 4965 AP with below fix.
The removal of mac80211 IEEE80211_CHAN_W_SCAN flag causes channel flag incompatibility between hostapd and driver. Hostapd expects HOSTAPD_CHAN_W_SCAN (0x1) to be set for the configured channel while 0x1 means IEEE80211_CHAN_DISABLED in the new mac80211. We should make ieee80211_channel_flags and HOSTAPD_CHAN_W_xxx compatible. What do you think? I now just workaround the problem with:
hostapd/hw_features.c +0 -0
@@ -294,8 +294,7 @@ static int select_hw_mode1(struct hostapd_iface
*iface)
for (j = 0; j < iface->current_mode->num_channels; j++) {
struct hostapd_channel_data *chan =
&iface->current_mode->channels[j];
- if ((chan->flag & HOSTAPD_CHAN_W_SCAN) &&
- (chan->chan == iface->conf->channel)) {
+ if (chan->chan == iface->conf->channel) {
ok = 1;
break;
}
Johannes Berg
maintainerQuoted 28 lines · Zhu Yi
Quoted 2 lines · Johannes Berg
now that John merged more stuff you should only need the hostapd patch and the allow-ap-vlan-modes patch from my kernel series :)
OK. This time is much better. Now I can at least ping my 4965 AP with below fix.
The removal of mac80211
IEEE80211_CHAN_W_SCANflag causes channel flag incompatibility between hostapd and driver. Hostapd expectsHOSTAPD_CHAN_W_SCAN(0x1) to be set for the configured channel while0x1meansIEEE80211_CHAN_DISABLEDin the new mac80211. We should makeieee80211_channel_flagsandHOSTAPD_CHAN_W_xxxcompatible. What do you think? I now just workaround the problem with:hostapd/hw_features.c +1
-2@@ -294,8 +294,7 @@ static int select_hw_mode1(struct hostapd_iface *iface)for (j =0 ; j < iface->current_mode->num_channels; j++) {struct hostapd_channel_data *chan = &iface->current_mode->channels[j]; -if ((chan->flag &HOSTAPD_CHAN_W_SCAN ) && - (chan->chan == iface->conf->channel)) { +if (chan->chan == iface->conf->channel) { ok =1 ;break ;
Quoted 1 line
}
That's rather odd. ieee80211_channel_flags and HOSTAPD_CHAN_W_xx need not be compatible because in driver_nl80211.c, phy_info_handler(), they're translated into each other. What exactly is your setup?
johannes
Quoted 3 lines · Johannes Berg
That's rather odd.
ieee80211_channel_flagsandHOSTAPD_CHAN_W_xxneed not be compatible because indriver_nl80211.c,phy_info_handler(), they're translated into each other. What exactly is your setup?
Well, it (HOSTAPD_CHAN_W_SCAN) was removed somewhere after driver_nl80211.c set it. I think it's a hostapd bug. Please take a look at the hostapd_get_hw_features() function:
if ((feature->mode == HOSTAPD_MODE_IEEE80211G ||
feature->mode == HOSTAPD_MODE_IEEE80211B) &&
feature->channels[j].chan >= 1 &&
feature->channels[j].chan <= 11) {
power_level = 20;
feature->channels[j].flag |=
HOSTAPD_CHAN_W_SCAN;
} else
feature->channels[j].flag &=
~HOSTAPD_CHAN_W_SCAN;Apparently, A channels all have this flag removed. What does this flag stand for? I assume it stands for passive scan, right?
Thanks,
-yi
Johannes Berg
maintainerQuoted 18 lines
Well, it (
HOSTAPD_CHAN_W_SCAN) was removed somewhere afterdriver_nl80211.cset it. I think it's a hostapd bug. Please take a look at thehostapd_get_hw_features()function:if ((
feature->mode==HOSTAPD_MODE_IEEE80211G||feature->mode == HOSTAPD_MODE_IEEE80211B) && feature->channels[j].chan >= 1 && feature->channels[j].chan <= 11) { power_level = 20; feature->channels[j].flag |= HOSTAPD_CHAN_W_SCAN; } else feature->channels[j].flag &= ~HOSTAPD_CHAN_W_SCAN;
Quoted 2 lines
Apparently, A channels all have this flag removed. What does this flag stand for? I assume it stands for passive scan, right?
Ah, you're on 5 GHz then? Sorry, I'm not too familiar with hostapd internals yet. I don't think the flag stands for passive scan, I think it pretty much used to stand for "channel is usable at all" in the dscape stack.
johannes