* [PATCH 13/22] wl1271: Added support to scan on 5 GHz band
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Teemu Paasikivi
In-Reply-To: <1255427279-1224-1-git-send-email-luciano.coelho@nokia.com>
From: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Added support to scan 802.11a access points on 5 GHz band when using
wl1273 chip.
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271.h | 10 +++
drivers/net/wireless/wl12xx/wl1271_cmd.c | 121 ++++++++++++++++++++++------
drivers/net/wireless/wl12xx/wl1271_cmd.h | 8 ++-
drivers/net/wireless/wl12xx/wl1271_event.c | 37 +++++++--
drivers/net/wireless/wl12xx/wl1271_init.c | 8 ++
drivers/net/wireless/wl12xx/wl1271_main.c | 11 ++-
drivers/net/wireless/wl12xx/wl1271_rx.c | 3 +
7 files changed, 160 insertions(+), 38 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index dc9957e..79a7324 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -299,6 +299,15 @@ struct wl1271_rx_mem_pool_addr {
u32 addr_extra;
};
+struct wl1271_scan {
+ u8 state;
+ u8 ssid[IW_ESSID_MAX_SIZE+1];
+ size_t ssid_len;
+ u8 active;
+ u8 high_prio;
+ u8 probe_requests;
+};
+
struct wl1271 {
struct ieee80211_hw *hw;
bool mac80211_registered;
@@ -382,6 +391,7 @@ struct wl1271 {
/* Are we currently scanning */
bool scanning;
+ struct wl1271_scan scan;
/* Our association ID */
u16 aid;
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 204e872..6d7a40c 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -509,7 +509,7 @@ out:
}
int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
- u8 active_scan, u8 high_prio, u8 num_channels,
+ u8 active_scan, u8 high_prio, u8 band,
u8 probe_requests)
{
@@ -518,12 +518,25 @@ int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
struct ieee80211_channel *channels;
int i, j, n_ch, ret;
u16 scan_options = 0;
+ u8 ieee_band;
+
+ if (band == WL1271_SCAN_BAND_2_4_GHZ)
+ ieee_band = IEEE80211_BAND_2GHZ;
+ else if (band == WL1271_SCAN_BAND_DUAL && wl1271_11a_enabled())
+ ieee_band = IEEE80211_BAND_2GHZ;
+ else if (band == WL1271_SCAN_BAND_5_GHZ && wl1271_11a_enabled())
+ ieee_band = IEEE80211_BAND_5GHZ;
+ else
+ return -EINVAL;
- if (wl->scanning)
+ if (wl->hw->wiphy->bands[ieee_band]->channels == NULL)
return -EINVAL;
- channels = wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->channels;
- n_ch = wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->n_channels;
+ channels = wl->hw->wiphy->bands[ieee_band]->channels;
+ n_ch = wl->hw->wiphy->bands[ieee_band]->n_channels;
+
+ if (wl->scanning)
+ return -EINVAL;
params = kzalloc(sizeof(*params), GFP_KERNEL);
if (!params)
@@ -540,10 +553,16 @@ int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
params->params.scan_options = scan_options;
params->params.num_probe_requests = probe_requests;
- params->params.tx_rate = cpu_to_le32(CONF_HW_BIT_RATE_2MBPS);
+ /* Let the fw autodetect suitable tx_rate for probes */
+ params->params.tx_rate = 0;
params->params.tid_trigger = 0;
params->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;
+ if (band == WL1271_SCAN_BAND_DUAL)
+ params->params.band = WL1271_SCAN_BAND_2_4_GHZ;
+ else
+ params->params.band = band;
+
for (i = 0, j = 0; i < n_ch && i < WL1271_SCAN_MAX_CHANNELS; i++) {
if (!(channels[i].flags & IEEE80211_CHAN_DISABLED)) {
params->channels[j].min_duration =
@@ -567,7 +586,7 @@ int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
memcpy(params->params.ssid, ssid, len);
}
- ret = wl1271_cmd_build_probe_req(wl, ssid, len);
+ ret = wl1271_cmd_build_probe_req(wl, ssid, len, ieee_band);
if (ret < 0) {
wl1271_error("PROBE request template failed");
goto out;
@@ -592,6 +611,19 @@ int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
wl1271_dump(DEBUG_SCAN, "SCAN: ", params, sizeof(*params));
wl->scanning = true;
+ if (wl1271_11a_enabled()) {
+ wl->scan.state = band;
+ if (band == WL1271_SCAN_BAND_DUAL) {
+ wl->scan.active = active_scan;
+ wl->scan.high_prio = high_prio;
+ wl->scan.probe_requests = probe_requests;
+ if (len && ssid) {
+ wl->scan.ssid_len = len;
+ memcpy(wl->scan.ssid, ssid, len);
+ } else
+ wl->scan.ssid_len = 0;
+ }
+ }
ret = wl1271_cmd_send(wl, CMD_SCAN, params, sizeof(*params));
if (ret < 0) {
@@ -654,30 +686,62 @@ out:
return ret;
}
-static int wl1271_build_basic_rates(char *rates)
+static int wl1271_build_basic_rates(char *rates, u8 band)
{
u8 index = 0;
- rates[index++] = IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_1MB;
- rates[index++] = IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_2MB;
- rates[index++] = IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_5MB;
- rates[index++] = IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_11MB;
+ if (band == IEEE80211_BAND_2GHZ) {
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_1MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_2MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_5MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_11MB;
+ } else if (band == IEEE80211_BAND_5GHZ) {
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_6MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_12MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_24MB;
+ } else {
+ wl1271_error("build_basic_rates invalid band: %d", band);
+ }
return index;
}
-static int wl1271_build_extended_rates(char *rates)
+static int wl1271_build_extended_rates(char *rates, u8 band)
{
u8 index = 0;
- rates[index++] = IEEE80211_OFDM_RATE_6MB;
- rates[index++] = IEEE80211_OFDM_RATE_9MB;
- rates[index++] = IEEE80211_OFDM_RATE_12MB;
- rates[index++] = IEEE80211_OFDM_RATE_18MB;
- rates[index++] = IEEE80211_OFDM_RATE_24MB;
- rates[index++] = IEEE80211_OFDM_RATE_36MB;
- rates[index++] = IEEE80211_OFDM_RATE_48MB;
- rates[index++] = IEEE80211_OFDM_RATE_54MB;
+ if (band == IEEE80211_BAND_2GHZ) {
+ rates[index++] = IEEE80211_OFDM_RATE_6MB;
+ rates[index++] = IEEE80211_OFDM_RATE_9MB;
+ rates[index++] = IEEE80211_OFDM_RATE_12MB;
+ rates[index++] = IEEE80211_OFDM_RATE_18MB;
+ rates[index++] = IEEE80211_OFDM_RATE_24MB;
+ rates[index++] = IEEE80211_OFDM_RATE_36MB;
+ rates[index++] = IEEE80211_OFDM_RATE_48MB;
+ rates[index++] = IEEE80211_OFDM_RATE_54MB;
+ } else if (band == IEEE80211_BAND_5GHZ) {
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_9MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_18MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_24MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_36MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_48MB;
+ rates[index++] =
+ IEEE80211_BASIC_RATE_MASK | IEEE80211_OFDM_RATE_54MB;
+ } else {
+ wl1271_error("build_basic_rates invalid band: %d", band);
+ }
return index;
}
@@ -720,12 +784,14 @@ int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid)
}
-int wl1271_cmd_build_probe_req(struct wl1271 *wl, u8 *ssid, size_t ssid_len)
+int wl1271_cmd_build_probe_req(struct wl1271 *wl, u8 *ssid, size_t ssid_len,
+ u8 band)
{
struct wl12xx_probe_req_template template;
struct wl12xx_ie_rates *rates;
char *ptr;
u16 size;
+ int ret;
ptr = (char *)&template;
size = sizeof(struct ieee80211_header);
@@ -747,20 +813,25 @@ int wl1271_cmd_build_probe_req(struct wl1271 *wl, u8 *ssid, size_t ssid_len)
/* Basic Rates */
rates = (struct wl12xx_ie_rates *)ptr;
rates->header.id = WLAN_EID_SUPP_RATES;
- rates->header.len = wl1271_build_basic_rates(rates->rates);
+ rates->header.len = wl1271_build_basic_rates(rates->rates, band);
size += sizeof(struct wl12xx_ie_header) + rates->header.len;
ptr += sizeof(struct wl12xx_ie_header) + rates->header.len;
/* Extended rates */
rates = (struct wl12xx_ie_rates *)ptr;
rates->header.id = WLAN_EID_EXT_SUPP_RATES;
- rates->header.len = wl1271_build_extended_rates(rates->rates);
+ rates->header.len = wl1271_build_extended_rates(rates->rates, band);
size += sizeof(struct wl12xx_ie_header) + rates->header.len;
wl1271_dump(DEBUG_SCAN, "PROBE REQ: ", &template, size);
- return wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4,
- &template, size);
+ if (band == IEEE80211_BAND_2GHZ)
+ ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4,
+ &template, size);
+ else
+ ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
+ &template, size);
+ return ret;
}
int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id)
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index 9143087..3308940 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -39,13 +39,14 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode);
int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
size_t len);
int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
- u8 active_scan, u8 high_prio, u8 num_channels,
+ u8 active_scan, u8 high_prio, u8 band,
u8 probe_requests);
int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
void *buf, size_t buf_len);
int wl1271_cmd_build_null_data(struct wl1271 *wl);
int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid);
-int wl1271_cmd_build_probe_req(struct wl1271 *wl, u8 *ssid, size_t ssid_len);
+int wl1271_cmd_build_probe_req(struct wl1271 *wl, u8 *ssid, size_t ssid_len,
+ u8 band);
int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id);
int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
u8 key_size, const u8 *key, const u8 *addr,
@@ -343,6 +344,9 @@ struct wl1271_cmd_set_keys {
#define WL1271_SCAN_OPT_PRIORITY_HIGH 4
#define WL1271_SCAN_CHAN_MIN_DURATION 30000 /* TU */
#define WL1271_SCAN_CHAN_MAX_DURATION 60000 /* TU */
+#define WL1271_SCAN_BAND_2_4_GHZ 0
+#define WL1271_SCAN_BAND_5_GHZ 1
+#define WL1271_SCAN_BAND_DUAL 2
struct basic_scan_params {
u32 rx_config_options;
diff --git a/drivers/net/wireless/wl12xx/wl1271_event.c b/drivers/net/wireless/wl12xx/wl1271_event.c
index 4189e97..e2d7758 100644
--- a/drivers/net/wireless/wl12xx/wl1271_event.c
+++ b/drivers/net/wireless/wl12xx/wl1271_event.c
@@ -31,19 +31,40 @@
static int wl1271_event_scan_complete(struct wl1271 *wl,
struct event_mailbox *mbox)
{
+ int size = sizeof(struct wl12xx_probe_req_template);
wl1271_debug(DEBUG_EVENT, "status: 0x%x",
mbox->scheduled_scan_status);
if (wl->scanning) {
- int size = sizeof(struct wl12xx_probe_req_template);
- wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL,
- size);
- mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw, false);
- mutex_lock(&wl->mutex);
- wl->scanning = false;
+ if (wl->scan.state == WL1271_SCAN_BAND_DUAL) {
+ wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4,
+ NULL, size);
+ /* 2.4 GHz band scanned, scan 5 GHz band, pretend
+ * to the wl1271_cmd_scan function that we are not
+ * scanning as it checks that.
+ */
+ wl->scanning = false;
+ wl1271_cmd_scan(wl, wl->scan.ssid, wl->scan.ssid_len,
+ wl->scan.active,
+ wl->scan.high_prio,
+ WL1271_SCAN_BAND_5_GHZ,
+ wl->scan.probe_requests);
+ } else {
+ if (wl->scan.state == WL1271_SCAN_BAND_2_4_GHZ)
+ wl1271_cmd_template_set(wl,
+ CMD_TEMPL_CFG_PROBE_REQ_2_4,
+ NULL, size);
+ else
+ wl1271_cmd_template_set(wl,
+ CMD_TEMPL_CFG_PROBE_REQ_5,
+ NULL, size);
+
+ mutex_unlock(&wl->mutex);
+ ieee80211_scan_completed(wl->hw, false);
+ mutex_lock(&wl->mutex);
+ wl->scanning = false;
+ }
}
-
return 0;
}
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index 6f21eea..417b415 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -59,6 +59,14 @@ static int wl1271_init_templates_config(struct wl1271 *wl)
if (ret < 0)
return ret;
+ if (wl1271_11a_enabled()) {
+ ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
+ NULL,
+ sizeof(struct wl12xx_probe_req_template));
+ if (ret < 0)
+ return ret;
+ }
+
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL,
sizeof(struct wl12xx_null_data_template));
if (ret < 0)
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 9b1cc8d..ae41a70 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1332,13 +1332,13 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
struct wl1271 *wl = hw->priv;
int ret;
u8 *ssid = NULL;
- size_t ssid_len = 0;
+ size_t len = 0;
wl1271_debug(DEBUG_MAC80211, "mac80211 hw scan");
if (req->n_ssids) {
ssid = req->ssids[0].ssid;
- ssid_len = req->ssids[0].ssid_len;
+ len = req->ssids[0].ssid_len;
}
mutex_lock(&wl->mutex);
@@ -1347,7 +1347,12 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
if (ret < 0)
goto out;
- ret = wl1271_cmd_scan(hw->priv, ssid, ssid_len, 1, 0, 13, 3);
+ if (wl1271_11a_enabled())
+ ret = wl1271_cmd_scan(hw->priv, ssid, len, 1, 0,
+ WL1271_SCAN_BAND_DUAL, 3);
+ else
+ ret = wl1271_cmd_scan(hw->priv, ssid, len, 1, 0,
+ WL1271_SCAN_BAND_2_4_GHZ, 3);
wl1271_ps_elp_sleep(wl);
diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c
index 7979b69..66b83e9 100644
--- a/drivers/net/wireless/wl12xx/wl1271_rx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_rx.c
@@ -79,6 +79,9 @@ static void wl1271_rx_status(struct wl1271 *wl,
if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG)
status->band = IEEE80211_BAND_2GHZ;
+ else if ((desc->flags & WL1271_RX_DESC_BAND_MASK) ==
+ WL1271_RX_DESC_BAND_A)
+ status->band = IEEE80211_BAND_5GHZ;
else
wl1271_warning("unsupported band 0x%x",
desc->flags & WL1271_RX_DESC_BAND_MASK);
--
1.5.6.5
^ permalink raw reply related
* [PATCH 11/22] wl1271: Added 5 GHz parameters for wl1273
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Teemu Paasikivi
In-Reply-To: <1255427279-1224-1-git-send-email-luciano.coelho@nokia.com>
From: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Added data rate and frequency tables for 5 GHz band channels, 5
GHz radio configration parameters and configuration option to enable
802.11 support.
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271.h | 14 +++
drivers/net/wireless/wl12xx/wl1271_conf.h | 7 ++-
drivers/net/wireless/wl12xx/wl1271_main.c | 123 +++++++++++++++++++++++++----
3 files changed, 127 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index e0ebb1f..dc9957e 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -113,6 +113,11 @@ enum {
#define WL1271_NVS_NAME "wl1271-nvs.bin"
/*
+ * Enable/disable 802.11a support for WL1273
+ */
+#undef WL1271_80211A_ENABLED
+
+/*
* FIXME: for the wl1271, a busy word count of 1 here will result in a more
* optimal SPI interface. There is some SPI bug however, causing RXS time outs
* with this mode occasionally on boot, so lets have three for now. A value of
@@ -442,4 +447,13 @@ int wl1271_plt_stop(struct wl1271 *wl);
/* WL1271 needs a 200ms sleep after power on */
#define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */
+static inline bool wl1271_11a_enabled(void)
+{
+#ifdef WL1271_80211A_ENABLED
+ return true;
+#else
+ return false;
+#endif
+}
+
#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index 00ffa66..061d475 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -746,6 +746,11 @@ enum {
CONF_REF_CLK_52_E
};
+enum single_dual_band_enum {
+ CONF_SINGLE_BAND,
+ CONF_DUAL_BAND
+};
+
struct conf_general_parms {
/*
* RF Reference Clock type / speed
@@ -778,7 +783,7 @@ struct conf_general_parms {
/*
* Flag defining whether used as single or dual-band.
*
- * Range: Unknown
+ * Range: CONF_SINGLE_BAND, CONF_DUAL_BAND
*/
u8 single_dual_band;
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 3d2e999..9b1cc8d 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -260,13 +260,12 @@ static struct conf_drv_settings default_conf = {
.settling_time = 5,
.clk_valid_on_wakeup = 0,
.dc2dcmode = 0,
- .single_dual_band = 0,
+ .single_dual_band = CONF_SINGLE_BAND,
.tx_bip_fem_autodetect = 0,
.tx_bip_fem_manufacturer = 1,
.settings = 1,
},
.radioparam = {
- /* FIXME: 5GHz values unset! */
.rx_trace_loss = 10,
.tx_trace_loss = 10,
.rx_rssi_and_proc_compens = {
@@ -299,25 +298,29 @@ static struct conf_drv_settings default_conf = {
.tx_ibias = {
0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x27 },
.rx_fem_insertion_loss = 0x14,
- .tx_ref_pd_voltage_5 = { 0, 0, 0, 0, 0, 0, 0 },
- .tx_ref_power_5 = { 0, 0, 0, 0, 0, 0, 0 },
- .tx_offset_db_5 = {0, 0, 0, 0, 0, 0, 0 },
- .tx_rate_limits_normal_5 = {
+ .tx_ref_pd_voltage_5 = {
+ 0x0190, 0x01a4, 0x01c3, 0x01d8,
+ 0x020a, 0x021c },
+ .tx_ref_power_5 = {
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 },
+ .tx_offset_db_5 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .tx_rate_limits_normal_5 = {
+ 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
.tx_rate_limits_degraded_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
.tx_channel_limits_ofdm_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00},
+ 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50 },
.tx_pdv_rate_offsets_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ 0x01, 0x02, 0x02, 0x02, 0x02, 0x00 },
.tx_ibias_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .rx_fem_insertion_loss_5 = { 0, 0, 0, 0, 0, 0, 0 }
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 },
+ .rx_fem_insertion_loss_5 = {
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }
}
}
};
@@ -337,6 +340,9 @@ static void wl1271_conf_init(struct wl1271 *wl)
/* apply driver default configuration */
memcpy(&wl->conf, &default_conf, sizeof(default_conf));
+
+ if (wl1271_11a_enabled())
+ wl->conf.init.genparam.single_dual_band = CONF_DUAL_BAND;
}
@@ -1556,6 +1562,88 @@ static struct ieee80211_supported_band wl1271_band_2ghz = {
.n_bitrates = ARRAY_SIZE(wl1271_rates),
};
+/* 5 GHz data rates for WL1273 */
+static struct ieee80211_rate wl1271_rates_5ghz[] = {
+ { .bitrate = 60,
+ .hw_value = CONF_HW_BIT_RATE_6MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_6MBPS, },
+ { .bitrate = 90,
+ .hw_value = CONF_HW_BIT_RATE_9MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_9MBPS, },
+ { .bitrate = 120,
+ .hw_value = CONF_HW_BIT_RATE_12MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_12MBPS, },
+ { .bitrate = 180,
+ .hw_value = CONF_HW_BIT_RATE_18MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_18MBPS, },
+ { .bitrate = 240,
+ .hw_value = CONF_HW_BIT_RATE_24MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_24MBPS, },
+ { .bitrate = 360,
+ .hw_value = CONF_HW_BIT_RATE_36MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_36MBPS, },
+ { .bitrate = 480,
+ .hw_value = CONF_HW_BIT_RATE_48MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_48MBPS, },
+ { .bitrate = 540,
+ .hw_value = CONF_HW_BIT_RATE_54MBPS,
+ .hw_value_short = CONF_HW_BIT_RATE_54MBPS, },
+};
+
+/* 5 GHz band channels for WL1273 */
+static struct ieee80211_channel wl1271_channels_5ghz[] = {
+ { .hw_value = 183, .center_freq = 4915},
+ { .hw_value = 184, .center_freq = 4920},
+ { .hw_value = 185, .center_freq = 4925},
+ { .hw_value = 187, .center_freq = 4935},
+ { .hw_value = 188, .center_freq = 4940},
+ { .hw_value = 189, .center_freq = 4945},
+ { .hw_value = 192, .center_freq = 4960},
+ { .hw_value = 196, .center_freq = 4980},
+ { .hw_value = 7, .center_freq = 5035},
+ { .hw_value = 8, .center_freq = 5040},
+ { .hw_value = 9, .center_freq = 5045},
+ { .hw_value = 11, .center_freq = 5055},
+ { .hw_value = 12, .center_freq = 5060},
+ { .hw_value = 16, .center_freq = 5080},
+ { .hw_value = 34, .center_freq = 5170},
+ { .hw_value = 36, .center_freq = 5180},
+ { .hw_value = 38, .center_freq = 5190},
+ { .hw_value = 40, .center_freq = 5200},
+ { .hw_value = 42, .center_freq = 5210},
+ { .hw_value = 44, .center_freq = 5220},
+ { .hw_value = 46, .center_freq = 5230},
+ { .hw_value = 48, .center_freq = 5240},
+ { .hw_value = 52, .center_freq = 5260},
+ { .hw_value = 56, .center_freq = 5280},
+ { .hw_value = 60, .center_freq = 5300},
+ { .hw_value = 64, .center_freq = 5320},
+ { .hw_value = 100, .center_freq = 5500},
+ { .hw_value = 104, .center_freq = 5520},
+ { .hw_value = 108, .center_freq = 5540},
+ { .hw_value = 112, .center_freq = 5560},
+ { .hw_value = 116, .center_freq = 5580},
+ { .hw_value = 120, .center_freq = 5600},
+ { .hw_value = 124, .center_freq = 5620},
+ { .hw_value = 128, .center_freq = 5640},
+ { .hw_value = 132, .center_freq = 5660},
+ { .hw_value = 136, .center_freq = 5680},
+ { .hw_value = 140, .center_freq = 5700},
+ { .hw_value = 149, .center_freq = 5745},
+ { .hw_value = 153, .center_freq = 5765},
+ { .hw_value = 157, .center_freq = 5785},
+ { .hw_value = 161, .center_freq = 5805},
+ { .hw_value = 165, .center_freq = 5825},
+};
+
+
+static struct ieee80211_supported_band wl1271_band_5ghz = {
+ .channels = wl1271_channels_5ghz,
+ .n_channels = ARRAY_SIZE(wl1271_channels_5ghz),
+ .bitrates = wl1271_rates_5ghz,
+ .n_bitrates = ARRAY_SIZE(wl1271_rates_5ghz),
+};
+
static const struct ieee80211_ops wl1271_ops = {
.start = wl1271_op_start,
.stop = wl1271_op_stop,
@@ -1612,6 +1700,9 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
wl->hw->wiphy->max_scan_ssids = 1;
wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz;
+ if (wl1271_11a_enabled())
+ wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
+
SET_IEEE80211_DEV(wl->hw, &wl->spi->dev);
return 0;
--
1.5.6.5
^ permalink raw reply related
* [PATCH 05/22] wl1271: Add config structure for connection management parameters
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1255427279-1224-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Add a configuration structure for connection management parameters, and
set default configuration values there.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271.h | 1 -
drivers/net/wireless/wl12xx/wl1271_acx.c | 63 ++++++--
drivers/net/wireless/wl12xx/wl1271_acx.h | 24 +---
drivers/net/wireless/wl12xx/wl1271_cmd.c | 3 +-
drivers/net/wireless/wl12xx/wl1271_conf.h | 251 +++++++++++++++++++++++++++++
drivers/net/wireless/wl12xx/wl1271_main.c | 50 ++++++-
6 files changed, 348 insertions(+), 44 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 985e896..648223f 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -323,7 +323,6 @@ struct wl1271 {
u8 bss_type;
u8 ssid[IW_ESSID_MAX_SIZE + 1];
u8 ssid_len;
- u8 listen_int;
int channel;
struct wl1271_acx_mem_map *target_mem_map;
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
index 038203b..d003686 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
@@ -34,8 +34,7 @@
#include "wl1271_spi.h"
#include "wl1271_ps.h"
-int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event,
- u8 listen_interval)
+int wl1271_acx_wake_up_conditions(struct wl1271 *wl)
{
struct acx_wake_up_condition *wake_up;
int ret;
@@ -48,8 +47,8 @@ int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event,
goto out;
}
- wake_up->wake_up_event = wake_up_event;
- wake_up->listen_interval = listen_interval;
+ wake_up->wake_up_event = wl->conf.conn.wake_up_event;
+ wake_up->listen_interval = wl->conf.conn.listen_interval;
ret = wl1271_cmd_configure(wl, ACX_WAKE_UP_CONDITIONS,
wake_up, sizeof(*wake_up));
@@ -393,11 +392,15 @@ out:
int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
{
- struct acx_beacon_filter_option *beacon_filter;
- int ret;
+ struct acx_beacon_filter_option *beacon_filter = NULL;
+ int ret = 0;
wl1271_debug(DEBUG_ACX, "acx beacon filter opt");
+ if (enable_filter &&
+ wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED)
+ goto out;
+
beacon_filter = kzalloc(sizeof(*beacon_filter), GFP_KERNEL);
if (!beacon_filter) {
ret = -ENOMEM;
@@ -405,6 +408,11 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
}
beacon_filter->enable = enable_filter;
+
+ /*
+ * When set to zero, and the filter is enabled, beacons
+ * without the unicast TIM bit set are dropped.
+ */
beacon_filter->max_num_beacons = 0;
ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_OPT,
@@ -422,8 +430,9 @@ out:
int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
{
struct acx_beacon_filter_ie_table *ie_table;
- int idx = 0;
+ int i, idx = 0;
int ret;
+ bool vendor_spec = false;
wl1271_debug(DEBUG_ACX, "acx beacon filter table");
@@ -434,9 +443,31 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
}
/* configure default beacon pass-through rules */
- ie_table->num_ie = 1;
- ie_table->table[idx++] = BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN;
- ie_table->table[idx++] = BEACON_RULE_PASS_ON_APPEARANCE;
+ ie_table->num_ie = 0;
+ for (i = 0; i < wl->conf.conn.bcn_filt_ie_count; i++) {
+ struct conf_bcn_filt_rule *r = &(wl->conf.conn.bcn_filt_ie[i]);
+ ie_table->table[idx++] = r->ie;
+ ie_table->table[idx++] = r->rule;
+
+ if (r->ie == WLAN_EID_VENDOR_SPECIFIC) {
+ /* only one vendor specific ie allowed */
+ if (vendor_spec)
+ continue;
+
+ /* for vendor specific rules configure the
+ additional fields */
+ memcpy(&(ie_table->table[idx]), r->oui,
+ CONF_BCN_IE_OUI_LEN);
+ idx += CONF_BCN_IE_OUI_LEN;
+ ie_table->table[idx++] = r->type;
+ memcpy(&(ie_table->table[idx]), r->version,
+ CONF_BCN_IE_VER_LEN);
+ idx += CONF_BCN_IE_VER_LEN;
+ vendor_spec = true;
+ }
+
+ ie_table->num_ie++;
+ }
ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_TABLE,
ie_table, sizeof(*ie_table));
@@ -463,8 +494,8 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl)
goto out;
}
- acx->synch_fail_thold = SYNCH_FAIL_DEFAULT_THRESHOLD;
- acx->bss_lose_timeout = NO_BEACON_DEFAULT_TIMEOUT;
+ acx->synch_fail_thold = wl->conf.conn.synch_fail_thold;
+ acx->bss_lose_timeout = wl->conf.conn.bss_lose_timeout;
ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
acx, sizeof(*acx));
@@ -585,10 +616,10 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl)
goto out;
}
- bb->beacon_rx_timeout = BCN_RX_TIMEOUT_DEF_VALUE;
- bb->broadcast_timeout = BROADCAST_RX_TIMEOUT_DEF_VALUE;
- bb->rx_broadcast_in_ps = RX_BROADCAST_IN_PS_DEF_VALUE;
- bb->ps_poll_threshold = CONSECUTIVE_PS_POLL_FAILURE_DEF;
+ bb->beacon_rx_timeout = wl->conf.conn.beacon_rx_timeout;
+ bb->broadcast_timeout = wl->conf.conn.broadcast_timeout;
+ bb->rx_broadcast_in_ps = wl->conf.conn.rx_broadcast_in_ps;
+ bb->ps_poll_threshold = wl->conf.conn.ps_poll_threshold;
ret = wl1271_cmd_configure(wl, ACX_BCN_DTIM_OPTIONS, bb, sizeof(*bb));
if (ret < 0) {
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h
index 63cddce..73ef2bd 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.h
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.h
@@ -377,11 +377,6 @@ struct acx_beacon_filter_option {
(BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
-#define BEACON_RULE_PASS_ON_CHANGE BIT(0)
-#define BEACON_RULE_PASS_ON_APPEARANCE BIT(1)
-
-#define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN (37)
-
struct acx_beacon_filter_ie_table {
struct acx_header header;
@@ -390,9 +385,6 @@ struct acx_beacon_filter_ie_table {
u8 pad[3];
} __attribute__ ((packed));
-#define SYNCH_FAIL_DEFAULT_THRESHOLD 5 /* number of beacons */
-#define NO_BEACON_DEFAULT_TIMEOUT (100) /* TU */
-
struct acx_conn_monit_params {
struct acx_header header;
@@ -497,11 +489,6 @@ struct acx_energy_detection {
u8 pad;
} __attribute__ ((packed));
-#define BCN_RX_TIMEOUT_DEF_VALUE 10000
-#define BROADCAST_RX_TIMEOUT_DEF_VALUE 20000
-#define RX_BROADCAST_IN_PS_DEF_VALUE 1
-#define CONSECUTIVE_PS_POLL_FAILURE_DEF 4
-
struct acx_beacon_broadcast {
struct acx_header header;
@@ -575,14 +562,6 @@ struct acx_current_tx_power {
u8 padding[3];
} __attribute__ ((packed));
-enum acx_wake_up_event {
- WAKE_UP_EVENT_BEACON_BITMAP = 0x01, /* Wake on every Beacon*/
- WAKE_UP_EVENT_DTIM_BITMAP = 0x02, /* Wake on every DTIM*/
- WAKE_UP_EVENT_N_DTIM_BITMAP = 0x04, /* Wake on every Nth DTIM */
- WAKE_UP_EVENT_N_BEACONS_BITMAP = 0x08, /* Wake on every Nth Beacon */
- WAKE_UP_EVENT_BITS_MASK = 0x0F
-};
-
struct acx_wake_up_condition {
struct acx_header header;
@@ -1038,8 +1017,7 @@ enum {
};
-int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event,
- u8 listen_interval);
+int wl1271_acx_wake_up_conditions(struct wl1271 *wl);
int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth);
int wl1271_acx_fw_version(struct wl1271 *wl, char *buf, size_t len);
int wl1271_acx_tx_power(struct wl1271 *wl, int power);
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index f05bd77..f38e3e0 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -436,8 +436,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode)
int ret = 0;
/* FIXME: this should be in ps.c */
- ret = wl1271_acx_wake_up_conditions(wl, WAKE_UP_EVENT_DTIM_BITMAP,
- wl->listen_int);
+ ret = wl1271_acx_wake_up_conditions(wl);
if (ret < 0) {
wl1271_error("couldn't set wake up conditions");
goto out;
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index 3c5ce31..f08e509 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -441,10 +441,261 @@ struct conf_tx_settings {
};
+enum {
+ CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
+ CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
+ CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
+ CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
+ CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
+};
+
+#define CONF_MAX_BCN_FILT_IE_COUNT 32
+
+#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
+#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
+
+#define CONF_BCN_IE_OUI_LEN 3
+#define CONF_BCN_IE_VER_LEN 2
+
+struct conf_bcn_filt_rule {
+ /*
+ * IE number to which to associate a rule.
+ *
+ * Range: u8
+ */
+ u8 ie;
+
+ /*
+ * Rule to associate with the specific ie.
+ *
+ * Range: CONF_BCN_RULE_PASS_ON_*
+ */
+ u8 rule;
+
+ /*
+ * OUI for the vendor specifie IE (221)
+ */
+ u8 oui[CONF_BCN_IE_OUI_LEN];
+
+ /*
+ * Type for the vendor specifie IE (221)
+ */
+ u8 type;
+
+ /*
+ * Version for the vendor specifie IE (221)
+ */
+ u8 version[CONF_BCN_IE_VER_LEN];
+};
+
+#define CONF_MAX_RSSI_SNR_TRIGGERS 8
+
+enum {
+ CONF_TRIG_METRIC_RSSI_BEACON = 0,
+ CONF_TRIG_METRIC_RSSI_DATA,
+ CONF_TRIG_METRIC_SNR_BEACON,
+ CONF_TRIG_METRIC_SNR_DATA
+};
+
+enum {
+ CONF_TRIG_EVENT_TYPE_LEVEL = 0,
+ CONF_TRIG_EVENT_TYPE_EDGE
+};
+
+enum {
+ CONF_TRIG_EVENT_DIR_LOW = 0,
+ CONF_TRIG_EVENT_DIR_HIGH,
+ CONF_TRIG_EVENT_DIR_BIDIR
+};
+
+
+struct conf_sig_trigger {
+ /*
+ * The RSSI / SNR threshold value.
+ *
+ * FIXME: what is the range?
+ */
+ s16 threshold;
+
+ /*
+ * Minimum delay between two trigger events for this trigger in ms.
+ *
+ * Range: 0 - 60000
+ */
+ u16 pacing;
+
+ /*
+ * The measurement data source for this trigger.
+ *
+ * Range: CONF_TRIG_METRIC_*
+ */
+ u8 metric;
+
+ /*
+ * The trigger type of this trigger.
+ *
+ * Range: CONF_TRIG_EVENT_TYPE_*
+ */
+ u8 type;
+
+ /*
+ * The direction of the trigger.
+ *
+ * Range: CONF_TRIG_EVENT_DIR_*
+ */
+ u8 direction;
+
+ /*
+ * Hysteresis range of the trigger around the threshold (in dB)
+ *
+ * Range: u8
+ */
+ u8 hysteresis;
+
+ /*
+ * Index of the trigger rule.
+ *
+ * Range: 0 - CONF_MAX_RSSI_SNR_TRIGGERS-1
+ */
+ u8 index;
+
+ /*
+ * Enable / disable this rule (to use for clearing rules.)
+ *
+ * Range: 1 - Enabled, 2 - Not enabled
+ */
+ u8 enable;
+};
+
+struct conf_sig_weights {
+
+ /*
+ * RSSI from beacons average weight.
+ *
+ * Range: u8
+ */
+ u8 rssi_bcn_avg_weight;
+
+ /*
+ * RSSI from data average weight.
+ *
+ * Range: u8
+ */
+ u8 rssi_pkt_avg_weight;
+
+ /*
+ * SNR from beacons average weight.
+ *
+ * Range: u8
+ */
+ u8 snr_bcn_avg_weight;
+
+ /*
+ * SNR from data average weight.
+ *
+ * Range: u8
+ */
+ u8 snr_pkt_avg_weight;
+};
+
+enum conf_bcn_filt_mode {
+ CONF_BCN_FILT_MODE_DISABLED = 0,
+ CONF_BCN_FILT_MODE_ENABLED = 1
+};
+
+struct conf_conn_settings {
+ /*
+ * Firmware wakeup conditions configuration. The host may set only
+ * one bit.
+ *
+ * Range: CONF_WAKE_UP_EVENT_*
+ */
+ u8 wake_up_event;
+
+ /*
+ * Listen interval for beacons or Dtims.
+ *
+ * Range: 0 for beacon and Dtim wakeup
+ * 1-10 for x Dtims
+ * 1-255 for x beacons
+ */
+ u8 listen_interval;
+
+ /*
+ * Enable or disable the beacon filtering.
+ *
+ * Range: CONF_BCN_FILT_MODE_*
+ */
+ enum conf_bcn_filt_mode bcn_filt_mode;
+
+ /*
+ * Configure Beacon filter pass-thru rules.
+ */
+ u8 bcn_filt_ie_count;
+ struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
+
+ /*
+ * The number of consequtive beacons to lose, before the firmware
+ * becomes out of synch.
+ *
+ * Range: u32
+ */
+ u32 synch_fail_thold;
+
+ /*
+ * After out-of-synch, the number of TU's to wait without a further
+ * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
+ * event.
+ *
+ * Range: u32
+ */
+ u32 bss_lose_timeout;
+
+ /*
+ * Beacon receive timeout.
+ *
+ * Range: u32
+ */
+ u32 beacon_rx_timeout;
+
+ /*
+ * Broadcast receive timeout.
+ *
+ * Range: u32
+ */
+ u32 broadcast_timeout;
+
+ /*
+ * Enable/disable reception of broadcast packets in power save mode
+ *
+ * Range: 1 - enable, 0 - disable
+ */
+ u8 rx_broadcast_in_ps;
+
+ /*
+ * Consequtive PS Poll failures before sending event to driver
+ *
+ * Range: u8
+ */
+ u8 ps_poll_threshold;
+
+ /*
+ * Configuration of signal (rssi/snr) triggers.
+ */
+ u8 sig_trigger_count;
+ struct conf_sig_trigger sig_trigger[CONF_MAX_RSSI_SNR_TRIGGERS];
+
+ /*
+ * Configuration of signal average weights.
+ */
+ struct conf_sig_weights sig_weights;
+};
+
struct conf_drv_settings {
struct conf_sg_settings sg;
struct conf_rx_settings rx;
struct conf_tx_settings tx;
+ struct conf_conn_settings conn;
};
#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 35d0b7e..a559a15 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -176,6 +176,54 @@ static void wl1271_conf_init(struct wl1271 *wl)
.frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD,
.tx_compl_timeout = 5,
.tx_compl_threshold = 5
+ },
+ .conn = {
+ .wake_up_event = CONF_WAKE_UP_EVENT_DTIM,
+ .listen_interval = 0,
+ .bcn_filt_mode = CONF_BCN_FILT_MODE_ENABLED,
+ .bcn_filt_ie_count = 1,
+ .bcn_filt_ie = {
+ [0] = {
+ .ie = WLAN_EID_CHANNEL_SWITCH,
+ .rule =
+ CONF_BCN_RULE_PASS_ON_APPEARANCE,
+ }
+ },
+ .synch_fail_thold = 5,
+ .bss_lose_timeout = 100,
+ .beacon_rx_timeout = 10000,
+ .broadcast_timeout = 20000,
+ .rx_broadcast_in_ps = 1,
+ .ps_poll_threshold = 4,
+ .sig_trigger_count = 2,
+ .sig_trigger = {
+ [0] = {
+ .threshold = -75,
+ .pacing = 500,
+ .metric = CONF_TRIG_METRIC_RSSI_BEACON,
+ .type = CONF_TRIG_EVENT_TYPE_EDGE,
+ .direction = CONF_TRIG_EVENT_DIR_LOW,
+ .hysteresis = 2,
+ .index = 0,
+ .enable = 1
+ },
+ [1] = {
+ .threshold = -75,
+ .pacing = 500,
+ .metric = CONF_TRIG_METRIC_RSSI_BEACON,
+ .type = CONF_TRIG_EVENT_TYPE_EDGE,
+ .direction = CONF_TRIG_EVENT_DIR_HIGH,
+ .hysteresis = 2,
+ .index = 1,
+ .enable = 1
+ }
+ },
+ .sig_weights = {
+ .rssi_bcn_avg_weight = 10,
+ .rssi_pkt_avg_weight = 10,
+ .snr_bcn_avg_weight = 10,
+ .snr_pkt_avg_weight = 10
+ }
}
};
@@ -765,7 +813,6 @@ static void wl1271_op_stop(struct ieee80211_hw *hw)
memset(wl->bssid, 0, ETH_ALEN);
memset(wl->ssid, 0, IW_ESSID_MAX_SIZE + 1);
wl->ssid_len = 0;
- wl->listen_int = 1;
wl->bss_type = MAX_BSS_TYPE;
wl->band = IEEE80211_BAND_2GHZ;
@@ -1504,7 +1551,6 @@ static int __devinit wl1271_probe(struct spi_device *spi)
wl->channel = WL1271_DEFAULT_CHANNEL;
wl->scanning = false;
wl->default_key = 0;
- wl->listen_int = 1;
wl->rx_counter = 0;
wl->rx_config = WL1271_DEFAULT_RX_CONFIG;
wl->rx_filter = WL1271_DEFAULT_RX_FILTER;
--
1.5.6.5
^ permalink raw reply related
* [PATCH 07/22] wl1271: Move default FW config struct away from stack
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1255427279-1224-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Move the default FW config into a module global static variable, instead
of being a stack variable.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271_main.c | 535 ++++++++++++++---------------
1 files changed, 264 insertions(+), 271 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 0b17b05..eba38df 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -46,289 +46,282 @@
#include "wl1271_cmd.h"
#include "wl1271_boot.h"
-static void wl1271_conf_init(struct wl1271 *wl)
-{
- struct conf_drv_settings conf = {
- .sg = {
- .per_threshold = 7500,
- .max_scan_compensation_time = 120000,
- .nfs_sample_interval = 400,
- .load_ratio = 50,
- .auto_ps_mode = 0,
- .probe_req_compensation = 170,
- .scan_window_compensation = 50,
- .antenna_config = 0,
- .beacon_miss_threshold = 60,
- .rate_adaptation_threshold = CONF_HW_BIT_RATE_12MBPS,
- .rate_adaptation_snr = 0
- },
- .rx = {
- .rx_msdu_life_time = 512000,
- .packet_detection_threshold = 0,
- .ps_poll_timeout = 15,
- .upsd_timeout = 15,
- .rts_threshold = 2347,
- .rx_cca_threshold = 0xFFEF,
- .irq_blk_threshold = 0,
- .irq_pkt_threshold = USHORT_MAX,
- .irq_timeout = 5,
- .queue_type = CONF_RX_QUEUE_TYPE_LOW_PRIORITY,
+static struct conf_drv_settings default_conf = {
+ .sg = {
+ .per_threshold = 7500,
+ .max_scan_compensation_time = 120000,
+ .nfs_sample_interval = 400,
+ .load_ratio = 50,
+ .auto_ps_mode = 0,
+ .probe_req_compensation = 170,
+ .scan_window_compensation = 50,
+ .antenna_config = 0,
+ .beacon_miss_threshold = 60,
+ .rate_adaptation_threshold = CONF_HW_BIT_RATE_12MBPS,
+ .rate_adaptation_snr = 0
+ },
+ .rx = {
+ .rx_msdu_life_time = 512000,
+ .packet_detection_threshold = 0,
+ .ps_poll_timeout = 15,
+ .upsd_timeout = 15,
+ .rts_threshold = 2347,
+ .rx_cca_threshold = 0xFFEF,
+ .irq_blk_threshold = 0,
+ .irq_pkt_threshold = USHORT_MAX,
+ .irq_timeout = 5,
+ .queue_type = CONF_RX_QUEUE_TYPE_LOW_PRIORITY,
+ },
+ .tx = {
+ .tx_energy_detection = 0,
+ .rc_conf = {
+ .enabled_rates = CONF_TX_RATE_MASK_UNSPECIFIED,
+ .short_retry_limit = 10,
+ .long_retry_limit = 10,
+ .aflags = 0
},
- .tx = {
- .tx_energy_detection = 0,
- .rc_conf = {
- .enabled_rates =
- CONF_TX_RATE_MASK_UNSPECIFIED,
- .short_retry_limit = 10,
- .long_retry_limit = 10,
- .aflags = 0
+ .ac_conf_count = 4,
+ .ac_conf = {
+ [0] = {
+ .ac = CONF_TX_AC_BE,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = 3,
+ .tx_op_limit = 0,
+ },
+ [1] = {
+ .ac = CONF_TX_AC_BK,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = 7,
+ .tx_op_limit = 0,
},
- .ac_conf_count = 4,
- .ac_conf = {
- [0] = {
- .ac = CONF_TX_AC_BE,
- .cw_min = 15,
- .cw_max = 63,
- .aifsn = 3,
- .tx_op_limit = 0,
- },
- [1] = {
- .ac = CONF_TX_AC_BK,
- .cw_min = 15,
- .cw_max = 63,
- .aifsn = 7,
- .tx_op_limit = 0,
- },
- [2] = {
- .ac = CONF_TX_AC_VI,
- .cw_min = 15,
- .cw_max = 63,
- .aifsn = CONF_TX_AIFS_PIFS,
- .tx_op_limit = 3008,
- },
- [3] = {
- .ac = CONF_TX_AC_VO,
- .cw_min = 15,
- .cw_max = 63,
- .aifsn = CONF_TX_AIFS_PIFS,
- .tx_op_limit = 1504,
- },
+ [2] = {
+ .ac = CONF_TX_AC_VI,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = CONF_TX_AIFS_PIFS,
+ .tx_op_limit = 3008,
},
- .tid_conf_count = 7,
- .tid_conf = {
- [0] = {
- .queue_id = 0,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- },
- [1] = {
- .queue_id = 1,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- },
- [2] = {
- .queue_id = 2,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- },
- [3] = {
- .queue_id = 3,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- },
- [4] = {
- .queue_id = 4,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- },
- [5] = {
- .queue_id = 5,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- },
- [6] = {
- .queue_id = 6,
- .channel_type = CONF_CHANNEL_TYPE_DCF,
- .tsid = CONF_TX_AC_BE,
- .ps_scheme = CONF_PS_SCHEME_LEGACY,
- .ack_policy = CONF_ACK_POLICY_LEGACY,
- .apsd_conf = {0, 0},
- }
+ [3] = {
+ .ac = CONF_TX_AC_VO,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = CONF_TX_AIFS_PIFS,
+ .tx_op_limit = 1504,
},
- .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD,
- .tx_compl_timeout = 5,
- .tx_compl_threshold = 5
},
- .conn = {
- .wake_up_event = CONF_WAKE_UP_EVENT_DTIM,
- .listen_interval = 0,
- .bcn_filt_mode = CONF_BCN_FILT_MODE_ENABLED,
- .bcn_filt_ie_count = 1,
- .bcn_filt_ie = {
- [0] = {
- .ie = WLAN_EID_CHANNEL_SWITCH,
- .rule =
- CONF_BCN_RULE_PASS_ON_APPEARANCE,
- }
+ .tid_conf_count = 7,
+ .tid_conf = {
+ [0] = {
+ .queue_id = 0,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [1] = {
+ .queue_id = 1,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
},
- .synch_fail_thold = 5,
- .bss_lose_timeout = 100,
- .beacon_rx_timeout = 10000,
- .broadcast_timeout = 20000,
- .rx_broadcast_in_ps = 1,
- .ps_poll_threshold = 4,
- .sig_trigger_count = 2,
- .sig_trigger = {
- [0] = {
- .threshold = -75,
- .pacing = 500,
- .metric = CONF_TRIG_METRIC_RSSI_BEACON,
- .type = CONF_TRIG_EVENT_TYPE_EDGE,
- .direction = CONF_TRIG_EVENT_DIR_LOW,
- .hysteresis = 2,
- .index = 0,
- .enable = 1
- },
- [1] = {
- .threshold = -75,
- .pacing = 500,
- .metric = CONF_TRIG_METRIC_RSSI_BEACON,
- .type = CONF_TRIG_EVENT_TYPE_EDGE,
- .direction = CONF_TRIG_EVENT_DIR_HIGH,
- .hysteresis = 2,
- .index = 1,
- .enable = 1
- }
+ [2] = {
+ .queue_id = 2,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
},
- .sig_weights = {
- .rssi_bcn_avg_weight = 10,
- .rssi_pkt_avg_weight = 10,
- .snr_bcn_avg_weight = 10,
- .snr_pkt_avg_weight = 10
+ [3] = {
+ .queue_id = 3,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [4] = {
+ .queue_id = 4,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [5] = {
+ .queue_id = 5,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [6] = {
+ .queue_id = 6,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
}
},
- .init = {
- .sr_err_tbl = {
- [0] = {
- .len = 7,
- .upper_limit = 0x03,
- .values = {
- 0x18, 0x10, 0x05, 0xfb,
- 0xf0, 0xe8, 0x00 }
- },
- [1] = {
- .len = 7,
- .upper_limit = 0x03,
- .values = {
- 0x18, 0x10, 0x05, 0xf6,
- 0xf0, 0xe8, 0x00 }
- },
- [2] = {
- .len = 7,
- .upper_limit = 0x03,
- .values = {
- 0x18, 0x10, 0x05, 0xfb,
- 0xf0, 0xe8, 0x00 }
- }
+ .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD,
+ .tx_compl_timeout = 5,
+ .tx_compl_threshold = 5
+ },
+ .conn = {
+ .wake_up_event = CONF_WAKE_UP_EVENT_DTIM,
+ .listen_interval = 0,
+ .bcn_filt_mode = CONF_BCN_FILT_MODE_ENABLED,
+ .bcn_filt_ie_count = 1,
+ .bcn_filt_ie = {
+ [0] = {
+ .ie = WLAN_EID_CHANNEL_SWITCH,
+ .rule = CONF_BCN_RULE_PASS_ON_APPEARANCE,
+ }
+ },
+ .synch_fail_thold = 5,
+ .bss_lose_timeout = 100,
+ .beacon_rx_timeout = 10000,
+ .broadcast_timeout = 20000,
+ .rx_broadcast_in_ps = 1,
+ .ps_poll_threshold = 4,
+ .sig_trigger_count = 2,
+ .sig_trigger = {
+ [0] = {
+ .threshold = -75,
+ .pacing = 500,
+ .metric = CONF_TRIG_METRIC_RSSI_BEACON,
+ .type = CONF_TRIG_EVENT_TYPE_EDGE,
+ .direction = CONF_TRIG_EVENT_DIR_LOW,
+ .hysteresis = 2,
+ .index = 0,
+ .enable = 1
},
- .sr_enable = 1,
- .genparam = {
- /*
- * FIXME: The correct value CONF_REF_CLK_38_4_E
- * causes the firmware to crash on boot.
- * The value 5 apparently is an
- * unnoficial XTAL configuration of the
- * same frequency, which appears to work.
- */
- .ref_clk = 5,
- .settling_time = 5,
- .clk_valid_on_wakeup = 0,
- .dc2dcmode = 0,
- .single_dual_band = 0,
- .tx_bip_fem_autodetect = 0,
- .tx_bip_fem_manufacturer = 1,
- .settings = 1,
+ [1] = {
+ .threshold = -75,
+ .pacing = 500,
+ .metric = CONF_TRIG_METRIC_RSSI_BEACON,
+ .type = CONF_TRIG_EVENT_TYPE_EDGE,
+ .direction = CONF_TRIG_EVENT_DIR_HIGH,
+ .hysteresis = 2,
+ .index = 1,
+ .enable = 1
+ }
+ },
+ .sig_weights = {
+ .rssi_bcn_avg_weight = 10,
+ .rssi_pkt_avg_weight = 10,
+ .snr_bcn_avg_weight = 10,
+ .snr_pkt_avg_weight = 10
+ }
+ },
+ .init = {
+ .sr_err_tbl = {
+ [0] = {
+ .len = 7,
+ .upper_limit = 0x03,
+ .values = {
+ 0x18, 0x10, 0x05, 0xfb, 0xf0, 0xe8,
+ 0x00 }
+ },
+ [1] = {
+ .len = 7,
+ .upper_limit = 0x03,
+ .values = {
+ 0x18, 0x10, 0x05, 0xf6, 0xf0, 0xe8,
+ 0x00 }
},
- .radioparam = {
- /* FIXME: 5GHz values unset! */
- .rx_trace_loss = 10,
- .tx_trace_loss = 10,
- .rx_rssi_and_proc_compens = {
- 0xec, 0xf6, 0x00, 0x0c, 0x18, 0xf8,
- 0xfc, 0x00, 0x08, 0x10, 0xf0, 0xf8,
- 0x00, 0x0a, 0x14 },
- .rx_trace_loss_5 = {
- 0, 0, 0, 0, 0, 0, 0 },
- .tx_trace_loss_5 = {
- 0, 0, 0, 0, 0, 0, 0 },
- .rx_rssi_and_proc_compens_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00 },
- .tx_ref_pd_voltage = 0x24e,
- .tx_ref_power = 0x78,
- .tx_offset_db = 0x0,
- .tx_rate_limits_normal = {
- 0x1e, 0x1f, 0x22, 0x24, 0x28, 0x29 },
- .tx_rate_limits_degraded = {
- 0x1b, 0x1c, 0x1e, 0x20, 0x24, 0x25 },
- .tx_channel_limits_11b = {
- 0x22, 0x50, 0x50, 0x50, 0x50, 0x50,
- 0x50, 0x50, 0x50, 0x50, 0x22, 0x50,
- 0x22, 0x50 },
- .tx_channel_limits_ofdm = {
- 0x20, 0x50, 0x50, 0x50, 0x50, 0x50,
- 0x50, 0x50, 0x50, 0x50, 0x20, 0x50,
- 0x20, 0x50 },
- .tx_pdv_rate_offsets = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .tx_ibias = {
- 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x27 },
- .rx_fem_insertion_loss = 0x14,
- .tx_ref_pd_voltage_5 = {
- 0, 0, 0, 0, 0, 0, 0 },
- .tx_ref_power_5 = {
- 0, 0, 0, 0, 0, 0, 0 },
- .tx_offset_db_5 = {
- 0, 0, 0, 0, 0, 0, 0 },
- .tx_rate_limits_normal_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .tx_rate_limits_degraded_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .tx_channel_limits_ofdm_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00},
- .tx_pdv_rate_offsets_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .tx_ibias_5 = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .rx_fem_insertion_loss_5 = {
- 0, 0, 0, 0, 0, 0, 0 }
+ [2] = {
+ .len = 7,
+ .upper_limit = 0x03,
+ .values = {
+ 0x18, 0x10, 0x05, 0xfb, 0xf0, 0xe8,
+ 0x00 }
}
+ },
+ .sr_enable = 1,
+ .genparam = {
+ /*
+ * FIXME: The correct value CONF_REF_CLK_38_4_E
+ * causes the firmware to crash on boot.
+ * The value 5 apparently is an
+ * unnoficial XTAL configuration of the
+ * same frequency, which appears to work.
+ */
+ .ref_clk = 5,
+ .settling_time = 5,
+ .clk_valid_on_wakeup = 0,
+ .dc2dcmode = 0,
+ .single_dual_band = 0,
+ .tx_bip_fem_autodetect = 0,
+ .tx_bip_fem_manufacturer = 1,
+ .settings = 1,
+ },
+ .radioparam = {
+ /* FIXME: 5GHz values unset! */
+ .rx_trace_loss = 10,
+ .tx_trace_loss = 10,
+ .rx_rssi_and_proc_compens = {
+ 0xec, 0xf6, 0x00, 0x0c, 0x18, 0xf8,
+ 0xfc, 0x00, 0x08, 0x10, 0xf0, 0xf8,
+ 0x00, 0x0a, 0x14 },
+ .rx_trace_loss_5 = { 0, 0, 0, 0, 0, 0, 0 },
+ .tx_trace_loss_5 = { 0, 0, 0, 0, 0, 0, 0 },
+ .rx_rssi_and_proc_compens_5 = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00 },
+ .tx_ref_pd_voltage = 0x24e,
+ .tx_ref_power = 0x78,
+ .tx_offset_db = 0x0,
+ .tx_rate_limits_normal = {
+ 0x1e, 0x1f, 0x22, 0x24, 0x28, 0x29 },
+ .tx_rate_limits_degraded = {
+ 0x1b, 0x1c, 0x1e, 0x20, 0x24, 0x25 },
+ .tx_channel_limits_11b = {
+ 0x22, 0x50, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x50, 0x22, 0x50,
+ 0x22, 0x50 },
+ .tx_channel_limits_ofdm = {
+ 0x20, 0x50, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x50, 0x20, 0x50,
+ 0x20, 0x50 },
+ .tx_pdv_rate_offsets = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .tx_ibias = {
+ 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x27 },
+ .rx_fem_insertion_loss = 0x14,
+ .tx_ref_pd_voltage_5 = { 0, 0, 0, 0, 0, 0, 0 },
+ .tx_ref_power_5 = { 0, 0, 0, 0, 0, 0, 0 },
+ .tx_offset_db_5 = {0, 0, 0, 0, 0, 0, 0 },
+ .tx_rate_limits_normal_5 = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .tx_rate_limits_degraded_5 = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .tx_channel_limits_ofdm_5 = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00},
+ .tx_pdv_rate_offsets_5 = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .tx_ibias_5 = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .rx_fem_insertion_loss_5 = { 0, 0, 0, 0, 0, 0, 0 }
}
- };
+ }
+};
+
+static void wl1271_conf_init(struct wl1271 *wl)
+{
/*
* This function applies the default configuration to the driver. This
@@ -341,7 +334,7 @@ static void wl1271_conf_init(struct wl1271 *wl)
*/
/* apply driver default configuration */
- memcpy(&wl->conf, &conf, sizeof(conf));
+ memcpy(&wl->conf, &default_conf, sizeof(default_conf));
}
--
1.5.6.5
^ permalink raw reply related
* [PATCH 01/22] wl1271: Workaround for reference clock setting on boot.
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1255427279-1224-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
If the 38.4MHz reference clock is configured to the firmware, it crashes
on boot. Configuring an experimental 38.4MHz in XTAL mode allows the
firmware to boot, and everything appears to work.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271_init.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index e45af07..9abe062 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -196,7 +196,14 @@ static int wl1271_init_general_parms(struct wl1271 *wl)
gen_parms->id = TEST_CMD_INI_FILE_GENERAL_PARAM;
- gen_parms->ref_clk = REF_CLK_38_4_E;
+ /*
+ * FIXME: The firmware crashes on boot with REF_CLK_38_4_E as clock.
+ * according to TI engineers, ref clk 5 is an unofficial
+ * 38.4 XTAL clock config, which seems to boot the device.
+ * Restore correct value once the real problem source is
+ * identified.
+ */
+ gen_parms->ref_clk = 5; /* REF_CLK_38_4_E; */
/* FIXME: magic numbers */
gen_parms->settling_time = 5;
gen_parms->clk_valid_on_wakeup = 0;
--
1.5.6.5
^ permalink raw reply related
* [PATCH 04/22] wl1271: Add config structure for TX path parameters
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1255427279-1224-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Add a configuration structure for TX path parameters, and set defalt
configuration values there.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_acx.c | 54 ++++-----
drivers/net/wireless/wl12xx/wl1271_acx.h | 37 +------
drivers/net/wireless/wl12xx/wl1271_cmd.c | 6 +-
drivers/net/wireless/wl12xx/wl1271_conf.h | 187 +++++++++++++++++++++++++++++
drivers/net/wireless/wl12xx/wl1271_init.c | 2 +-
drivers/net/wireless/wl12xx/wl1271_main.c | 103 ++++++++++++++++
7 files changed, 321 insertions(+), 70 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 64a3270..985e896 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -107,7 +107,7 @@ enum {
CFG_RX_CTL_EN | CFG_RX_BCN_EN | \
CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
-#define WL1271_DEFAULT_BASIC_RATE_SET (ACX_RATE_MASK_ALL)
+#define WL1271_DEFAULT_BASIC_RATE_SET (CONF_TX_RATE_MASK_ALL)
#define WL1271_FW_NAME "wl1271-fw.bin"
#define WL1271_NVS_NAME "wl1271-nvs.bin"
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
index 63aa646..038203b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
@@ -558,7 +558,7 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)
}
detection->rx_cca_threshold = wl->conf.rx.rx_cca_threshold;
- detection->tx_energy_detection = 0;
+ detection->tx_energy_detection = wl->conf.tx.tx_energy_detection;
ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD,
detection, sizeof(*detection));
@@ -729,6 +729,7 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats)
int wl1271_acx_rate_policies(struct wl1271 *wl, u32 enabled_rates)
{
struct acx_rate_policy *acx;
+ struct conf_tx_rate_class *c = &wl->conf.tx.rc_conf;
int ret = 0;
wl1271_debug(DEBUG_ACX, "acx rate policies");
@@ -743,9 +744,9 @@ int wl1271_acx_rate_policies(struct wl1271 *wl, u32 enabled_rates)
/* configure one default (one-size-fits-all) rate class */
acx->rate_class_cnt = 1;
acx->rate_class[0].enabled_rates = enabled_rates;
- acx->rate_class[0].short_retry_limit = ACX_RATE_RETRY_LIMIT;
- acx->rate_class[0].long_retry_limit = ACX_RATE_RETRY_LIMIT;
- acx->rate_class[0].aflags = 0;
+ acx->rate_class[0].short_retry_limit = c->short_retry_limit;
+ acx->rate_class[0].long_retry_limit = c->long_retry_limit;
+ acx->rate_class[0].aflags = c->aflags;
ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
if (ret < 0) {
@@ -772,22 +773,14 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl)
goto out;
}
- /*
- * FIXME: Configure each AC with appropriate values (most suitable
- * values will probably be different for each AC.
- */
- for (i = 0; i < WL1271_ACX_AC_COUNT; i++) {
- acx->ac = i;
-
- /*
- * FIXME: The following default values originate from
- * the TI reference driver. What do they mean?
- */
- acx->cw_min = 15;
- acx->cw_max = 63;
- acx->aifsn = 3;
+ for (i = 0; i < wl->conf.tx.ac_conf_count; i++) {
+ struct conf_tx_ac_category *c = &(wl->conf.tx.ac_conf[i]);
+ acx->ac = c->ac;
+ acx->cw_min = c->cw_min;
+ acx->cw_max = c->cw_max;
+ acx->aifsn = c->aifsn;
acx->reserved = 0;
- acx->tx_op_limit = 0;
+ acx->tx_op_limit = c->tx_op_limit;
ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
if (ret < 0) {
@@ -816,12 +809,15 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl)
goto out;
}
- /* FIXME: configure each TID with a different AC reference */
- for (i = 0; i < WL1271_ACX_TID_COUNT; i++) {
- acx->queue_id = i;
- acx->tsid = WL1271_ACX_AC_BE;
- acx->ps_scheme = WL1271_ACX_PS_SCHEME_LEGACY;
- acx->ack_policy = WL1271_ACX_ACK_POLICY_LEGACY;
+ for (i = 0; i < wl->conf.tx.tid_conf_count; i++) {
+ struct conf_tx_tid *c = &(wl->conf.tx.tid_conf[i]);
+ acx->queue_id = c->queue_id;
+ acx->channel_type = c->channel_type;
+ acx->tsid = c->tsid;
+ acx->ps_scheme = c->ps_scheme;
+ acx->ack_policy = c->ack_policy;
+ acx->apsd_conf[0] = c->apsd_conf[0];
+ acx->apsd_conf[1] = c->apsd_conf[1];
ret = wl1271_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx));
if (ret < 0) {
@@ -849,7 +845,7 @@ int wl1271_acx_frag_threshold(struct wl1271 *wl)
goto out;
}
- acx->frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD;
+ acx->frag_threshold = wl->conf.tx.frag_threshold;
ret = wl1271_cmd_configure(wl, ACX_FRAG_CFG, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("Setting of frag threshold failed: %d", ret);
@@ -875,8 +871,8 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl)
goto out;
}
- acx->tx_compl_timeout = WL1271_ACX_TX_COMPL_TIMEOUT;
- acx->tx_compl_threshold = WL1271_ACX_TX_COMPL_THRESHOLD;
+ acx->tx_compl_timeout = wl->conf.tx.tx_compl_timeout;
+ acx->tx_compl_threshold = wl->conf.tx.tx_compl_threshold;
ret = wl1271_cmd_configure(wl, ACX_TX_CONFIG_OPT, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("Setting of tx options failed: %d", ret);
@@ -929,7 +925,7 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl)
return ret;
wl->target_mem_map = kzalloc(sizeof(struct wl1271_acx_mem_map),
- GFP_KERNEL);
+ GFP_KERNEL);
if (!wl->target_mem_map) {
wl1271_error("couldn't allocate target memory map");
return -ENOMEM;
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h
index 1fbd4e5..63cddce 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.h
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.h
@@ -850,11 +850,6 @@ struct acx_statistics {
struct acx_rxpipe_statistics rxpipe;
} __attribute__ ((packed));
-#define ACX_MAX_RATE_CLASSES 8
-#define ACX_RATE_MASK_UNSPECIFIED 0
-#define ACX_RATE_MASK_ALL 0x1eff
-#define ACX_RATE_RETRY_LIMIT 10
-
struct acx_rate_class {
u32 enabled_rates;
u8 short_retry_limit;
@@ -867,11 +862,9 @@ struct acx_rate_policy {
struct acx_header header;
u32 rate_class_cnt;
- struct acx_rate_class rate_class[ACX_MAX_RATE_CLASSES];
+ struct acx_rate_class rate_class[CONF_TX_MAX_RATE_CLASSES];
} __attribute__ ((packed));
-#define WL1271_ACX_AC_COUNT 4
-
struct acx_ac_cfg {
struct acx_header header;
u8 ac;
@@ -882,31 +875,6 @@ struct acx_ac_cfg {
u16 tx_op_limit;
} __attribute__ ((packed));
-enum wl1271_acx_ac {
- WL1271_ACX_AC_BE = 0,
- WL1271_ACX_AC_BK = 1,
- WL1271_ACX_AC_VI = 2,
- WL1271_ACX_AC_VO = 3,
- WL1271_ACX_AC_CTS2SELF = 4,
- WL1271_ACX_AC_ANY_TID = 0x1F,
- WL1271_ACX_AC_INVALID = 0xFF,
-};
-
-enum wl1271_acx_ps_scheme {
- WL1271_ACX_PS_SCHEME_LEGACY = 0,
- WL1271_ACX_PS_SCHEME_UPSD_TRIGGER = 1,
- WL1271_ACX_PS_SCHEME_LEGACY_PSPOLL = 2,
- WL1271_ACX_PS_SCHEME_SAPSD = 3,
-};
-
-enum wl1271_acx_ack_policy {
- WL1271_ACX_ACK_POLICY_LEGACY = 0,
- WL1271_ACX_ACK_POLICY_NO_ACK = 1,
- WL1271_ACX_ACK_POLICY_BLOCK = 2,
-};
-
-#define WL1271_ACX_TID_COUNT 7
-
struct acx_tid_config {
struct acx_header header;
u8 queue_id;
@@ -924,9 +892,6 @@ struct acx_frag_threshold {
u8 padding[2];
} __attribute__ ((packed));
-#define WL1271_ACX_TX_COMPL_TIMEOUT 5
-#define WL1271_ACX_TX_COMPL_THRESHOLD 5
-
struct acx_tx_config_options {
struct acx_header header;
u16 tx_compl_timeout; /* msec */
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index c7a8a64..f05bd77 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -626,9 +626,9 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
cmd->len = cpu_to_le16(buf_len);
cmd->template_type = template_id;
- cmd->enabled_rates = ACX_RATE_MASK_UNSPECIFIED;
- cmd->short_retry_limit = ACX_RATE_RETRY_LIMIT;
- cmd->long_retry_limit = ACX_RATE_RETRY_LIMIT;
+ cmd->enabled_rates = wl->conf.tx.rc_conf.enabled_rates;
+ cmd->short_retry_limit = wl->conf.tx.rc_conf.short_retry_limit;
+ cmd->long_retry_limit = wl->conf.tx.rc_conf.long_retry_limit;
if (buf)
memcpy(cmd->template_data, buf, buf_len);
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index 8bf8bff..3c5ce31 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -255,9 +255,196 @@ struct conf_rx_settings {
u8 queue_type;
};
+#define CONF_TX_MAX_RATE_CLASSES 8
+
+#define CONF_TX_RATE_MASK_UNSPECIFIED 0
+#define CONF_TX_RATE_MASK_ALL 0x1eff
+#define CONF_TX_RATE_RETRY_LIMIT 10
+
+struct conf_tx_rate_class {
+
+ /*
+ * The rates enabled for this rate class.
+ *
+ * Range: CONF_HW_BIT_RATE_* bit mask
+ */
+ u32 enabled_rates;
+
+ /*
+ * The dot11 short retry limit used for TX retries.
+ *
+ * Range: u8
+ */
+ u8 short_retry_limit;
+
+ /*
+ * The dot11 long retry limit used for TX retries.
+ *
+ * Range: u8
+ */
+ u8 long_retry_limit;
+
+ /*
+ * Flags controlling the attributes of TX transmission.
+ *
+ * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
+ * when the total valid per-rate attempts have
+ * been exhausted; otherwise transmissions
+ * will continue at the lowest available rate
+ * until the appropriate one of the
+ * short_retry_limit, long_retry_limit,
+ * dot11_max_transmit_msdu_life_time, or
+ * max_tx_life_time, is exhausted.
+ * 1: Preamble Override - indicates if the preamble type
+ * should be used in TX.
+ * 2: Preamble Type - the type of the preamble to be used by
+ * the policy (0 - long preamble, 1 - short preamble.
+ */
+ u8 aflags;
+};
+
+#define CONF_TX_MAX_AC_COUNT 4
+
+/* Slot number setting to start transmission at PIFS interval */
+#define CONF_TX_AIFS_PIFS 1
+/* Slot number setting to start transmission at DIFS interval normal
+ * DCF access */
+#define CONF_TX_AIFS_DIFS 2
+
+
+enum conf_tx_ac {
+ CONF_TX_AC_BE = 0, /* best effort / legacy */
+ CONF_TX_AC_BK = 1, /* background */
+ CONF_TX_AC_VI = 2, /* video */
+ CONF_TX_AC_VO = 3, /* voice */
+ CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */
+ CONF_TX_AC_ANY_TID = 0x1f
+};
+
+struct conf_tx_ac_category {
+ /*
+ * The AC class identifier.
+ *
+ * Range: enum conf_tx_ac
+ */
+ u8 ac;
+
+ /*
+ * The contention window minimum size (in slots) for the access
+ * class.
+ *
+ * Range: u8
+ */
+ u8 cw_min;
+
+ /*
+ * The contention window maximum size (in slots) for the access
+ * class.
+ *
+ * Range: u8
+ */
+ u16 cw_max;
+
+ /*
+ * The AIF value (in slots) for the access class.
+ *
+ * Range: u8
+ */
+ u8 aifsn;
+
+ /*
+ * The TX Op Limit (in microseconds) for the access class.
+ *
+ * Range: u16
+ */
+ u16 tx_op_limit;
+};
+
+#define CONF_TX_MAX_TID_COUNT 7
+
+enum {
+ CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
+ CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
+ CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
+};
+
+enum {
+ CONF_PS_SCHEME_LEGACY = 0,
+ CONF_PS_SCHEME_UPSD_TRIGGER = 1,
+ CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
+ CONF_PS_SCHEME_SAPSD = 3,
+};
+
+enum {
+ CONF_ACK_POLICY_LEGACY = 0,
+ CONF_ACK_POLICY_NO_ACK = 1,
+ CONF_ACK_POLICY_BLOCK = 2,
+};
+
+
+struct conf_tx_tid {
+ u8 queue_id;
+ u8 channel_type;
+ u8 tsid;
+ u8 ps_scheme;
+ u8 ack_policy;
+ u32 apsd_conf[2];
+};
+
+struct conf_tx_settings {
+ /*
+ * The TX ED value for TELEC Enable/Disable.
+ *
+ * Range: 0, 1
+ */
+ u8 tx_energy_detection;
+
+ /*
+ * Configuration for rate classes for TX (currently only one
+ * rate class supported.)
+ */
+ struct conf_tx_rate_class rc_conf;
+
+ /*
+ * Configuration for access categories for TX rate control.
+ */
+ u8 ac_conf_count;
+ struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
+
+ /*
+ * Configuration for TID parameters.
+ */
+ u8 tid_conf_count;
+ struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
+
+ /*
+ * The TX fragmentation threshold.
+ *
+ * Range: u16
+ */
+ u16 frag_threshold;
+
+ /*
+ * Max time in msec the FW may delay frame TX-Complete interrupt.
+ *
+ * Range: u16
+ */
+ u16 tx_compl_timeout;
+
+ /*
+ * Completed TX packet count which requires to issue the TX-Complete
+ * interrupt.
+ *
+ * Range: u16
+ */
+ u16 tx_compl_threshold;
+
+};
+
struct conf_drv_settings {
struct conf_sg_settings sg;
struct conf_rx_settings rx;
+ struct conf_tx_settings tx;
};
#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index 5738263..a3fc4c9 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -382,7 +382,7 @@ int wl1271_hw_init(struct wl1271 *wl)
goto out_free_memmap;
/* Configure TX rate classes */
- ret = wl1271_acx_rate_policies(wl, ACX_RATE_MASK_ALL);
+ ret = wl1271_acx_rate_policies(wl, CONF_TX_RATE_MASK_ALL);
if (ret < 0)
goto out_free_memmap;
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index d04706d..35d0b7e 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -73,6 +73,109 @@ static void wl1271_conf_init(struct wl1271 *wl)
.irq_pkt_threshold = USHORT_MAX,
.irq_timeout = 5,
.queue_type = CONF_RX_QUEUE_TYPE_LOW_PRIORITY,
+ },
+ .tx = {
+ .tx_energy_detection = 0,
+ .rc_conf = {
+ .enabled_rates =
+ CONF_TX_RATE_MASK_UNSPECIFIED,
+ .short_retry_limit = 10,
+ .long_retry_limit = 10,
+ .aflags = 0
+ },
+ .ac_conf_count = 4,
+ .ac_conf = {
+ [0] = {
+ .ac = CONF_TX_AC_BE,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = 3,
+ .tx_op_limit = 0,
+ },
+ [1] = {
+ .ac = CONF_TX_AC_BK,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = 7,
+ .tx_op_limit = 0,
+ },
+ [2] = {
+ .ac = CONF_TX_AC_VI,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = CONF_TX_AIFS_PIFS,
+ .tx_op_limit = 3008,
+ },
+ [3] = {
+ .ac = CONF_TX_AC_VO,
+ .cw_min = 15,
+ .cw_max = 63,
+ .aifsn = CONF_TX_AIFS_PIFS,
+ .tx_op_limit = 1504,
+ },
+ },
+ .tid_conf_count = 7,
+ .tid_conf = {
+ [0] = {
+ .queue_id = 0,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [1] = {
+ .queue_id = 1,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [2] = {
+ .queue_id = 2,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [3] = {
+ .queue_id = 3,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [4] = {
+ .queue_id = 4,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [5] = {
+ .queue_id = 5,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ },
+ [6] = {
+ .queue_id = 6,
+ .channel_type = CONF_CHANNEL_TYPE_DCF,
+ .tsid = CONF_TX_AC_BE,
+ .ps_scheme = CONF_PS_SCHEME_LEGACY,
+ .ack_policy = CONF_ACK_POLICY_LEGACY,
+ .apsd_conf = {0, 0},
+ }
+ },
+ .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD,
+ .tx_compl_timeout = 5,
+ .tx_compl_threshold = 5
}
};
--
1.5.6.5
^ permalink raw reply related
* [PATCH 00/22] Third batch of patches for wl1271
From: Luciano Coelho @ 2009-10-13 9:47 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
Hi,
Here is the third batch of patches to be included in wireless-testing, the
final batch of this series. The last patch in this patch fixes the filter
configuration as proposed by Johannes. There are some sparse errors in the
code (also reported by Johannes), which I'll fix next.
Currently the driver cannot associate correctly. The reason for this is that
the wl1271 firmware requires the BSSID when "joining". From the current
mac80211 API, we only get the BSSID after the association has succeeded and we
need the join command to change channels. Anyway, I'll continue discussing
this issue in a separate thread.
Cheers,
Luca.
Juuso Oikarinen (16):
wl1271: Workaround for reference clock setting on boot.
wl1271: Add structure for firmware configuration values
wl1271: Add config structure for RX path parameters
wl1271: Add config structure for TX path parameters
wl1271: Add config structure for connection management parameters
wl1271: Add config structure for FW init parameters
wl1271: Move default FW config struct away from stack
wl1271: Fix IRQ enable handling on FW init failure
wl1271: Implement beacon early termination support
wl1271: Remove busy-word checking
wl1271: Fix multicast list handling
wl1271: Fix event handling mechanism
wl1271: Support for IPv4 ARP filtering
wl1271: Remove unnecessary rx_descriptor memory allocation
wl1271: Correct memory handling for FW boot
wl1271: Fix filter configuration
Luciano Coelho (1):
wl1271: make sure PS is disabled in PLT
Teemu Paasikivi (5):
wl1271: Added 5 GHz parameters for wl1273
wl1271: Scan only enabled channels
wl1271: Added support to scan on 5 GHz band
wl1271: Added 5 GHz support to join and rx
wl1271: Checking of rx descriptor status fixed
drivers/net/wireless/wl12xx/wl1271.h | 44 ++-
drivers/net/wireless/wl12xx/wl1271_acx.c | 284 ++++++----
drivers/net/wireless/wl12xx/wl1271_acx.h | 269 ++-------
drivers/net/wireless/wl12xx/wl1271_boot.c | 17 +-
drivers/net/wireless/wl12xx/wl1271_cmd.c | 172 ++++--
drivers/net/wireless/wl12xx/wl1271_cmd.h | 14 +-
drivers/net/wireless/wl12xx/wl1271_conf.h | 911 ++++++++++++++++++++++++++++
drivers/net/wireless/wl12xx/wl1271_event.c | 43 +-
drivers/net/wireless/wl12xx/wl1271_event.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_init.c | 139 +++--
drivers/net/wireless/wl12xx/wl1271_init.h | 51 +-
drivers/net/wireless/wl12xx/wl1271_main.c | 783 +++++++++++++++++++-----
drivers/net/wireless/wl12xx/wl1271_ps.c | 10 +
drivers/net/wireless/wl12xx/wl1271_reg.h | 44 --
drivers/net/wireless/wl12xx/wl1271_rx.c | 53 ++-
drivers/net/wireless/wl12xx/wl1271_spi.c | 6 +-
16 files changed, 2114 insertions(+), 728 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl1271_conf.h
^ permalink raw reply
* Re: [ipw3945-devel] [PATCH 02/17 v2.6.32] iwl3945: update iwl3945_apm_init()
From: Vedran Rodic @ 2009-10-13 9:11 UTC (permalink / raw)
To: reinette chatre
Cc: John W. Linville, Cahill, Ben M, linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net
In-Reply-To: <1255377460.30637.150.camel@rc-desk>
Thank you all very much.
I don't have sophisticated power measurement devices to confirm these
fixes, and I've only tried patch 2/17, reporting back it on bug
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2094 that the
problem is still not fixed with this patch applied only.
I originally tested temperature difference near the WLAN card
location. It's hard to compare overall laptop power usage between
Windows XP and Linux because there are other drivers that can make a
difference too.
Unfortunately, I don't have Windows XP anymore to compare since I've
upgraded my hard drive, but I'll be able to test further fixes by
watching the /sys/class/power_supply/BAT0/power_now on my X60s.
Can you describe your testing methodoloy? Are you testing just the
mini PCI card usage? Are you comparing to Windows XP or Vista drivers?
On Mon, Oct 12, 2009 at 9:57 PM, reinette chatre
<reinette.chatre@intel.com> wrote:
> Hi John,
>
> On Mon, 2009-10-12 at 11:59 -0700, John W. Linville wrote:
>> On Fri, Oct 09, 2009 at 01:20:18PM -0700, Reinette Chatre wrote:
>> > From: Ben Cahill <ben.m.cahill@intel.com>
>> >
>> > Update iwl3945_apm_init() to set up device registers in sequence most recently
>> > recommended by factory.
>> >
>> > Add resets for APMG interrupts and radio chip, formerly done only in
>> > iwl3945_apm_reset(); moving them here assures that apm_init() will do
>> > a complete job of preparing hardware not only after platform boot,
>> > but also after apm_stop() has executed (due to rfkill, ifconfig down,
>> > driver unload, etc.). This is in preparation to completely remove apm_reset().
>> >
>> > Add some comments.
>> >
>> > Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
>> > Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
>>
>> Is this actually a regression? Can you provide a reference to the bug report?
>
> This is something we discovered in the lab when we connected power
> measurement tools to the device when the interface was down. In this
> scenario the device is using a lot of power. This is not a regression
> from the previous kernel version, it is something that was broken for a
> while and only recently discovered.
>
> Patches 2/17 and 3/17 address this issue and the above comment applies
> to both.
>
> We are still looking into issues related to this discovery and you may
> see more fixes for this problem.
>
> Reinette
>
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Ipw3945-devel mailing list
> Ipw3945-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ipw3945-devel
>
^ permalink raw reply
* cfg80211 / libertas: an unusual race
From: Holger Schurig @ 2009-10-13 8:55 UTC (permalink / raw)
To: linux-wireless
So far I can connect via cfg80211, and therefore I now want to
disconnect as well.
The code in my driver is:
static int lbs_cfg_deauth(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_deauth_request *req,
void *cookie)
{
struct lbs_private *priv = wiphy_priv(wiphy);
struct cmd_ds_802_11_deauthenticate cmd;
lbs_deb_enter(LBS_DEB_CFG80211);
memset(&cmd, 0, sizeof(cmd));
cmd.hdr.size = cpu_to_le16(sizeof(cmd));
memcpy(cmd.macaddr, &req->bss->bssid, ETH_ALEN);
cmd.reasoncode = cpu_to_le16(req->reason_code);
__lbs_cmd_async(priv, CMD_802_11_DEAUTHENTICATE,
&cmd.hdr, sizeof(cmd),
lbs_cfg_ret_deauth, 0);
return 0;
}
static int lbs_cfg_ret_deauth(struct lbs_private *priv, unsigned long dummy,
struct cmd_header *resp)
{
struct cmd_ds_802_11_deauthenticate *deauth_resp = (void *)resp;
struct ieee80211_mgmt mgmt;
lbs_deb_enter(LBS_DEB_CFG80211);
/* Fake a management frame */
memset(&mgmt, 0, sizeof(mgmt));
memcpy(mgmt.bssid, deauth_resp->macaddr, ETH_ALEN);
/* Note: .sa / .da swapped */
memcpy(mgmt.da, deauth_resp->macaddr, ETH_ALEN);
memcpy(mgmt.sa, priv->current_addr, ETH_ALEN);
mgmt.u.deauth.reason_code = le16_to_cpu(deauth_resp->reasoncode);
cfg80211_send_deauth(priv->dev, (u8 *)&mgmt, sizeof(mgmt),
(void *)dummy);
lbs_deb_leave(LBS_DEB_CFG80211);
return 0;
}
A reader could *think* this happens:
1. lbs_cfg_deauth() enters
2. lbs_cfg_deauth sends CMD_802_11_DEAUTHENTICATE to firmware
asynchronously via __lbs_cmd_async() and specifies
a lbs_cfg_ret_deauth() as callback
3. a) lbs_cfg_deauth() leaves
3. b) cfg80211 does something related to disconnecting
4. firmware responds with an IRQ
5. libertas get's response and calls our callback
6. lbs_cfg_ret_deauth() enters
7. a) cfg80211_send_deauth() get's called
7. b) cfg80211 does something related to disconnecting
But that is not what happens, and steps "3. b)" and
"7. b)" are executed in this sequence with an ath5k
driver.
In step "2.", __lbs_cmd_async() causes a preemption on my device
(CONFIG_PREEMPT). That changes the sequence of cfg80211
jobs. This is what really happens:
1. lbs_cfg_deauth() enters
2. a) lbs_cfg_deauth sends CMD_802_11_DEAUTHENTICATE to firmware
via __lbs_cmd_async()
2. b) IMPORTANT CHANGE: Linux preempts!
4. firmware responds with an IRQ
5. libertas get's response and calls our callback
6. lbs_cfg_ret_deauth() enters
7. a) cfg80211_send_deauth() get's called
7. b) cfg80211 does something related to disconnecting
7. C) IMPORTANT CHANGE: preemption now schedules the
original task, and thus this happens only now:
3. a) lbs_cfg_deauth() leaves
3. b) cfg80211 does something related to disconnecting
Now at step "7. b)" the function __cfg80211_disconnected()
clears wdev->current_bss to NULL.
But at step "3. b)", which now happens at a later time,
wdev_current_bss is no longer set. This triggers a
WARN_ON(!done) warning in __cfg80211_send_deauth(),
file net/wireless/mlme.c
Would it be O.K. to simply remove the WARN_ON(!done) ?
After all, wdev>current_bss was put'ted and cleared correctly.
--
http://www.holgerschurig.de
^ permalink raw reply
* Re: [PATCH V3] iwlwifi: use paged Rx
From: Zhu Yi @ 2009-10-13 8:19 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <20091012142002.GA2687@dhcp-lab-161.englab.brq.redhat.com>
On Mon, 2009-10-12 at 22:20 +0800, Stanislaw Gruszka wrote:
> On Fri, Oct 09, 2009 at 05:19:45PM +0800, Zhu Yi wrote:
> > This switches the iwlwifi driver to use paged skb from linear skb for Rx
> > buffer. So that it relieves some Rx buffer allocation pressure for the
> > memory subsystem. Currently iwlwifi (4K for 3945) requests 8K bytes for
> > Rx buffer. Due to the trailing skb_shared_info in the skb->data,
> > alloc_skb() will do the next order allocation, which is 16K bytes. This
> > is suboptimal and more likely to fail when the system is under memory
> > usage pressure. Switching to paged Rx skb lets us allocate the RXB
> > directly by alloc_pages(), so that only order 1 allocation is required.
>
> [snip]
>
> > Finally, mac80211 doesn't support paged Rx yet. So we linearize the skb
> > for all the management frames and software decryption or defragmentation
> > required data frames before handed to mac80211. For all the other frames,
> > we __pskb_pull_tail 64 bytes in the linear area of the skb for mac80211
> > to handle them properly.
>
> This seems to be big overhead, but since there is no way to avoid it ...
Which case? The linear one is the same as the current implementation.
For __pskb_pull_tail, it is guaranteed no new buffer will be allocated.
> If we know that we need to linearize we can alloc as big skb as needed,
> otherwise skb_linearize() need to do reallocation.
OK.
> Can we also remove IWL_LINK_HDR_MAX and do __pskb_pull_tail based on
> real header(s) size ?
The wireless header is a variant depending on type. And mac80211 also
needs to play with LLC and IP header (for qos). So I used the max
possible frame buffer (128 or probably 64 is enough?) mac80211 is going
to use for none software decryption and defragmentation data frames.
> Or.
>
> If we decide to do alloc_skb(IWL_LINK_HDR_MAX, gfp_flags) can this be
> done together with skb_add_rx_frag() in iwl_rx_allocate(), to offload
> this interrupt context ?
I'm not sure if it's a big gain. This is only a 128 bytes GFP_ATOMIC
allocation anyway. Other driver like niu also does this.
> > + le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG)
>
> Minor optimization:
> hdr->seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)
The original code returns the fragment index. The change makes it
optimized on LE arches. But is less readable.
> > struct iwl_rx_mem_buffer {
> > - dma_addr_t real_dma_addr;
> > - dma_addr_t aligned_dma_addr;
> > - struct sk_buff *skb;
> > + dma_addr_t page_dma;
> > + struct page *page;
> > struct list_head list;
> > };
> >
> > +#define rxb_addr(r) page_address(r->page)
>
> Since we mostly use pointer, perhaps better would be save address of page
> in iwl_rx_mem_buffer, and use virt_to_page where struct page is needed.
Both should be fine. But I'd like to access the virtual address of
rxb->page with a micro like rxb_addr than something like "pkt =
rxb->virt_page" directly.
> > net_ratelimit())
> > - IWL_CRIT(priv, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n",
> > + IWL_CRIT(priv, "Failed to alloc_pages with %s. Only %u free buffers remaining.\n",
> > priority == GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL",
>
> priority can not be equal GFP_ATOMIC if was or'ed with __GFP_COMP or __GFP_NOWARN
Good catch. The bug also exists in the original code. Will send out a
separated patch to fix.
Thanks,
-yi
^ permalink raw reply
* [PATCH] rt2800pci.c : more ids
From: Xose Vazquez Perez @ 2009-10-13 8:05 UTC (permalink / raw)
To: linux-wireless, users, IvDoorn
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
hi,
stolen from windows inf file(09/05/2009, 1.04.07.0000)
0x1814, 0x3060
-thanks-
regards,
--
«Allá muevan feroz guerra, ciegos reyes por un palmo más de tierra;
que yo aquí tengo por mío cuanto abarca el mar bravío, a quien nadie
impuso leyes. Y no hay playa, sea cualquiera, ni bandera de esplendor,
que no sienta mi derecho y dé pecho a mi valor.»
[-- Attachment #2: new_id-2800pci.diff --]
[-- Type: text/plain, Size: 722 bytes --]
diff -Nuar o/drivers/net/wireless/rt2800pci.c n/drivers/net/wireless/rt2800pci.c
--- o/drivers/net/wireless/rt2800pci.c 2009-10-13 09:57:37.523379731 +0200
+++ n/drivers/net/wireless/rt2800pci.c 2009-10-13 09:56:53.169379162 +0200
@@ -3237,6 +3237,7 @@
{ PCI_DEVICE(0x1814, 0x0681), PCI_DEVICE_DATA(&rt2800pci_ops) },
{ PCI_DEVICE(0x1814, 0x0701), PCI_DEVICE_DATA(&rt2800pci_ops) },
{ PCI_DEVICE(0x1814, 0x0781), PCI_DEVICE_DATA(&rt2800pci_ops) },
+ { PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) },
{ PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) },
{ PCI_DEVICE(0x1814, 0x3090), PCI_DEVICE_DATA(&rt2800pci_ops) },
{ PCI_DEVICE(0x1814, 0x3091), PCI_DEVICE_DATA(&rt2800pci_ops) },
^ permalink raw reply
* Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
From: Hin-Tak Leung @ 2009-10-13 2:32 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: lrodriguez, linux-wireless
In-Reply-To: <1255382358-20760-4-git-send-email-hauke@hauke-m.de>
On Mon, Oct 12, 2009 at 10:19 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) can not be true in
> compat-2.6.28.h. The definitions are not needed in compat-wireless any
> more. Removing this does not break compiling with mainline kernel 2.6.25
> to 2.6.32
Hmm, I am not questioning your decision for removing unused code, but
if they are genuinely unused, why were they introduced in the first
place?
As a side comment, while it is unusual (compared to the usual <
version_X), it is a possible scenario for compat-X.h to have codes
that conditions on LINUX_VERSION_CODE >= version_X - and if memory
serves the bits you are removing were added only recently; and they
looks like what they are (i.e. public kernel symbols became
private-static during 2.6.27<->2.6.28 or the other way round).
I guess I am looking for a reason why they were added in the first
place, if they serve no purpose.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
> compat/compat-2.6.28.h | 24 ------------------------
> 1 files changed, 0 insertions(+), 24 deletions(-)
>
> diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
> index 90d080c..dd223c6 100644
> --- a/compat/compat-2.6.28.h
> +++ b/compat/compat-2.6.28.h
> @@ -146,22 +146,6 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
> }
> } /* From include/linux/skbuff.h */
>
> -struct module;
> -struct tracepoint;
> -
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
> -struct tracepoint {
> - const char *name; /* Tracepoint name */
> - int state; /* State. */
> - void **funcs;
> -} __attribute__((aligned(32))); /*
> - * Aligned on 32 bytes because it is
> - * globally visible and gcc happily
> - * align these on the structure size.
> - * Keep in sync with vmlinux.lds.h.
> - */
> -#endif
> -
> #ifndef DECLARE_TRACE
>
> #define TP_PROTO(args...) args
> @@ -181,17 +165,9 @@ struct tracepoint {
> return -ENOSYS; \
> }
>
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
> -#define DEFINE_TRACE(name)
> -#endif
> #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
> #define EXPORT_TRACEPOINT_SYMBOL(name)
>
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
> -static inline void tracepoint_update_probe_range(struct tracepoint *begin,
> - struct tracepoint *end)
> -{ }
> -#endif
>
> #endif
>
> --
> 1.6.2.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: 2.6.31.[12] ath5k regression
From: Bob Copeland @ 2009-10-12 23:54 UTC (permalink / raw)
To: Richard Zidlicky; +Cc: linux-wireless
In-Reply-To: <20091012202316.GA8310@linux-m68k.org>
On Mon, Oct 12, 2009 at 10:23:16PM +0200, Richard Zidlicky wrote:
> it works like in mainline and fails.
Huh, well it should be equivalent to your patch, so I'm stumped
as to why.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply
* Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
From: Greg KH @ 2009-10-12 23:26 UTC (permalink / raw)
To: James Bottomley
Cc: Ingo Molnar, Linus Torvalds, Theodore Tso, Andrew Morton,
linux-scsi, linux-kernel, Jing Huang, netdev, linux-wireless
In-Reply-To: <1255362186.2850.348.camel@localhost.localdomain>
On Mon, Oct 12, 2009 at 10:43:06AM -0500, James Bottomley wrote:
> If you want to make this a mandatory path for old drivers, then, I think
> it's far too rigid, yes. There's a huge amount of danger to changing
> working drivers simply on grounds of code cleanup and that danger
> increases exponentially as they get older and the hardware gets rarer.
> Look at what happened to the initio driver in 2008 for instance. That
> was cleaned up by Alan Cox, no mean expert in the field, with the
> assistance of a tester with the actual card, so basically a textbook
> operation. However, a bug crept in during this process that wasn't
> spotted by the tester. When it was spotted (bug report ~6 months later)
> the original tester wasn't available and code inspection across the
> cleanup was very hard. Fortunately, the reporter was motivated to track
> down and patch the driver, so it worked out all right in the end, but a
> lot of bug reporters aren't so capable (or so motivated). Plus most
> clean up patches for old hardware tend only to be compile tested, so the
> potential for bugs is far greater.
I understand the potential for bugs, and am not saying to do this for
all drivers, so it is not mandatory at all.
I have just received a bunch of people asking me if we can use
drivers/staging/ to get stuff that is known broken, or has other
problems (style issues[1]), out into an area where people know it needs
to be fixed up otherwise it will be dropped.
thanks,
greg k-h
[1] No, floppy.c doesn't count, no matter how much people might want it
to :)
^ permalink raw reply
* Re: Moving drivers into staging (was Re: [GIT PULL] SCSI fixes for 2.6.32-rc3)
From: Greg KH @ 2009-10-12 23:24 UTC (permalink / raw)
To: Ingo Molnar
Cc: James Bottomley, Linus Torvalds, Theodore Tso, Andrew Morton,
linux-scsi, linux-kernel, Jing Huang, netdev, linux-wireless
In-Reply-To: <20091012154244.GA13323@elte.hu>
On Mon, Oct 12, 2009 at 05:42:44PM +0200, Ingo Molnar wrote:
> Hm, i think i even gave drivers/staging/ its name?
Yes you did, and I appreciate it :)
> > [...] It seems that I'm the only one that has the ability to drop
> > drivers out of the kernel tree, which is a funny situation :)
>
> You are the only one who has the ability to send a warning shot towards
> drivers _without hurting users_, and by moving it into the focus of a
> team of cleanup oriented developers.
>
> I think that's an important distinction ;-)
Good point.
> > In thinking about this a lot more, I don't really mind it. If people
> > want to push stuff out of "real" places in the kernel, into
> > drivers/staging/ and give the original authors and maintainers notice
> > about what is going on, _and_ provide a TODO file for what needs to
> > happen to get the code back into the main portion of the kernel tree,
> > then I'll be happy to help out with this and manage it.
> >
> > I think a 6-9 month window (basically 3 kernel releases) should be
> > sufficient time to have a driver that has been in drivers/staging/ be
> > cleaned up enough to move back into the main kernel tree. If not, it
> > could be easily dropped.
> >
> > Any objections to this?
>
> Sounds excellent to me!
Great, I'll await the patches to move stuff to drivers/staging/ now.
Wireless developers, warm up your editors :)
thanks,
greg k-h
^ permalink raw reply
* Re: [Bug #14372] Wireless not working after suspend-resume
From: Rafael J. Wysocki @ 2009-10-12 21:55 UTC (permalink / raw)
To: Fabio Comolli
Cc: Linux Kernel Mailing List, Kernel Testers List, Johannes Berg,
John W. Linville, netdev, Linux Wireless List
In-Reply-To: <b637ec0b0910121148g34f46481n1d5d4edb67b0ac55@mail.gmail.com>
On Monday 12 October 2009, Fabio Comolli wrote:
> Still present with -rc4.
>
> Error is:
>
> [ 690.547660] wlan0: direct probe to AP 00:11:95:09:2c:e0 (try 1)
> [ 690.550064] wlan0: direct probe responded
> [ 690.550074] wlan0: authenticate with AP 00:11:95:09:2c:e0 (try 1)
> [ 690.551629] wlan0: authenticated
> [ 690.551663] wlan0: associate with AP 00:11:95:09:2c:e0 (try 1)
> [ 690.553289] wlan0: RX AssocResp from 00:11:95:09:2c:e0 (capab=0x451
> status=12 aid=1)
> [ 690.553298] wlan0: AP denied association (code=12)
>
> rfkill-ing the device off and then on fixes the problem.
Thanks for the update.
Rafael
^ permalink raw reply
* Re: 2.6.32-rc4: Reported regressions 2.6.30 -> 2.6.31
From: Rafael J. Wysocki @ 2009-10-12 21:48 UTC (permalink / raw)
To: Andrew Patterson
Cc: Linux Kernel Mailing List, Andrew Morton, Linus Torvalds,
Natalie Protasevich, Kernel Testers List, Network Development,
Linux ACPI, Linux PM List, Linux SCSI List, Linux Wireless List,
DRI
In-Reply-To: <1255377529.9544.63.camel@bluto.andrew>
On Monday 12 October 2009, Andrew Patterson wrote:
> On Mon, 2009-10-12 at 00:41 +0200, Rafael J. Wysocki wrote:
> >
> >
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14309
> > Subject : MCA on hp rx8640
> > Submitter : Andrew Patterson <andrew.patterson@hp.com>
> > Date : 2009-09-29 17:20 (13 days old)
> > First-Bad-Commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db8be50c4307dac2b37305fc59c8dc0f978d09ea
> > References : http://www.spinics.net/lists/linux-usb/msg22799.html
> >
>
> Linus fixed this one with d93a8f829fe1d2f3002f2c6ddb553d12db420412. It
> also looks like a duplicate of
> http://bugzilla.kernel.org/show_bug.cgi?id=14374
Thanks, I closed #14309 as a duplicate of #14374 that's already closed.
Best,
Rafael
^ permalink raw reply
* Re: 2.6.32-rc4: Reported regressions 2.6.30 -> 2.6.31
From: Rafael J. Wysocki @ 2009-10-12 21:46 UTC (permalink / raw)
To: Frederik Deweerdt
Cc: Linux Kernel Mailing List, Andrew Morton, Linus Torvalds,
Natalie Protasevich, Kernel Testers List, Network Development,
Linux ACPI, Linux PM List, Linux SCSI List, Linux Wireless List,
DRI
In-Reply-To: <20091012122201.GA31282@gambetta>
On Monday 12 October 2009, Frederik Deweerdt wrote:
> Hi Rafael,
>
> On Mon, Oct 12, 2009 at 12:41:30AM +0200, Rafael J. Wysocki wrote:
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14185
> > Subject : Oops in driversbasefirmware_class
> > Submitter : <lars_ericsson@telia.com>
> > Date : 2009-09-17 05:09 (25 days old)
> > First-Bad-Commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e03a201bbe8137487f340d26aa662110e324b20
> >
> >
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14253
> > Subject : Oops in driversbasefirmware_class
> > Submitter : Lars Ericsson <Lars_Ericsson@telia.com>
> > Date : 2009-09-16 20:44 (26 days old)
> > References : http://lkml.org/lkml/2009/9/16/461
> > Handled-By : Frederik Deweerdt <frederik.deweerdt@xprog.eu>
> > Patch : http://patchwork.kernel.org/patch/49914/
> >
> Those two are refering to the same bug.
Thanks, I closed #14185 as a duplicate of #14253.
Best,
Rafael
^ permalink raw reply
* Re: 2.6.32-rc4: Reported regressions 2.6.30 -> 2.6.31
From: Rafael J. Wysocki @ 2009-10-12 21:43 UTC (permalink / raw)
To: Larry Finger
Cc: Linux Kernel Mailing List, Andrew Morton, Linus Torvalds,
Natalie Protasevich, Kernel Testers List, Network Development,
Linux ACPI, Linux PM List, Linux SCSI List, Linux Wireless List,
DRI
In-Reply-To: <4AD26926.9030306@lwfinger.net>
On Monday 12 October 2009, Larry Finger wrote:
> On 10/11/2009 05:41 PM, Rafael J. Wysocki wrote:
> > [Note:
> > 10 new reports in the last 10 days, but fortunately we're fixing them faster
> > than they're being reported.]
>
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14181
> > Subject : b43 causes panic at ifconfig down / shutdown
> > Submitter : Jeremy Huddleston <jeremyhu@freedesktop.org>
> > Date : 2009-09-15 18:34 (27 days old)
>
> A patch to fix this one is in the hands of the OP. It should be tested
> within the next couple of days.
Great, thanks for the update.
Rafael
^ permalink raw reply
* [PATCH 8/9] [compat-2.6] refresh patches
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1255382358-20760-1-git-send-email-hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
compat/patches/01-netdev.patch | 42 ++++++++++----------
compat/patches/08-rename-iwl4965-config.patch | 2 +-
compat/patches/09-threaded-irq.patch | 4 +-
.../patches/10-add-wext-handlers-to-netdev.patch | 2 +-
4 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/compat/patches/01-netdev.patch b/compat/patches/01-netdev.patch
index 6ec1827..dd2e33d 100644
--- a/compat/patches/01-netdev.patch
+++ b/compat/patches/01-netdev.patch
@@ -102,7 +102,7 @@ without creating a headache on maintenance of the pathes.
retval = rndis_set_oid(usbdev, OID_GEN_CURRENT_PACKET_FILTER, &tmp,
--- a/net/mac80211/iface.c 2009-09-02 14:09:58.557123328 -0700
+++ b/net/mac80211/iface.c 2009-09-02 14:10:02.137093336 -0700
-@@ -642,6 +642,7 @@
+@@ -644,6 +644,7 @@
WARN_ON(flushed);
}
@@ -110,7 +110,7 @@ without creating a headache on maintenance of the pathes.
static const struct net_device_ops ieee80211_dataif_ops = {
.ndo_open = ieee80211_open,
.ndo_stop = ieee80211_stop,
-@@ -661,11 +662,22 @@
+@@ -663,11 +664,22 @@
.ndo_change_mtu = ieee80211_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
};
@@ -133,7 +133,7 @@ without creating a headache on maintenance of the pathes.
dev->destructor = free_netdev;
}
-@@ -680,7 +692,11 @@
+@@ -682,7 +694,11 @@
/* and set some type-dependent values */
sdata->vif.type = type;
@@ -145,7 +145,7 @@ without creating a headache on maintenance of the pathes.
sdata->wdev.iftype = type;
/* only monitor differs */
-@@ -703,7 +719,11 @@
+@@ -705,7 +721,11 @@
break;
case NL80211_IFTYPE_MONITOR:
sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
@@ -157,7 +157,7 @@ without creating a headache on maintenance of the pathes.
sdata->u.mntr_flags = MONITOR_FLAG_CONTROL |
MONITOR_FLAG_OTHER_BSS;
break;
-@@ -774,6 +794,8 @@
+@@ -776,6 +796,8 @@
return -ENOMEM;
dev_net_set(ndev, wiphy_net(local->hw.wiphy));
@@ -166,7 +166,7 @@ without creating a headache on maintenance of the pathes.
ndev->needed_headroom = local->tx_headroom +
4*6 /* four MAC addresses */
+ 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
-@@ -782,6 +804,7 @@
+@@ -784,6 +806,7 @@
- ETH_HLEN /* ethernet hard_header_len */
+ IEEE80211_ENCRYPT_HEADROOM;
ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
@@ -174,7 +174,7 @@ without creating a headache on maintenance of the pathes.
ret = dev_alloc_name(ndev, ndev->name);
if (ret < 0)
-@@ -815,6 +838,10 @@
+@@ -818,6 +841,10 @@
if (ret)
goto fail;
@@ -335,7 +335,7 @@ without creating a headache on maintenance of the pathes.
priv->wireless_data.libipw = priv->ieee;
--- a/drivers/net/wireless/ipw2x00/ipw2200.c 2009-08-20 13:47:07.311291621 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c 2009-08-20 13:47:07.783268230 -0700
-@@ -11624,6 +11624,7 @@
+@@ -11626,6 +11626,7 @@
return NETDEV_TX_OK;
}
@@ -343,7 +343,7 @@ without creating a headache on maintenance of the pathes.
static const struct net_device_ops ipw_prom_netdev_ops = {
.ndo_open = ipw_prom_open,
.ndo_stop = ipw_prom_stop,
-@@ -11632,6 +11633,7 @@
+@@ -11634,6 +11635,7 @@
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
@@ -351,7 +351,7 @@ without creating a headache on maintenance of the pathes.
static int ipw_prom_alloc(struct ipw_priv *priv)
{
-@@ -11652,7 +11654,13 @@
+@@ -11654,7 +11656,13 @@
memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
@@ -365,7 +365,7 @@ without creating a headache on maintenance of the pathes.
priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
-@@ -11680,6 +11688,7 @@
+@@ -11682,6 +11690,7 @@
#endif
@@ -373,7 +373,7 @@ without creating a headache on maintenance of the pathes.
static const struct net_device_ops ipw_netdev_ops = {
.ndo_init = ipw_net_init,
.ndo_open = ipw_net_open,
-@@ -11690,6 +11699,7 @@
+@@ -11692,6 +11701,7 @@
.ndo_change_mtu = libipw_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
@@ -381,7 +381,7 @@ without creating a headache on maintenance of the pathes.
static int __devinit ipw_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
-@@ -11791,7 +11801,15 @@
+@@ -11793,7 +11803,15 @@
priv->ieee->perfect_rssi = -20;
priv->ieee->worst_rssi = -85;
@@ -399,7 +399,7 @@ without creating a headache on maintenance of the pathes.
net_dev->wireless_handlers = &ipw_wx_handler_def;
--- a/drivers/net/wireless/libertas/main.c 2009-10-07 01:42:20.000000000 -0400
+++ b/drivers/net/wireless/libertas/main.c 2009-10-07 01:42:21.000000000 -0400
-@@ -1227,6 +1227,7 @@
+@@ -1229,6 +1229,7 @@
lbs_deb_leave(LBS_DEB_MAIN);
}
@@ -407,7 +407,7 @@ without creating a headache on maintenance of the pathes.
static const struct net_device_ops lbs_netdev_ops = {
.ndo_open = lbs_dev_open,
.ndo_stop = lbs_eth_stop,
-@@ -1237,6 +1238,7 @@
+@@ -1239,6 +1240,7 @@
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
@@ -415,7 +415,7 @@ without creating a headache on maintenance of the pathes.
/**
* @brief This function adds the card. it will probe the
-@@ -1283,7 +1285,16 @@
+@@ -1284,7 +1286,16 @@
wdev->netdev = dev;
priv->dev = dev;
@@ -432,7 +432,7 @@ without creating a headache on maintenance of the pathes.
dev->watchdog_timeo = 5 * HZ;
dev->ethtool_ops = &lbs_ethtool_ops;
#ifdef WIRELESS_EXT
-@@ -1530,6 +1541,7 @@
+@@ -1531,6 +1542,7 @@
EXPORT_SYMBOL_GPL(lbs_stop_card);
@@ -440,7 +440,7 @@ without creating a headache on maintenance of the pathes.
static const struct net_device_ops mesh_netdev_ops = {
.ndo_open = lbs_dev_open,
.ndo_stop = lbs_mesh_stop,
-@@ -1537,6 +1549,7 @@
+@@ -1538,6 +1550,7 @@
.ndo_set_mac_address = lbs_set_mac_address,
.ndo_set_multicast_list = lbs_set_multicast_list,
};
@@ -448,7 +448,7 @@ without creating a headache on maintenance of the pathes.
/**
* @brief This function adds mshX interface
-@@ -1560,7 +1573,15 @@
+@@ -1561,7 +1574,15 @@
mesh_dev->ml_priv = priv;
priv->mesh_dev = mesh_dev;
@@ -464,7 +464,7 @@ without creating a headache on maintenance of the pathes.
mesh_dev->ethtool_ops = &lbs_ethtool_ops;
memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
sizeof(priv->dev->dev_addr));
-@@ -1776,11 +1797,13 @@
+@@ -1777,11 +1798,13 @@
lbs_deb_leave(LBS_DEB_MAIN);
}
@@ -478,7 +478,7 @@ without creating a headache on maintenance of the pathes.
static int lbs_add_rtap(struct lbs_private *priv)
{
-@@ -1801,7 +1824,13 @@
+@@ -1802,7 +1825,13 @@
memcpy(rtap_dev->dev_addr, priv->current_addr, ETH_ALEN);
rtap_dev->type = ARPHRD_IEEE80211_RADIOTAP;
diff --git a/compat/patches/08-rename-iwl4965-config.patch b/compat/patches/08-rename-iwl4965-config.patch
index cbb47a7..b0add39 100644
--- a/compat/patches/08-rename-iwl4965-config.patch
+++ b/compat/patches/08-rename-iwl4965-config.patch
@@ -16,7 +16,7 @@ CONFIG_IWL4965 has to be set to y, to build correctly.
iwlagn-$(CONFIG_IWL5000) += iwl-1000.o
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-10-06 12:57:49.000000000 -0400
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-10-06 12:57:50.000000000 -0400
-@@ -3244,10 +3244,10 @@
+@@ -3239,10 +3239,10 @@
/* Hardware specific file defines the PCI IDs table for that hardware module */
static struct pci_device_id iwl_hw_card_ids[] = {
diff --git a/compat/patches/09-threaded-irq.patch b/compat/patches/09-threaded-irq.patch
index 6658e2f..68689e2 100644
--- a/compat/patches/09-threaded-irq.patch
+++ b/compat/patches/09-threaded-irq.patch
@@ -52,7 +52,7 @@ thread in process context as well.
static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw)
--- a/drivers/net/wireless/b43/b43.h 2009-10-07 01:45:01.000000000 -0400
+++ b/drivers/net/wireless/b43/b43.h 2009-10-07 01:45:02.000000000 -0400
-@@ -831,6 +831,9 @@
+@@ -747,6 +747,9 @@
unsigned int tx_count;
unsigned int rx_count;
#endif
@@ -61,4 +61,4 @@ thread in process context as well.
+#endif
};
- static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw)
+ /*
diff --git a/compat/patches/10-add-wext-handlers-to-netdev.patch b/compat/patches/10-add-wext-handlers-to-netdev.patch
index 9172c20..ec2249c 100644
--- a/compat/patches/10-add-wext-handlers-to-netdev.patch
+++ b/compat/patches/10-add-wext-handlers-to-netdev.patch
@@ -13,7 +13,7 @@ the struct wiphy wireless handler.
--- a/net/wireless/core.c 2009-10-06 13:23:34.000000000 -0400
+++ b/net/wireless/core.c 2009-10-06 13:25:31.000000000 -0400
-@@ -671,6 +671,10 @@
+@@ -672,6 +672,10 @@
wdev->sme_state = CFG80211_SME_IDLE;
mutex_unlock(&rdev->devlist_mtx);
#ifdef CONFIG_CFG80211_WEXT
--
1.6.2.1
^ permalink raw reply related
* [PATCH 9/9] [compat-2.6] Add skb_add_rx_frag to backport.
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1255382358-20760-1-git-send-email-hauke@hauke-m.de>
This is needed by iwl-3945.c.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
compat/compat-2.6.28.c | 10 ++++++++++
compat/compat-2.6.28.h | 3 +++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/compat/compat-2.6.28.c b/compat/compat-2.6.28.c
index 33871a2..c379b19 100644
--- a/compat/compat-2.6.28.c
+++ b/compat/compat-2.6.28.c
@@ -275,4 +275,14 @@ unsigned long round_jiffies_up(unsigned long j)
}
EXPORT_SYMBOL_GPL(round_jiffies_up);
+void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
+ int size)
+{
+ skb_fill_page_desc(skb, i, page, off, size);
+ skb->len += size;
+ skb->data_len += size;
+ skb->truesize += size;
+}
+EXPORT_SYMBOL(skb_add_rx_frag);
+
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) */
diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
index dd223c6..f158cbe 100644
--- a/compat/compat-2.6.28.h
+++ b/compat/compat-2.6.28.h
@@ -178,6 +178,9 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
unsigned long round_jiffies_up(unsigned long j);
+extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
+ int off, int size);
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */
#endif /* LINUX_26_28_COMPAT_H */
--
1.6.2.1
^ permalink raw reply related
* [PATCH 7/9] [compat-2.6] b44 fix
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1255382358-20760-1-git-send-email-hauke@hauke-m.de>
encapsulate $ in bash script
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
scripts/admin-update.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 84f58a4..f85dacf 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -149,7 +149,7 @@ done
# b44 is dependent on ssb, so its has to be rebuilt as well.
DIR="drivers/net"
cp $GIT_TREE/$DIR/b44.[ch] $DIR
-echo "obj-$(CONFIG_B44) += b44.o" > $DIR/Makefile
+echo "obj-\$(CONFIG_B44) += b44.o" > $DIR/Makefile
# Misc
mkdir -p drivers/misc/eeprom/
--
1.6.2.1
^ permalink raw reply related
* [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1255382358-20760-1-git-send-email-hauke@hauke-m.de>
iw_handler.h have changed in kernel 2.6.27.
For older kernel we need some extra backport code.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
compat/compat-2.6.27.h | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/compat/compat-2.6.27.h b/compat/compat-2.6.27.h
index 2543482..8cc6c22 100644
--- a/compat/compat-2.6.27.h
+++ b/compat/compat-2.6.27.h
@@ -163,6 +163,26 @@ static inline void list_splice_tail_init(struct list_head *list,
extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
+/** Include iw_handler.h before we redefine some methods **/
+#include <net/iw_handler.h>
+
+#define iwe_stream_add_value(info, event, value, ends, iwe, event_len) iwe_stream_add_value(event, value, ends, iwe, event_len)
+#define iwe_stream_add_point(info, stream, ends, iwe, extra) iwe_stream_add_point(stream, ends, iwe, extra)
+#define iwe_stream_add_event(info, stream, ends, iwe, event_len) iwe_stream_add_event(stream, ends, iwe, event_len)
+
+/* Flags available in struct iw_request_info */
+#define IW_REQUEST_FLAG_COMPAT 0x0001 /* Compat ioctl call */
+
+static inline int iwe_stream_lcp_len(struct iw_request_info *info)
+{
+#ifdef CONFIG_COMPAT
+ if (info->flags & IW_REQUEST_FLAG_COMPAT)
+ return IW_EV_COMPAT_LCP_LEN;
+#endif
+ return IW_EV_LCP_LEN;
+}
+/** source: include/net/iw_handler.h **/
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
#endif /* LINUX_26_27_COMPAT_H */
--
1.6.2.1
^ permalink raw reply related
* [PATCH 5/9] [compat-2.6] Remove temporary fix
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1255382358-20760-1-git-send-email-hauke@hauke-m.de>
Remove temporary fix from 6dae19ce42f4f6424a37c25f9ec393c1b4bc5c32
it is now in John's tree
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
compat/patches/01-netdev.patch | 35 -----------------------------------
1 files changed, 0 insertions(+), 35 deletions(-)
diff --git a/compat/patches/01-netdev.patch b/compat/patches/01-netdev.patch
index a619a01..6ec1827 100644
--- a/compat/patches/01-netdev.patch
+++ b/compat/patches/01-netdev.patch
@@ -534,38 +534,3 @@ without creating a headache on maintenance of the pathes.
dev->destructor = free_netdev;
ether_setup(dev);
dev->tx_queue_len = 0;
-
-
-Remove this after John picks this up:
-
-From 8fe3f6159c61a7c88a2bd160e8281d62e3978bed Mon Sep 17 00:00:00 2001
-From: Luis R. Rodriguez <lrodriguez@atheros.com>
-Date: Thu, 8 Oct 2009 16:43:57 -0400
-Subject: [PATCH] libertas: remove double assignment of dev->netdev_ops
-
-This came in through the patch titled:
- libertas: first stab at cfg80211 support
-
-I only noticed it because it breaks compat-wireless :)
-
-Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
-Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
----
- drivers/net/wireless/libertas/main.c | 1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
-index e6da1df..87bfd17 100644
---- a/drivers/net/wireless/libertas/main.c
-+++ b/drivers/net/wireless/libertas/main.c
-@@ -1276,7 +1276,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
- goto err_adapter;
- }
-
-- dev->netdev_ops = &lbs_netdev_ops;
- dev->ieee80211_ptr = wdev;
- dev->ml_priv = priv;
- SET_NETDEV_DEV(dev, dmdev);
---
-1.6.0.4
-
--
1.6.2.1
^ permalink raw reply related
* [PATCH 4/9] [compat-2.6] Fix compile bug with kernel 2.6.32
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1255382358-20760-1-git-send-email-hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
compat/patches/12-iw_handler-changes.patch | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/compat/patches/12-iw_handler-changes.patch b/compat/patches/12-iw_handler-changes.patch
index 50c9b1a..7a700b1 100644
--- a/compat/patches/12-iw_handler-changes.patch
+++ b/compat/patches/12-iw_handler-changes.patch
@@ -1,11 +1,14 @@
--- a/drivers/net/wireless/ipw2x00/ipw2100.c 2009-10-08 11:01:52.000000000 -0400
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c 2009-10-08 11:01:43.000000000 -0400
-@@ -6057,7 +6057,7 @@
+@@ -6057,7 +6057,11 @@
dev->ethtool_ops = &ipw2100_ethtool_ops;
dev->wireless_handlers = &ipw2100_wx_handler_def;
-- priv->wireless_data.libipw = priv->ieee;
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+ priv->wireless_data.libipw = priv->ieee;
++#else
+ priv->wireless_data.ieee80211 = (struct ieee80211_device *) priv->ieee;
++#endif
dev->wireless_data = &priv->wireless_data;
dev->watchdog_timeo = 3 * HZ;
dev->irq = 0;
--
1.6.2.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox