* [RFC] mac80211: proper short-slot handling
@ 2008-01-10 14:14 Johannes Berg
2008-01-10 15:16 ` Tomas Winkler
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Johannes Berg @ 2008-01-10 14:14 UTC (permalink / raw)
To: linux-wireless
Cc: Ron Rindjunsky, Michael Buesch, Ivo van Doorn, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
Sorry about the long CC list, I wanted all driver people to be aware.
I really need help converting drivers, I attempted a few but without
understanding the hardware it's not easy to pull off. First though, we
should discuss whether this patch is the right approach. Any comments?
If you think it is the right approach, maybe try converting your driver
and see if that results in any problems, if not, send me the patch and
I'll integrate it.
If, on the other hand, you think the current mechanism is appropriate,
we'll have to fix the bugs with it in another way.
This patch probably depends on my cfg80211 rate API patch thought it
might apply without it.
johannes
From: Johannes Berg <johannes@sipsolutions.net>
When associated, we should enable/disable short slot timing
as required. This patch adds short slot timing to the BSS
configuration and removes it from the hw configuration.
NOT-signed-off-by: Johannes Berg <johannes@sipsolutions.net>
--- everything.orig/include/net/mac80211.h 2008-01-10 00:48:42.900223796 +0100
+++ everything/include/net/mac80211.h 2008-01-10 15:07:00.369166504 +0100
@@ -172,11 +172,13 @@ struct ieee80211_low_level_stats {
* also implies a change in the AID.
* @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed
* @BSS_CHANGED_ERP_PREAMBLE: preamble changed
+ * @BSS_CHANGED_ERP_SLOT: slot timing changed
*/
enum ieee80211_bss_change {
BSS_CHANGED_ASSOC = 1<<0,
BSS_CHANGED_ERP_CTS_PROT = 1<<1,
BSS_CHANGED_ERP_PREAMBLE = 1<<2,
+ BSS_CHANGED_ERP_SLOT = 1<<3,
};
/**
@@ -189,6 +191,7 @@ enum ieee80211_bss_change {
* @aid: association ID number, valid only when @assoc is true
* @use_cts_prot: use CTS protection
* @use_short_preamble: use 802.11b short preamble
+ * @use_short_slot: use short slot time (only relevant for ERP)
*/
struct ieee80211_bss_conf {
/* association related data */
@@ -197,6 +200,7 @@ struct ieee80211_bss_conf {
/* erp related data */
bool use_cts_prot;
bool use_short_preamble;
+ bool use_short_slot;
};
/* Transmit control fields. This data structure is passed to low-level driver
@@ -364,14 +368,12 @@ struct ieee80211_tx_status {
*
* Flags to define PHY configuration options
*
- * @IEEE80211_CONF_SHORT_SLOT_TIME: use 802.11g short slot time
* @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported)
* @IEEE80211_CONF_SUPPORT_HT_MODE: use 802.11n HT capabilities (if supported)
*/
enum ieee80211_conf_flags {
- IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0),
- IEEE80211_CONF_RADIOTAP = (1<<1),
- IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2),
+ IEEE80211_CONF_RADIOTAP = (1<<0),
+ IEEE80211_CONF_SUPPORT_HT_MODE = (1<<1),
};
/**
--- everything.orig/net/mac80211/ieee80211_sta.c 2008-01-10 00:48:42.940223199 +0100
+++ everything/net/mac80211/ieee80211_sta.c 2008-01-10 15:07:00.559168023 +0100
@@ -313,8 +313,8 @@ static void ieee80211_sta_wmm_params(str
}
-static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
- u8 erp_value)
+static u32 ieee80211_handle_erp(struct ieee80211_sub_if_data *sdata,
+ u8 erp_value, bool short_slot)
{
struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
struct ieee80211_if_sta *ifsta = &sdata->u.sta;
@@ -348,6 +348,13 @@ static u32 ieee80211_handle_erp_ie(struc
changed |= BSS_CHANGED_ERP_PREAMBLE;
}
+ short_slot = !!short_slot;
+
+ if (short_slot != bss_conf->use_short_slot) {
+ bss_conf->use_short_slot = short_slot;
+ changed |= BSS_CHANGED_ERP_SLOT;
+ }
+
return changed;
}
@@ -469,9 +476,13 @@ static void ieee80211_set_associated(str
local->hw.conf.channel->center_freq,
ifsta->ssid, ifsta->ssid_len);
if (bss) {
+ bool short_slot =
+ bss->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME;
+
if (bss->has_erp_value)
- changed |= ieee80211_handle_erp_ie(
- sdata, bss->erp_value);
+ changed |= ieee80211_handle_erp(
+ sdata, bss->erp_value,
+ short_slot);
ieee80211_rx_bss_put(dev, bss);
}
@@ -2139,8 +2150,14 @@ static void ieee80211_rx_mgmt_beacon(str
ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems);
- if (elems.erp_info && elems.erp_info_len >= 1)
- changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]);
+ if (elems.erp_info && elems.erp_info_len >= 1) {
+ bool short_slot =
+ mgmt->u.beacon.capab_info &
+ cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
+
+ changed |= ieee80211_handle_erp(sdata, elems.erp_info[0],
+ short_slot);
+ }
if (elems.ht_cap_elem && elems.ht_info_elem &&
elems.wmm_param && local->ops->conf_ht &&
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-10 14:14 [RFC] mac80211: proper short-slot handling Johannes Berg
@ 2008-01-10 15:16 ` Tomas Winkler
2008-01-10 17:25 ` Ivo van Doorn
2008-01-10 19:00 ` Ivo van Doorn
2 siblings, 0 replies; 12+ messages in thread
From: Tomas Winkler @ 2008-01-10 15:16 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Ivo van Doorn,
Michael Wu, Luis R. Rodriguez, bruno randolf, Nick Kossifidis,
Yanbo Li, Stefano Brivio, Zhu Yi, Reinette Chatre, Daniel Drake
On Jan 10, 2008 4:14 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> Sorry about the long CC list, I wanted all driver people to be aware.
>
> I really need help converting drivers, I attempted a few but without
> understanding the hardware it's not easy to pull off. First though, we
> should discuss whether this patch is the right approach. Any comments?
>
> If you think it is the right approach, maybe try converting your driver
> and see if that results in any problems, if not, send me the patch and
> I'll integrate it.
>
> If, on the other hand, you think the current mechanism is appropriate,
> we'll have to fix the bugs with it in another way.
>
> This patch probably depends on my cfg80211 rate API patch thought it
> might apply without it.
>
> johannes
>
>
> From: Johannes Berg <johannes@sipsolutions.net>
>
> When associated, we should enable/disable short slot timing
> as required. This patch adds short slot timing to the BSS
> configuration and removes it from the hw configuration.
>
> NOT-signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> --- everything.orig/include/net/mac80211.h 2008-01-10 00:48:42.900223796 +0100
> +++ everything/include/net/mac80211.h 2008-01-10 15:07:00.369166504 +0100
> @@ -172,11 +172,13 @@ struct ieee80211_low_level_stats {
> * also implies a change in the AID.
> * @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed
> * @BSS_CHANGED_ERP_PREAMBLE: preamble changed
> + * @BSS_CHANGED_ERP_SLOT: slot timing changed
> */
> enum ieee80211_bss_change {
> BSS_CHANGED_ASSOC = 1<<0,
> BSS_CHANGED_ERP_CTS_PROT = 1<<1,
> BSS_CHANGED_ERP_PREAMBLE = 1<<2,
> + BSS_CHANGED_ERP_SLOT = 1<<3,
> };
>
> /**
> @@ -189,6 +191,7 @@ enum ieee80211_bss_change {
> * @aid: association ID number, valid only when @assoc is true
> * @use_cts_prot: use CTS protection
> * @use_short_preamble: use 802.11b short preamble
> + * @use_short_slot: use short slot time (only relevant for ERP)
> */
> struct ieee80211_bss_conf {
> /* association related data */
> @@ -197,6 +200,7 @@ struct ieee80211_bss_conf {
> /* erp related data */
> bool use_cts_prot;
> bool use_short_preamble;
> + bool use_short_slot;
> };
>
> /* Transmit control fields. This data structure is passed to low-level driver
> @@ -364,14 +368,12 @@ struct ieee80211_tx_status {
> *
> * Flags to define PHY configuration options
> *
> - * @IEEE80211_CONF_SHORT_SLOT_TIME: use 802.11g short slot time
> * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported)
> * @IEEE80211_CONF_SUPPORT_HT_MODE: use 802.11n HT capabilities (if supported)
> */
> enum ieee80211_conf_flags {
> - IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0),
> - IEEE80211_CONF_RADIOTAP = (1<<1),
> - IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2),
> + IEEE80211_CONF_RADIOTAP = (1<<0),
> + IEEE80211_CONF_SUPPORT_HT_MODE = (1<<1),
> };
>
> /**
> --- everything.orig/net/mac80211/ieee80211_sta.c 2008-01-10 00:48:42.940223199 +0100
> +++ everything/net/mac80211/ieee80211_sta.c 2008-01-10 15:07:00.559168023 +0100
> @@ -313,8 +313,8 @@ static void ieee80211_sta_wmm_params(str
> }
>
>
> -static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
> - u8 erp_value)
> +static u32 ieee80211_handle_erp(struct ieee80211_sub_if_data *sdata,
> + u8 erp_value, bool short_slot)
> {
> struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
> struct ieee80211_if_sta *ifsta = &sdata->u.sta;
> @@ -348,6 +348,13 @@ static u32 ieee80211_handle_erp_ie(struc
> changed |= BSS_CHANGED_ERP_PREAMBLE;
> }
>
> + short_slot = !!short_slot;
> +
> + if (short_slot != bss_conf->use_short_slot) {
> + bss_conf->use_short_slot = short_slot;
> + changed |= BSS_CHANGED_ERP_SLOT;
> + }
> +
> return changed;
> }
>
> @@ -469,9 +476,13 @@ static void ieee80211_set_associated(str
> local->hw.conf.channel->center_freq,
> ifsta->ssid, ifsta->ssid_len);
> if (bss) {
> + bool short_slot =
> + bss->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME;
> +
> if (bss->has_erp_value)
> - changed |= ieee80211_handle_erp_ie(
> - sdata, bss->erp_value);
> + changed |= ieee80211_handle_erp(
> + sdata, bss->erp_value,
> + short_slot);
> ieee80211_rx_bss_put(dev, bss);
> }
>
> @@ -2139,8 +2150,14 @@ static void ieee80211_rx_mgmt_beacon(str
>
> ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems);
>
> - if (elems.erp_info && elems.erp_info_len >= 1)
> - changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]);
> + if (elems.erp_info && elems.erp_info_len >= 1) {
> + bool short_slot =
> + mgmt->u.beacon.capab_info &
> + cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
> +
> + changed |= ieee80211_handle_erp(sdata, elems.erp_info[0],
> + short_slot);
> + }
>
> if (elems.ht_cap_elem && elems.ht_info_elem &&
> elems.wmm_param && local->ops->conf_ht &&
>
>
>
It looks fine to me. I'll supply patch for iwlwifi
Thanks
Tomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-10 14:14 [RFC] mac80211: proper short-slot handling Johannes Berg
2008-01-10 15:16 ` Tomas Winkler
@ 2008-01-10 17:25 ` Ivo van Doorn
2008-01-10 19:00 ` Ivo van Doorn
2 siblings, 0 replies; 12+ messages in thread
From: Ivo van Doorn @ 2008-01-10 17:25 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
On Thursday 10 January 2008, Johannes Berg wrote:
> Sorry about the long CC list, I wanted all driver people to be aware.
>
> I really need help converting drivers, I attempted a few but without
> understanding the hardware it's not easy to pull off. First though, we
> should discuss whether this patch is the right approach. Any comments?
>
> If you think it is the right approach, maybe try converting your driver
> and see if that results in any problems, if not, send me the patch and
> I'll integrate it.
>
> If, on the other hand, you think the current mechanism is appropriate,
> we'll have to fix the bugs with it in another way.
>
> This patch probably depends on my cfg80211 rate API patch thought it
> might apply without it.
>
> johannes
Sounds good to me, it will actually remove some ugly hacks in rt2x00. :)
I'll prepare a patch for rt2x00.
Ivo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-10 14:14 [RFC] mac80211: proper short-slot handling Johannes Berg
2008-01-10 15:16 ` Tomas Winkler
2008-01-10 17:25 ` Ivo van Doorn
@ 2008-01-10 19:00 ` Ivo van Doorn
2008-01-16 13:30 ` Johannes Berg
2 siblings, 1 reply; 12+ messages in thread
From: Ivo van Doorn @ 2008-01-10 19:00 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
Hi,
> If you think it is the right approach, maybe try converting your driver
> and see if that results in any problems, if not, send me the patch and
> I'll integrate it.
The convertion was very easy, and like I said cleaned up some hacks. :)
---
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index a05fd0e..98706de 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -308,22 +308,35 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
rt2x00pci_register_write(rt2x00dev, CSR14, reg);
}
-static int rt2400pci_config_preamble(struct rt2x00_dev *rt2x00dev,
- const int short_preamble,
- const int ack_timeout,
- const int ack_consume_time)
+static int rt2400pci_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00lib_erp *erp)
{
int preamble_mask;
u32 reg;
+ rt2x00pci_register_read(rt2x00dev, CSR11, ®);
+ rt2x00_set_field32(®, CSR11_SLOT_TIME, erp->slot_time);
+ rt2x00pci_register_write(rt2x00dev, CSR11, reg);
+
+ rt2x00pci_register_read(rt2x00dev, CSR18, ®);
+ rt2x00_set_field32(®, CSR18_SIFS, erp->sifs);
+ rt2x00_set_field32(®, CSR18_PIFS, erp->pifs);
+ rt2x00pci_register_write(rt2x00dev, CSR18, reg);
+
+ rt2x00pci_register_read(rt2x00dev, CSR19, ®);
+ rt2x00_set_field32(®, CSR19_DIFS, erp->difs);
+ rt2x00_set_field32(®, CSR19_EIFS, erp->eifs);
+ rt2x00pci_register_write(rt2x00dev, CSR19, reg);
+
/*
* When short preamble is enabled, we should set bit 0x08
*/
- preamble_mask = short_preamble << 3;
+ preamble_mask = erp->short_preamble << 3;
rt2x00pci_register_read(rt2x00dev, TXCSR1, ®);
- rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, ack_timeout);
- rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, ack_consume_time);
+ rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, erp->ack_timeout);
+ rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME,
+ erp->ack_consume_time);
rt2x00pci_register_write(rt2x00dev, TXCSR1, reg);
rt2x00pci_register_read(rt2x00dev, ARCSR2, ®);
@@ -477,20 +490,6 @@ static void rt2400pci_config_duration(struct rt2x00_dev *rt2x00dev,
{
u32 reg;
- rt2x00pci_register_read(rt2x00dev, CSR11, ®);
- rt2x00_set_field32(®, CSR11_SLOT_TIME, libconf->slot_time);
- rt2x00pci_register_write(rt2x00dev, CSR11, reg);
-
- rt2x00pci_register_read(rt2x00dev, CSR18, ®);
- rt2x00_set_field32(®, CSR18_SIFS, libconf->sifs);
- rt2x00_set_field32(®, CSR18_PIFS, libconf->pifs);
- rt2x00pci_register_write(rt2x00dev, CSR18, reg);
-
- rt2x00pci_register_read(rt2x00dev, CSR19, ®);
- rt2x00_set_field32(®, CSR19_DIFS, libconf->difs);
- rt2x00_set_field32(®, CSR19_EIFS, libconf->eifs);
- rt2x00pci_register_write(rt2x00dev, CSR19, reg);
-
rt2x00pci_register_read(rt2x00dev, TXCSR1, ®);
rt2x00_set_field32(®, TXCSR1_TSF_OFFSET, IEEE80211_HEADER);
rt2x00_set_field32(®, TXCSR1_AUTORESPONDER, 1);
@@ -517,7 +516,7 @@ static void rt2400pci_config(struct rt2x00_dev *rt2x00dev,
libconf->conf->power_level);
if (flags & CONFIG_UPDATE_ANTENNA)
rt2400pci_config_antenna(rt2x00dev, &libconf->ant);
- if (flags & (CONFIG_UPDATE_SLOT_TIME | CONFIG_UPDATE_BEACON_INT))
+ if (flags & CONFIG_UPDATE_BEACON_INT)
rt2400pci_config_duration(rt2x00dev, libconf);
}
@@ -1560,7 +1559,7 @@ static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = {
.config_mac_addr = rt2400pci_config_mac_addr,
.config_bssid = rt2400pci_config_bssid,
.config_type = rt2400pci_config_type,
- .config_preamble = rt2400pci_config_preamble,
+ .config_erp = rt2400pci_config_erp,
.config = rt2400pci_config,
};
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 6242615..99c7557 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -312,22 +312,35 @@ static void rt2500pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
rt2x00pci_register_write(rt2x00dev, CSR14, reg);
}
-static int rt2500pci_config_preamble(struct rt2x00_dev *rt2x00dev,
- const int short_preamble,
- const int ack_timeout,
- const int ack_consume_time)
+static int rt2500pci_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00lib_erp *erp)
{
int preamble_mask;
u32 reg;
+ rt2x00pci_register_read(rt2x00dev, CSR11, ®);
+ rt2x00_set_field32(®, CSR11_SLOT_TIME, erp->slot_time);
+ rt2x00pci_register_write(rt2x00dev, CSR11, reg);
+
+ rt2x00pci_register_read(rt2x00dev, CSR18, ®);
+ rt2x00_set_field32(®, CSR18_SIFS, erp->sifs);
+ rt2x00_set_field32(®, CSR18_PIFS, erp->pifs);
+ rt2x00pci_register_write(rt2x00dev, CSR18, reg);
+
+ rt2x00pci_register_read(rt2x00dev, CSR19, ®);
+ rt2x00_set_field32(®, CSR19_DIFS, erp->difs);
+ rt2x00_set_field32(®, CSR19_EIFS, erp->eifs);
+ rt2x00pci_register_write(rt2x00dev, CSR19, reg);
+
/*
* When short preamble is enabled, we should set bit 0x08
*/
- preamble_mask = short_preamble << 3;
+ preamble_mask = erp->short_preamble << 3;
rt2x00pci_register_read(rt2x00dev, TXCSR1, ®);
- rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, ack_timeout);
- rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, ack_consume_time);
+ rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, erp->ack_timeout);
+ rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME,
+ erp->ack_consume_time);
rt2x00pci_register_write(rt2x00dev, TXCSR1, reg);
rt2x00pci_register_read(rt2x00dev, ARCSR2, ®);
@@ -526,20 +539,6 @@ static void rt2500pci_config_duration(struct rt2x00_dev *rt2x00dev,
{
u32 reg;
- rt2x00pci_register_read(rt2x00dev, CSR11, ®);
- rt2x00_set_field32(®, CSR11_SLOT_TIME, libconf->slot_time);
- rt2x00pci_register_write(rt2x00dev, CSR11, reg);
-
- rt2x00pci_register_read(rt2x00dev, CSR18, ®);
- rt2x00_set_field32(®, CSR18_SIFS, libconf->sifs);
- rt2x00_set_field32(®, CSR18_PIFS, libconf->pifs);
- rt2x00pci_register_write(rt2x00dev, CSR18, reg);
-
- rt2x00pci_register_read(rt2x00dev, CSR19, ®);
- rt2x00_set_field32(®, CSR19_DIFS, libconf->difs);
- rt2x00_set_field32(®, CSR19_EIFS, libconf->eifs);
- rt2x00pci_register_write(rt2x00dev, CSR19, reg);
-
rt2x00pci_register_read(rt2x00dev, TXCSR1, ®);
rt2x00_set_field32(®, TXCSR1_TSF_OFFSET, IEEE80211_HEADER);
rt2x00_set_field32(®, TXCSR1_AUTORESPONDER, 1);
@@ -567,7 +566,7 @@ static void rt2500pci_config(struct rt2x00_dev *rt2x00dev,
libconf->conf->power_level);
if (flags & CONFIG_UPDATE_ANTENNA)
rt2500pci_config_antenna(rt2x00dev, &libconf->ant);
- if (flags & (CONFIG_UPDATE_SLOT_TIME | CONFIG_UPDATE_BEACON_INT))
+ if (flags & CONFIG_UPDATE_BEACON_INT)
rt2500pci_config_duration(rt2x00dev, libconf);
}
@@ -1875,7 +1874,7 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = {
.config_mac_addr = rt2500pci_config_mac_addr,
.config_bssid = rt2500pci_config_bssid,
.config_type = rt2500pci_config_type,
- .config_preamble = rt2500pci_config_preamble,
+ .config_erp = rt2500pci_config_erp,
.config = rt2500pci_config,
};
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 3084e24..53b7b4c 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -356,10 +356,8 @@ static void rt2500usb_config_type(struct rt2x00_dev *rt2x00dev, const int type,
rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
}
-static int rt2500usb_config_preamble(struct rt2x00_dev *rt2x00dev,
- const int short_preamble,
- const int ack_timeout,
- const int ack_consume_time)
+static int rt2500usb_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00lib_erp *erp)
{
u16 reg;
@@ -370,13 +368,15 @@ static int rt2500usb_config_preamble(struct rt2x00_dev *rt2x00dev,
if (in_atomic())
return -EAGAIN;
+ rt2500usb_register_write(rt2x00dev, MAC_CSR10, erp->slot_time);
+
rt2500usb_register_read(rt2x00dev, TXRX_CSR1, ®);
- rt2x00_set_field16(®, TXRX_CSR1_ACK_TIMEOUT, ack_timeout);
+ rt2x00_set_field16(®, TXRX_CSR1_ACK_TIMEOUT, erp->ack_timeout);
rt2500usb_register_write(rt2x00dev, TXRX_CSR1, reg);
rt2500usb_register_read(rt2x00dev, TXRX_CSR10, ®);
rt2x00_set_field16(®, TXRX_CSR10_AUTORESPOND_PREAMBLE,
- !!short_preamble);
+ !!erp->short_preamble);
rt2500usb_register_write(rt2x00dev, TXRX_CSR10, reg);
return 0;
@@ -531,8 +531,6 @@ static void rt2500usb_config_duration(struct rt2x00_dev *rt2x00dev,
{
u16 reg;
- rt2500usb_register_write(rt2x00dev, MAC_CSR10, libconf->slot_time);
-
rt2500usb_register_read(rt2x00dev, TXRX_CSR18, ®);
rt2x00_set_field16(®, TXRX_CSR18_INTERVAL,
libconf->conf->beacon_int * 4);
@@ -554,7 +552,7 @@ static void rt2500usb_config(struct rt2x00_dev *rt2x00dev,
libconf->conf->power_level);
if (flags & CONFIG_UPDATE_ANTENNA)
rt2500usb_config_antenna(rt2x00dev, &libconf->ant);
- if (flags & (CONFIG_UPDATE_SLOT_TIME | CONFIG_UPDATE_BEACON_INT))
+ if (flags & CONFIG_UPDATE_BEACON_INT)
rt2500usb_config_duration(rt2x00dev, libconf);
}
@@ -1833,7 +1831,7 @@ static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = {
.config_mac_addr = rt2500usb_config_mac_addr,
.config_bssid = rt2500usb_config_bssid,
.config_type = rt2500usb_config_type,
- .config_preamble = rt2500usb_config_preamble,
+ .config_erp = rt2500usb_config_erp,
.config = rt2500usb_config,
};
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index f9e1bef..40c88c4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -398,7 +398,7 @@ struct rt2x00_intf {
*/
unsigned int delayed_flags;
#define DELAYED_UPDATE_BEACON 0x00000001
-#define DELAYED_CONFIG_PREAMBLE 0x00000002
+#define DELAYED_CONFIG_ERP 0x00000002
};
static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif)
@@ -446,10 +446,20 @@ struct rt2x00lib_conf {
struct antenna_setup ant;
int phymode;
-
int basic_rates;
+};
+
+/*
+ * Configuration structure for erp related settings,
+ *
+ */
+struct rt2x00lib_erp {
+ int short_preamble;
int slot_time;
+ int ack_timeout;
+ int ack_consume_time;
+
short sifs;
short pifs;
short difs;
@@ -527,19 +537,16 @@ struct rt2x00lib_ops {
void (*config_mac_addr) (struct rt2x00_dev *rt2x00dev, __le32 *mac);
void (*config_bssid) (struct rt2x00_dev *rt2x00dev, __le32 *bssid);
void (*config_type) (struct rt2x00_dev *rt2x00dev, const int type,
- const int tsf_sync);
- int (*config_preamble) (struct rt2x00_dev *rt2x00dev,
- const int short_preamble,
- const int ack_timeout,
- const int ack_consume_time);
+ const int tsf_sync);
+ int (*config_erp) (struct rt2x00_dev *rt2x00dev,
+ struct rt2x00lib_erp *erp);
void (*config) (struct rt2x00_dev *rt2x00dev, const unsigned int flags,
struct rt2x00lib_conf *libconf);
#define CONFIG_UPDATE_PHYMODE ( 1 << 1 )
#define CONFIG_UPDATE_CHANNEL ( 1 << 2 )
#define CONFIG_UPDATE_TXPOWER ( 1 << 3 )
#define CONFIG_UPDATE_ANTENNA ( 1 << 4 )
-#define CONFIG_UPDATE_SLOT_TIME ( 1 << 5 )
-#define CONFIG_UPDATE_BEACON_INT ( 1 << 6 )
+#define CONFIG_UPDATE_BEACON_INT ( 1 << 5 )
#define CONFIG_UPDATE_ALL 0xffff
};
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index 19c1e07..91ee317 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -89,45 +89,51 @@ void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, const int type)
rt2x00dev->ops->lib->config_type(rt2x00dev, type, tsf_sync);
}
-void rt2x00lib_config_preamble(struct rt2x00_dev *rt2x00dev,
- struct rt2x00_intf *intf,
- const unsigned int short_preamble)
+void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00_intf *intf,
+ struct ieee80211_bss_conf *conf)
{
+ struct rt2x00lib_erp erp;
int retval;
- int ack_timeout;
- int ack_consume_time;
- ack_timeout = PLCP + get_duration(ACK_SIZE, 10);
- ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10);
+ memset(&erp, 0, sizeof(erp));
- if (rt2x00dev->hw->conf.flags & IEEE80211_CONF_SHORT_SLOT_TIME)
- ack_timeout += SHORT_DIFS;
- else
- ack_timeout += DIFS;
+ erp.short_preamble = conf->use_short_preamble;
+ erp.ack_timeout = PLCP + get_duration(ACK_SIZE, 10);
+ erp.ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10);
+ erp.sifs = SIFS;
+ erp.eifs = EIFS;
- if (short_preamble) {
- ack_timeout += SHORT_PREAMBLE;
- ack_consume_time += SHORT_PREAMBLE;
+ if (conf->use_short_slot) {
+ erp.slot_time = SHORT_SLOT_TIME;
+ erp.pifs = SHORT_PIFS;
+ erp.difs = SHORT_DIFS;
+ erp.ack_timeout += SHORT_DIFS;
} else {
- ack_timeout += PREAMBLE;
- ack_consume_time += PREAMBLE;
+ erp.slot_time = SLOT_TIME;
+ erp.pifs = PIFS;
+ erp.difs = DIFS;
+ erp.ack_timeout += DIFS;
}
- retval = rt2x00dev->ops->lib->config_preamble(rt2x00dev,
- short_preamble,
- ack_timeout,
- ack_consume_time);
+ if (conf->use_short_preamble) {
+ erp.ack_timeout += SHORT_PREAMBLE;
+ erp.ack_consume_time += SHORT_PREAMBLE;
+ } else {
+ erp.ack_timeout += PREAMBLE;
+ erp.ack_consume_time += PREAMBLE;
+ }
+
+ retval = rt2x00dev->ops->lib->config_erp(rt2x00dev, &erp);
spin_lock(&intf->lock);
if (retval) {
- intf->delayed_flags |= DELAYED_CONFIG_PREAMBLE;
+ intf->delayed_flags |= DELAYED_CONFIG_ERP;
queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work);
}
spin_unlock(&intf->lock);
-
-
}
void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
@@ -169,7 +175,6 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
struct antenna_setup *default_ant = &rt2x00dev->default_ant;
struct antenna_setup *active_ant = &rt2x00dev->link.ant.active;
int flags = 0;
- int short_slot_time;
/*
* In some situations we want to force all configurations
@@ -229,7 +234,6 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
* The following configuration options are never
* stored anywhere and will always be updated.
*/
- flags |= CONFIG_UPDATE_SLOT_TIME;
flags |= CONFIG_UPDATE_BEACON_INT;
/*
@@ -287,17 +291,6 @@ config:
libconf.ant.tx = ANTENNA_B;
}
- if (flags & CONFIG_UPDATE_SLOT_TIME) {
- short_slot_time = conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME;
-
- libconf.slot_time =
- short_slot_time ? SHORT_SLOT_TIME : SLOT_TIME;
- libconf.sifs = SIFS;
- libconf.pifs = short_slot_time ? SHORT_PIFS : PIFS;
- libconf.difs = short_slot_time ? SHORT_DIFS : DIFS;
- libconf.eifs = EIFS;
- }
-
libconf.conf = conf;
/*
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index fe98776..1c0ab08 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -512,9 +512,8 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
}
}
- if (delayed_flags & DELAYED_CONFIG_PREAMBLE)
- rt2x00lib_config_preamble(rt2x00dev, intf,
- intf->conf.use_short_preamble);
+ if (delayed_flags & DELAYED_CONFIG_ERP)
+ rt2x00lib_config_erp(rt2x00dev, intf, &intf->conf);
}
static void rt2x00lib_intf_scheduled(struct work_struct *work)
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 54191d1..8472ac5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -53,9 +53,9 @@ void rt2x00lib_stop(struct rt2x00_dev *rt2x00dev);
void rt2x00lib_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *mac);
void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid);
void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, const int type);
-void rt2x00lib_config_preamble(struct rt2x00_dev *rt2x00dev,
- struct rt2x00_intf *intf,
- const unsigned int short_preamble);
+void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00_intf *intf,
+ struct ieee80211_bss_conf *conf);
void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
enum antenna rx, enum antenna tx);
void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4d02a7f..95940d4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -354,17 +354,16 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
}
/*
- * When the preamble mode has changed, we should perform additional
- * configuration steps. For all other changes we are already done.
+ * When the preamble or slot time has changed, we should perform
+ * additional configuration steps. For all other changes we are done.
*/
- if (changes & BSS_CHANGED_ERP_PREAMBLE) {
- rt2x00lib_config_preamble(rt2x00dev, intf,
- bss_conf->use_short_preamble);
+ if (changes & BSS_CHANGED_ERP_PREAMBLE ||
+ changes & BSS_CHANGED_ERP_SLOT)
+ rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
- spin_lock(&intf->lock);
- memcpy(&intf->conf, bss_conf, sizeof(*bss_conf));
- spin_unlock(&intf->lock);
- }
+ spin_lock(&intf->lock);
+ memcpy(&intf->conf, bss_conf, sizeof(*bss_conf));
+ spin_unlock(&intf->lock);
}
EXPORT_SYMBOL_GPL(rt2x00mac_bss_info_changed);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 3e016ce..e4341a4 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -376,20 +376,28 @@ static void rt61pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
}
-static int rt61pci_config_preamble(struct rt2x00_dev *rt2x00dev,
- const int short_preamble,
- const int ack_timeout,
- const int ack_consume_time)
+static int rt61pci_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00lib_erp *erp)
{
u32 reg;
+ rt2x00pci_register_read(rt2x00dev, MAC_CSR9, ®);
+ rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, erp->slot_time);
+ rt2x00pci_register_write(rt2x00dev, MAC_CSR9, reg);
+
+ rt2x00pci_register_read(rt2x00dev, MAC_CSR8, ®);
+ rt2x00_set_field32(®, MAC_CSR8_SIFS, erp->sifs);
+ rt2x00_set_field32(®, MAC_CSR8_SIFS_AFTER_RX_OFDM, 3);
+ rt2x00_set_field32(®, MAC_CSR8_EIFS, erp->eifs);
+ rt2x00pci_register_write(rt2x00dev, MAC_CSR8, reg);
+
rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, ®);
- rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, ack_timeout);
+ rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout);
rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg);
rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, ®);
rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE,
- !!short_preamble);
+ !!erp->short_preamble);
rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg);
return 0;
@@ -696,16 +704,6 @@ static void rt61pci_config_duration(struct rt2x00_dev *rt2x00dev,
{
u32 reg;
- rt2x00pci_register_read(rt2x00dev, MAC_CSR9, ®);
- rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, libconf->slot_time);
- rt2x00pci_register_write(rt2x00dev, MAC_CSR9, reg);
-
- rt2x00pci_register_read(rt2x00dev, MAC_CSR8, ®);
- rt2x00_set_field32(®, MAC_CSR8_SIFS, libconf->sifs);
- rt2x00_set_field32(®, MAC_CSR8_SIFS_AFTER_RX_OFDM, 3);
- rt2x00_set_field32(®, MAC_CSR8_EIFS, libconf->eifs);
- rt2x00pci_register_write(rt2x00dev, MAC_CSR8, reg);
-
rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, ®);
rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER);
rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg);
@@ -733,7 +731,7 @@ static void rt61pci_config(struct rt2x00_dev *rt2x00dev,
rt61pci_config_txpower(rt2x00dev, libconf->conf->power_level);
if (flags & CONFIG_UPDATE_ANTENNA)
rt61pci_config_antenna(rt2x00dev, &libconf->ant);
- if (flags & (CONFIG_UPDATE_SLOT_TIME | CONFIG_UPDATE_BEACON_INT))
+ if (flags & CONFIG_UPDATE_BEACON_INT)
rt61pci_config_duration(rt2x00dev, libconf);
}
@@ -2472,7 +2470,7 @@ static const struct rt2x00lib_ops rt61pci_rt2x00_ops = {
.config_mac_addr = rt61pci_config_mac_addr,
.config_bssid = rt61pci_config_bssid,
.config_type = rt61pci_config_type,
- .config_preamble = rt61pci_config_preamble,
+ .config_erp = rt61pci_config_erp,
.config = rt61pci_config,
};
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index fe1506a..82dae19 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -381,10 +381,8 @@ static void rt73usb_config_type(struct rt2x00_dev *rt2x00dev, const int type,
rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg);
}
-static int rt73usb_config_preamble(struct rt2x00_dev *rt2x00dev,
- const int short_preamble,
- const int ack_timeout,
- const int ack_consume_time)
+static int rt73usb_config_erp(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00lib_erp *erp)
{
u32 reg;
@@ -395,13 +393,23 @@ static int rt73usb_config_preamble(struct rt2x00_dev *rt2x00dev,
if (in_atomic())
return -EAGAIN;
+ rt73usb_register_read(rt2x00dev, MAC_CSR9, ®);
+ rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, erp->slot_time);
+ rt73usb_register_write(rt2x00dev, MAC_CSR9, reg);
+
+ rt73usb_register_read(rt2x00dev, MAC_CSR8, ®);
+ rt2x00_set_field32(®, MAC_CSR8_SIFS, erp->sifs);
+ rt2x00_set_field32(®, MAC_CSR8_SIFS_AFTER_RX_OFDM, 3);
+ rt2x00_set_field32(®, MAC_CSR8_EIFS, erp->eifs);
+ rt73usb_register_write(rt2x00dev, MAC_CSR8, reg);
+
rt73usb_register_read(rt2x00dev, TXRX_CSR0, ®);
- rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, ack_timeout);
+ rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout);
rt73usb_register_write(rt2x00dev, TXRX_CSR0, reg);
rt73usb_register_read(rt2x00dev, TXRX_CSR4, ®);
rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE,
- !!short_preamble);
+ !!erp->short_preamble);
rt73usb_register_write(rt2x00dev, TXRX_CSR4, reg);
return 0;
@@ -639,16 +647,6 @@ static void rt73usb_config_duration(struct rt2x00_dev *rt2x00dev,
{
u32 reg;
- rt73usb_register_read(rt2x00dev, MAC_CSR9, ®);
- rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, libconf->slot_time);
- rt73usb_register_write(rt2x00dev, MAC_CSR9, reg);
-
- rt73usb_register_read(rt2x00dev, MAC_CSR8, ®);
- rt2x00_set_field32(®, MAC_CSR8_SIFS, libconf->sifs);
- rt2x00_set_field32(®, MAC_CSR8_SIFS_AFTER_RX_OFDM, 3);
- rt2x00_set_field32(®, MAC_CSR8_EIFS, libconf->eifs);
- rt73usb_register_write(rt2x00dev, MAC_CSR8, reg);
-
rt73usb_register_read(rt2x00dev, TXRX_CSR0, ®);
rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER);
rt73usb_register_write(rt2x00dev, TXRX_CSR0, reg);
@@ -676,7 +674,7 @@ static void rt73usb_config(struct rt2x00_dev *rt2x00dev,
rt73usb_config_txpower(rt2x00dev, libconf->conf->power_level);
if (flags & CONFIG_UPDATE_ANTENNA)
rt73usb_config_antenna(rt2x00dev, &libconf->ant);
- if (flags & (CONFIG_UPDATE_SLOT_TIME | CONFIG_UPDATE_BEACON_INT))
+ if (flags & CONFIG_UPDATE_BEACON_INT)
rt73usb_config_duration(rt2x00dev, libconf);
}
@@ -2054,7 +2052,7 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = {
.config_mac_addr = rt73usb_config_mac_addr,
.config_bssid = rt73usb_config_bssid,
.config_type = rt73usb_config_type,
- .config_preamble = rt73usb_config_preamble,
+ .config_erp = rt73usb_config_erp,
.config = rt73usb_config,
};
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-10 19:00 ` Ivo van Doorn
@ 2008-01-16 13:30 ` Johannes Berg
2008-01-16 16:37 ` Ivo van Doorn
0 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2008-01-16 13:30 UTC (permalink / raw)
To: Ivo van Doorn
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
Ivo,
> > If you think it is the right approach, maybe try converting your driver
> > and see if that results in any problems, if not, send me the patch and
> > I'll integrate it.
>
> The convertion was very easy, and like I said cleaned up some hacks. :)
Thanks. What is this diffed on? I tried importing it into my current
patch but it failed, do I have to wait for John to pull in your recent
pull request?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-16 13:30 ` Johannes Berg
@ 2008-01-16 16:37 ` Ivo van Doorn
2008-01-16 16:41 ` Johannes Berg
0 siblings, 1 reply; 12+ messages in thread
From: Ivo van Doorn @ 2008-01-16 16:37 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
On Wednesday 16 January 2008, Johannes Berg wrote:
> Ivo,
>
> > > If you think it is the right approach, maybe try converting your driver
> > > and see if that results in any problems, if not, send me the patch and
> > > I'll integrate it.
> >
> > The convertion was very easy, and like I said cleaned up some hacks. :)
>
> Thanks. What is this diffed on? I tried importing it into my current
> patch but it failed, do I have to wait for John to pull in your recent
> pull request?
John already merged the 2.0.14 release into the everything branch,
so no need to wait on that. The remaining patches which have been send
but not yet merged are bugfixes which won't cause a collision with the
short-slot patch.
Not sure where I diffed it against, I probably have to rebase it anyway
since I currently have a few major patches pending for the 2.1.0 release
which will drastically change the entire interface handling in rt2x00.
When do you plan to send the patch for inclusion? I can rebase the patch
and make it part of the 2.1.0 release of this weekend or release 2.1.0
and rebase the patch against that.
Ivo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-16 16:37 ` Ivo van Doorn
@ 2008-01-16 16:41 ` Johannes Berg
2008-01-16 16:51 ` Ivo van Doorn
0 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2008-01-16 16:41 UTC (permalink / raw)
To: Ivo van Doorn
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]
> John already merged the 2.0.14 release into the everything branch,
> so no need to wait on that. The remaining patches which have been send
> but not yet merged are bugfixes which won't cause a collision with the
> short-slot patch.
>
> Not sure where I diffed it against, I probably have to rebase it anyway
> since I currently have a few major patches pending for the 2.1.0 release
> which will drastically change the entire interface handling in rt2x00.
Ok.
> When do you plan to send the patch for inclusion? I can rebase the patch
> and make it part of the 2.1.0 release of this weekend or release 2.1.0
> and rebase the patch against that.
I don't know. I haven't seen anybody but You and Tomas agree with this
patch. I can try to convert the other drivers but I'm not sure when I'll
manage to do that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-16 16:41 ` Johannes Berg
@ 2008-01-16 16:51 ` Ivo van Doorn
2008-01-22 20:26 ` Tomas Winkler
0 siblings, 1 reply; 12+ messages in thread
From: Ivo van Doorn @ 2008-01-16 16:51 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Ron Rindjunsky, Michael Buesch, Michael Wu,
Luis R. Rodriguez, bruno randolf, Nick Kossifidis, Yanbo Li,
Tomas Winkler, Stefano Brivio, Zhu Yi, Reinette Chatre,
Daniel Drake
On Wednesday 16 January 2008, Johannes Berg wrote:
>
> > John already merged the 2.0.14 release into the everything branch,
> > so no need to wait on that. The remaining patches which have been send
> > but not yet merged are bugfixes which won't cause a collision with the
> > short-slot patch.
> >
> > Not sure where I diffed it against, I probably have to rebase it anyway
> > since I currently have a few major patches pending for the 2.1.0 release
> > which will drastically change the entire interface handling in rt2x00.
>
> Ok.
>
> > When do you plan to send the patch for inclusion? I can rebase the patch
> > and make it part of the 2.1.0 release of this weekend or release 2.1.0
> > and rebase the patch against that.
>
> I don't know. I haven't seen anybody but You and Tomas agree with this
> patch. I can try to convert the other drivers but I'm not sure when I'll
> manage to do that.
Ok, I'll release 2.1.0 this weekend and update the slot time patch. I'll also
keep the patch and your slottime patch in rt2x00.git so at least rt2x00 can
start using your patch. :)
Ivo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-16 16:51 ` Ivo van Doorn
@ 2008-01-22 20:26 ` Tomas Winkler
2008-01-24 8:38 ` Johannes Berg
0 siblings, 1 reply; 12+ messages in thread
From: Tomas Winkler @ 2008-01-22 20:26 UTC (permalink / raw)
To: Ivo van Doorn
Cc: Johannes Berg, linux-wireless, Ron Rindjunsky, Michael Buesch,
Michael Wu, Luis R. Rodriguez, bruno randolf, Nick Kossifidis,
Yanbo Li, Stefano Brivio, Zhu Yi, Reinette Chatre, Daniel Drake
On Jan 16, 2008 6:51 PM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> On Wednesday 16 January 2008, Johannes Berg wrote:
> >
>
> > > John already merged the 2.0.14 release into the everything branch,
> > > so no need to wait on that. The remaining patches which have been send
> > > but not yet merged are bugfixes which won't cause a collision with the
> > > short-slot patch.
> > >
> > > Not sure where I diffed it against, I probably have to rebase it anyway
> > > since I currently have a few major patches pending for the 2.1.0 release
> > > which will drastically change the entire interface handling in rt2x00.
> >
> > Ok.
> >
> > > When do you plan to send the patch for inclusion? I can rebase the patch
> > > and make it part of the 2.1.0 release of this weekend or release 2.1.0
> > > and rebase the patch against that.
> >
> > I don't know. I haven't seen anybody but You and Tomas agree with this
> > patch. I can try to convert the other drivers but I'm not sure when I'll
> > manage to do that.
>
> Ok, I'll release 2.1.0 this weekend and update the slot time patch. I'll also
> keep the patch and your slottime patch in rt2x00.git so at least rt2x00 can
> start using your patch. :)
>
> Ivo
>
Finally I got to test this but somehow I'm not getting any changed bit
set except
association one. I'm still not sure if this is problem of iwl driver or mac80211
If anybody tested please let me know
Thanks
Tomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-22 20:26 ` Tomas Winkler
@ 2008-01-24 8:38 ` Johannes Berg
2008-01-24 15:17 ` Tomas Winkler
0 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2008-01-24 8:38 UTC (permalink / raw)
To: Tomas Winkler
Cc: Ivo van Doorn, linux-wireless, Ron Rindjunsky, Michael Buesch,
Michael Wu, Luis R. Rodriguez, bruno randolf, Nick Kossifidis,
Yanbo Li, Stefano Brivio, Zhu Yi, Reinette Chatre, Daniel Drake
[-- Attachment #1: Type: text/plain, Size: 413 bytes --]
> Finally I got to test this but somehow I'm not getting any changed bit
> set except
> association one. I'm still not sure if this is problem of iwl driver or mac80211
> If anybody tested please let me know
Hmm. And you're positive the network you were on supports short slot?
But looking closely at the code does reveal a bug, short slot should be
supported even in absence of an ERP IE.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-24 8:38 ` Johannes Berg
@ 2008-01-24 15:17 ` Tomas Winkler
2008-01-24 15:37 ` Johannes Berg
0 siblings, 1 reply; 12+ messages in thread
From: Tomas Winkler @ 2008-01-24 15:17 UTC (permalink / raw)
To: Johannes Berg
Cc: Ivo van Doorn, linux-wireless, Ron Rindjunsky, Michael Buesch,
Michael Wu, Luis R. Rodriguez, bruno randolf, Nick Kossifidis,
Yanbo Li, Stefano Brivio, Zhu Yi, Reinette Chatre, Daniel Drake
On Jan 24, 2008 10:38 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
>
> > Finally I got to test this but somehow I'm not getting any changed bit
> > set except
> > association one. I'm still not sure if this is problem of iwl driver or mac80211
> > If anybody tested please let me know
>
> Hmm. And you're positive the network you were on supports short slot?
> But looking closely at the code does reveal a bug, short slot should be
> supported even in absence of an ERP IE.
>
This should be present in capability IE which is always present
> johannes
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] mac80211: proper short-slot handling
2008-01-24 15:17 ` Tomas Winkler
@ 2008-01-24 15:37 ` Johannes Berg
0 siblings, 0 replies; 12+ messages in thread
From: Johannes Berg @ 2008-01-24 15:37 UTC (permalink / raw)
To: Tomas Winkler
Cc: Ivo van Doorn, linux-wireless, Ron Rindjunsky, Michael Buesch,
Michael Wu, Luis R. Rodriguez, bruno randolf, Nick Kossifidis,
Yanbo Li, Stefano Brivio, Zhu Yi, Reinette Chatre, Daniel Drake
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
On Thu, 2008-01-24 at 17:17 +0200, Tomas Winkler wrote:
> On Jan 24, 2008 10:38 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >
> > > Finally I got to test this but somehow I'm not getting any changed bit
> > > set except
> > > association one. I'm still not sure if this is problem of iwl driver or mac80211
> > > If anybody tested please let me know
> >
> > Hmm. And you're positive the network you were on supports short slot?
> > But looking closely at the code does reveal a bug, short slot should be
> > supported even in absence of an ERP IE.
> >
> This should be present in capability IE which is always present
Exactly. It is ERP specific in the standard IIRC, but it should be
changed anyway.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-01-24 15:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10 14:14 [RFC] mac80211: proper short-slot handling Johannes Berg
2008-01-10 15:16 ` Tomas Winkler
2008-01-10 17:25 ` Ivo van Doorn
2008-01-10 19:00 ` Ivo van Doorn
2008-01-16 13:30 ` Johannes Berg
2008-01-16 16:37 ` Ivo van Doorn
2008-01-16 16:41 ` Johannes Berg
2008-01-16 16:51 ` Ivo van Doorn
2008-01-22 20:26 ` Tomas Winkler
2008-01-24 8:38 ` Johannes Berg
2008-01-24 15:17 ` Tomas Winkler
2008-01-24 15:37 ` Johannes Berg
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).