* [PATCH v2 0/3] wl1271: patches for wk19
From: Luciano Coelho @ 2010-05-14 7:46 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
Hi John,
Here's v2 of our weekly patchset for the wl1271 driver, with no useless
internal tags.
Cheers,
Luca.
Juuso Oikarinen (3):
wl1271: Update handling of the NVS file / INI parameters
wl1271: Add support for NVS files with 5GHz band parameters
wl1271: Fix RX data path frame lengths
drivers/net/wireless/wl12xx/wl1271.h | 28 +------
drivers/net/wireless/wl12xx/wl1271_cmd.c | 25 +++--
drivers/net/wireless/wl12xx/wl1271_cmd.h | 26 +++--
drivers/net/wireless/wl12xx/wl1271_ini.h | 123 +++++++++++++++++++++++++
drivers/net/wireless/wl12xx/wl1271_main.c | 13 ++-
drivers/net/wireless/wl12xx/wl1271_rx.c | 2 +
drivers/net/wireless/wl12xx/wl1271_testmode.c | 11 ++-
7 files changed, 177 insertions(+), 51 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl1271_ini.h
^ permalink raw reply
* [PATCH v2 3/3] wl1271: Fix RX data path frame lengths
From: Luciano Coelho @ 2010-05-14 7:46 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1273823184-9381-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
The current frame length used by the driver for RX frames is the SPI bus
transfer length. This length has padding bytes, which do not belong to the
WLAN frame.
As there is no other length information in the WLAN frame except the skb
length this problem caused for instance extra ESSID's to be listed at the
end of scan results (IE id 0) with zero length.
Fix the frame length by removing padding.
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_rx.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c
index 57f4bfd..b98fb64 100644
--- a/drivers/net/wireless/wl12xx/wl1271_rx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_rx.c
@@ -113,6 +113,8 @@ static void wl1271_rx_handle_data(struct wl1271 *wl, u32 length)
wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len,
beacon ? "beacon" : "");
+ skb_trim(skb, skb->len - desc->pad_len);
+
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
ieee80211_rx_ni(wl->hw, skb);
}
--
1.6.3.3
^ permalink raw reply related
* [PATCH v2 2/3] wl1271: Add support for NVS files with 5GHz band parameters
From: Luciano Coelho @ 2010-05-14 7:46 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1273823184-9381-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
This patch adds support for NVS files with 5GHz band parameters. The change
is done in a backward compatible manner - if 11a is not enabled in the driver,
the driver will allow also old NVS files to be loaded.
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_cmd.c | 9 ++++++++-
drivers/net/wireless/wl12xx/wl1271_ini.h | 11 ++++++++---
drivers/net/wireless/wl12xx/wl1271_main.c | 13 ++++++++++---
drivers/net/wireless/wl12xx/wl1271_testmode.c | 11 +++++++++--
4 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 241b477..d7bcce8 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -238,13 +238,20 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
radio_parms->test.id = TEST_CMD_INI_FILE_RADIO_PARAM;
+ /* 2.4GHz parameters */
memcpy(&radio_parms->static_params_2, &wl->nvs->stat_radio_params_2,
sizeof(struct wl1271_ini_band_params_2));
memcpy(&radio_parms->dyn_params_2,
&wl->nvs->dyn_radio_params_2[rparam->fem].params,
sizeof(struct wl1271_ini_fem_params_2));
- /* FIXME: current NVS is missing 5GHz parameters */
+ /* 5GHz parameters */
+ memcpy(&radio_parms->static_params_5,
+ &wl->nvs->stat_radio_params_5,
+ sizeof(struct wl1271_ini_band_params_5));
+ memcpy(&radio_parms->dyn_params_5,
+ &wl->nvs->dyn_radio_params_5[rparam->fem].params,
+ sizeof(struct wl1271_ini_fem_params_5));
wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ",
radio_parms, sizeof(*radio_parms));
diff --git a/drivers/net/wireless/wl12xx/wl1271_ini.h b/drivers/net/wireless/wl12xx/wl1271_ini.h
index d1590bc..0fb156a 100644
--- a/drivers/net/wireless/wl12xx/wl1271_ini.h
+++ b/drivers/net/wireless/wl12xx/wl1271_ini.h
@@ -95,9 +95,10 @@ struct wl1271_ini_fem_params_5 {
/* NVS data structure */
#define WL1271_INI_NVS_SECTION_SIZE 468
-#define WL1271_INI_SPARE_SIZE 124
#define WL1271_INI_FEM_MODULE_COUNT 2
+#define WL1271_INI_LEGACY_NVS_FILE_SIZE 800
+
struct wl1271_nvs_file {
/* NVS section */
u8 nvs[WL1271_INI_NVS_SECTION_SIZE];
@@ -111,8 +112,12 @@ struct wl1271_nvs_file {
struct wl1271_ini_fem_params_2 params;
u8 padding;
} dyn_radio_params_2[WL1271_INI_FEM_MODULE_COUNT];
-
- u8 ini_spare[WL1271_INI_SPARE_SIZE];
+ struct wl1271_ini_band_params_5 stat_radio_params_5;
+ u8 padding3;
+ struct {
+ struct wl1271_ini_fem_params_5 params;
+ u8 padding;
+ } dyn_radio_params_5[WL1271_INI_FEM_MODULE_COUNT];
} __attribute__ ((packed));
#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 933e432..371c394 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -566,14 +566,21 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
return ret;
}
- if (fw->size != sizeof(struct wl1271_nvs_file)) {
+ /*
+ * FIXME: the LEGACY NVS image support (NVS's missing the 5GHz band
+ * configurations) can be removed when those NVS files stop floating
+ * around.
+ */
+ if (fw->size != sizeof(struct wl1271_nvs_file) &&
+ (fw->size != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
+ wl1271_11a_enabled())) {
wl1271_error("nvs size is not as expected: %zu != %zu",
fw->size, sizeof(struct wl1271_nvs_file));
ret = -EILSEQ;
goto out;
}
- wl->nvs = kmalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
+ wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
if (!wl->nvs) {
wl1271_error("could not allocate memory for the nvs file");
@@ -581,7 +588,7 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
goto out;
}
- memcpy(wl->nvs, fw->data, sizeof(struct wl1271_nvs_file));
+ memcpy(wl->nvs, fw->data, fw->size);
out:
release_firmware(fw);
diff --git a/drivers/net/wireless/wl12xx/wl1271_testmode.c b/drivers/net/wireless/wl12xx/wl1271_testmode.c
index 554deb4..6e0952f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_testmode.c
+++ b/drivers/net/wireless/wl12xx/wl1271_testmode.c
@@ -199,7 +199,14 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
buf = nla_data(tb[WL1271_TM_ATTR_DATA]);
len = nla_len(tb[WL1271_TM_ATTR_DATA]);
- if (len != sizeof(struct wl1271_nvs_file)) {
+ /*
+ * FIXME: the LEGACY NVS image support (NVS's missing the 5GHz band
+ * configurations) can be removed when those NVS files stop floating
+ * around.
+ */
+ if (len != sizeof(struct wl1271_nvs_file) &&
+ (len != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
+ wl1271_11a_enabled())) {
wl1271_error("nvs size is not as expected: %zu != %zu",
len, sizeof(struct wl1271_nvs_file));
return -EMSGSIZE;
@@ -209,7 +216,7 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
kfree(wl->nvs);
- wl->nvs = kmalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
+ wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
if (!wl->nvs) {
wl1271_error("could not allocate memory for the nvs file");
ret = -ENOMEM;
--
1.6.3.3
^ permalink raw reply related
* [PATCH v2 1/3] wl1271: Update handling of the NVS file / INI parameters
From: Luciano Coelho @ 2010-05-14 7:46 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1273823184-9381-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
This patch updates the handling of the NVS file INI-section, trying to make
it slightly more generic, and exposing the parameters being set. This is done
in preparation for 5GHz parameters.
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 | 28 +-------
drivers/net/wireless/wl12xx/wl1271_cmd.c | 14 ++--
drivers/net/wireless/wl12xx/wl1271_cmd.h | 26 ++++---
drivers/net/wireless/wl12xx/wl1271_ini.h | 118 ++++++++++++++++++++++++++++++
4 files changed, 142 insertions(+), 44 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl1271_ini.h
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 6f1b6b5..1e48e75 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -33,6 +33,7 @@
#include <net/mac80211.h>
#include "wl1271_conf.h"
+#include "wl1271_ini.h"
#define DRIVER_NAME "wl1271"
#define DRIVER_PREFIX DRIVER_NAME ": "
@@ -116,33 +117,6 @@ enum {
#define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff))
#define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff))
-/* NVS data structure */
-#define WL1271_NVS_SECTION_SIZE 468
-
-#define WL1271_NVS_GENERAL_PARAMS_SIZE 57
-#define WL1271_NVS_GENERAL_PARAMS_SIZE_PADDED \
- (WL1271_NVS_GENERAL_PARAMS_SIZE + 1)
-#define WL1271_NVS_STAT_RADIO_PARAMS_SIZE 17
-#define WL1271_NVS_STAT_RADIO_PARAMS_SIZE_PADDED \
- (WL1271_NVS_STAT_RADIO_PARAMS_SIZE + 1)
-#define WL1271_NVS_DYN_RADIO_PARAMS_SIZE 65
-#define WL1271_NVS_DYN_RADIO_PARAMS_SIZE_PADDED \
- (WL1271_NVS_DYN_RADIO_PARAMS_SIZE + 1)
-#define WL1271_NVS_FEM_COUNT 2
-#define WL1271_NVS_INI_SPARE_SIZE 124
-
-struct wl1271_nvs_file {
- /* NVS section */
- u8 nvs[WL1271_NVS_SECTION_SIZE];
-
- /* INI section */
- u8 general_params[WL1271_NVS_GENERAL_PARAMS_SIZE_PADDED];
- u8 stat_radio_params[WL1271_NVS_STAT_RADIO_PARAMS_SIZE_PADDED];
- u8 dyn_radio_params[WL1271_NVS_FEM_COUNT]
- [WL1271_NVS_DYN_RADIO_PARAMS_SIZE_PADDED];
- u8 ini_spare[WL1271_NVS_INI_SPARE_SIZE];
-} __attribute__ ((packed));
-
/*
* Enable/disable 802.11a support for WL1273
*/
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 19393e2..241b477 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -212,8 +212,8 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
gen_parms->test.id = TEST_CMD_INI_FILE_GENERAL_PARAM;
- memcpy(gen_parms->params, wl->nvs->general_params,
- WL1271_NVS_GENERAL_PARAMS_SIZE);
+ memcpy(&gen_parms->general_params, &wl->nvs->general_params,
+ sizeof(struct wl1271_ini_general_params));
ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), 0);
if (ret < 0)
@@ -238,11 +238,11 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
radio_parms->test.id = TEST_CMD_INI_FILE_RADIO_PARAM;
- memcpy(radio_parms->stat_radio_params, wl->nvs->stat_radio_params,
- WL1271_NVS_STAT_RADIO_PARAMS_SIZE);
- memcpy(radio_parms->dyn_radio_params,
- wl->nvs->dyn_radio_params[rparam->fem],
- WL1271_NVS_DYN_RADIO_PARAMS_SIZE);
+ memcpy(&radio_parms->static_params_2, &wl->nvs->stat_radio_params_2,
+ sizeof(struct wl1271_ini_band_params_2));
+ memcpy(&radio_parms->dyn_params_2,
+ &wl->nvs->dyn_radio_params_2[rparam->fem].params,
+ sizeof(struct wl1271_ini_fem_params_2));
/* FIXME: current NVS is missing 5GHz parameters */
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index f2820b4..4ff966f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -439,24 +439,30 @@ struct wl1271_general_parms_cmd {
struct wl1271_cmd_test_header test;
- u8 params[WL1271_NVS_GENERAL_PARAMS_SIZE];
- s8 reserved[23];
-} __attribute__ ((packed));
+ struct wl1271_ini_general_params general_params;
-#define WL1271_STAT_RADIO_PARAMS_5_SIZE 29
-#define WL1271_DYN_RADIO_PARAMS_5_SIZE 104
+ u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+ u8 sr_sen_n_p;
+ u8 sr_sen_n_p_gain;
+ u8 sr_sen_nrn;
+ u8 sr_sen_prn;
+ u8 padding[3];
+} __attribute__ ((packed));
struct wl1271_radio_parms_cmd {
struct wl1271_cmd_header header;
struct wl1271_cmd_test_header test;
- u8 stat_radio_params[WL1271_NVS_STAT_RADIO_PARAMS_SIZE];
- u8 stat_radio_params_5[WL1271_STAT_RADIO_PARAMS_5_SIZE];
+ /* Static radio parameters */
+ struct wl1271_ini_band_params_2 static_params_2;
+ struct wl1271_ini_band_params_5 static_params_5;
- u8 dyn_radio_params[WL1271_NVS_DYN_RADIO_PARAMS_SIZE];
- u8 reserved;
- u8 dyn_radio_params_5[WL1271_DYN_RADIO_PARAMS_5_SIZE];
+ /* Dynamic radio parameters */
+ struct wl1271_ini_fem_params_2 dyn_params_2;
+ u8 padding2;
+ struct wl1271_ini_fem_params_5 dyn_params_5;
+ u8 padding3[2];
} __attribute__ ((packed));
struct wl1271_cmd_cal_channel_tune {
diff --git a/drivers/net/wireless/wl12xx/wl1271_ini.h b/drivers/net/wireless/wl12xx/wl1271_ini.h
new file mode 100644
index 0000000..d1590bc
--- /dev/null
+++ b/drivers/net/wireless/wl12xx/wl1271_ini.h
@@ -0,0 +1,118 @@
+/*
+ * This file is part of wl1271
+ *
+ * Copyright (C) 2010 Nokia Corporation
+ *
+ * Contact: Luciano Coelho <luciano.coelho@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __WL1271_INI_H__
+#define __WL1271_INI_H__
+
+#define WL1271_INI_MAX_SMART_REFLEX_PARAM 16
+
+struct wl1271_ini_general_params {
+ u8 ref_clock;
+ u8 settling_time;
+ u8 clk_valid_on_wakeup;
+ u8 dc2dc_mode;
+ u8 dual_mode_select;
+ u8 tx_bip_fem_auto_detect;
+ u8 tx_bip_fem_manufacturer;
+ u8 general_settings;
+ u8 sr_state;
+ u8 srf1[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+ u8 srf2[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+ u8 srf3[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+} __attribute__ ((packed));
+
+#define WL1271_INI_RSSI_PROCESS_COMPENS_SIZE 15
+
+struct wl1271_ini_band_params_2 {
+ u8 rx_trace_insertion_loss;
+ u8 tx_trace_loss;
+ u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE];
+} __attribute__ ((packed));
+
+#define WL1271_INI_RATE_GROUP_COUNT 6
+#define WL1271_INI_CHANNEL_COUNT_2 14
+
+struct wl1271_ini_fem_params_2 {
+ __le16 tx_bip_ref_pd_voltage;
+ u8 tx_bip_ref_power;
+ u8 tx_bip_ref_offset;
+ u8 tx_per_rate_pwr_limits_normal[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_degraded[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_extreme[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_chan_pwr_limits_11b[WL1271_INI_CHANNEL_COUNT_2];
+ u8 tx_per_chan_pwr_limits_ofdm[WL1271_INI_CHANNEL_COUNT_2];
+ u8 tx_pd_vs_rate_offsets[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_ibias[WL1271_INI_RATE_GROUP_COUNT];
+ u8 rx_fem_insertion_loss;
+ u8 degraded_low_to_normal_thr;
+ u8 normal_to_degraded_high_thr;
+} __attribute__ ((packed));
+
+#define WL1271_INI_CHANNEL_COUNT_5 35
+#define WL1271_INI_SUB_BAND_COUNT_5 7
+
+struct wl1271_ini_band_params_5 {
+ u8 rx_trace_insertion_loss[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_trace_loss[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE];
+} __attribute__ ((packed));
+
+struct wl1271_ini_fem_params_5 {
+ __le16 tx_bip_ref_pd_voltage[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_bip_ref_power[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_bip_ref_offset[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_per_rate_pwr_limits_normal[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_degraded[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_extreme[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_chan_pwr_limits_ofdm[WL1271_INI_CHANNEL_COUNT_5];
+ u8 tx_pd_vs_rate_offsets[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_ibias[WL1271_INI_RATE_GROUP_COUNT];
+ u8 rx_fem_insertion_loss[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 degraded_low_to_normal_thr;
+ u8 normal_to_degraded_high_thr;
+} __attribute__ ((packed));
+
+
+/* NVS data structure */
+#define WL1271_INI_NVS_SECTION_SIZE 468
+#define WL1271_INI_SPARE_SIZE 124
+#define WL1271_INI_FEM_MODULE_COUNT 2
+
+struct wl1271_nvs_file {
+ /* NVS section */
+ u8 nvs[WL1271_INI_NVS_SECTION_SIZE];
+
+ /* INI section */
+ struct wl1271_ini_general_params general_params;
+ u8 padding1;
+ struct wl1271_ini_band_params_2 stat_radio_params_2;
+ u8 padding2;
+ struct {
+ struct wl1271_ini_fem_params_2 params;
+ u8 padding;
+ } dyn_radio_params_2[WL1271_INI_FEM_MODULE_COUNT];
+
+ u8 ini_spare[WL1271_INI_SPARE_SIZE];
+} __attribute__ ((packed));
+
+#endif
--
1.6.3.3
^ permalink raw reply related
* Re: [PATCH 0/3] wl1271: patches for wk19
From: Luciano Coelho @ 2010-05-14 7:42 UTC (permalink / raw)
To: linville@tuxdriver.com; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1273822457-9194-1-git-send-email-luciano.coelho@nokia.com>
On Fri, 2010-05-14 at 09:34 +0200, Coelho Luciano (Nokia-D/Helsinki)
wrote:
> Hi John,
>
> Here's our weekly patchset for the wl1271 driver.
Oops! Please ignore this patchset as one internal bugzilla tag slipped
out. I'll send v2 with the tag removed.
--
Cheers,
Luca.
^ permalink raw reply
* [PATCH 1/3] wl1271: Update handling of the NVS file / INI parameters
From: Luciano Coelho @ 2010-05-14 7:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1273822457-9194-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
This patch updates the handling of the NVS file INI-section, trying to make
it slightly more generic, and exposing the parameters being set. This is done
in preparation for 5GHz parameters.
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 | 28 +-------
drivers/net/wireless/wl12xx/wl1271_cmd.c | 14 ++--
drivers/net/wireless/wl12xx/wl1271_cmd.h | 26 ++++---
drivers/net/wireless/wl12xx/wl1271_ini.h | 118 ++++++++++++++++++++++++++++++
4 files changed, 142 insertions(+), 44 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl1271_ini.h
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 6f1b6b5..1e48e75 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -33,6 +33,7 @@
#include <net/mac80211.h>
#include "wl1271_conf.h"
+#include "wl1271_ini.h"
#define DRIVER_NAME "wl1271"
#define DRIVER_PREFIX DRIVER_NAME ": "
@@ -116,33 +117,6 @@ enum {
#define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff))
#define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff))
-/* NVS data structure */
-#define WL1271_NVS_SECTION_SIZE 468
-
-#define WL1271_NVS_GENERAL_PARAMS_SIZE 57
-#define WL1271_NVS_GENERAL_PARAMS_SIZE_PADDED \
- (WL1271_NVS_GENERAL_PARAMS_SIZE + 1)
-#define WL1271_NVS_STAT_RADIO_PARAMS_SIZE 17
-#define WL1271_NVS_STAT_RADIO_PARAMS_SIZE_PADDED \
- (WL1271_NVS_STAT_RADIO_PARAMS_SIZE + 1)
-#define WL1271_NVS_DYN_RADIO_PARAMS_SIZE 65
-#define WL1271_NVS_DYN_RADIO_PARAMS_SIZE_PADDED \
- (WL1271_NVS_DYN_RADIO_PARAMS_SIZE + 1)
-#define WL1271_NVS_FEM_COUNT 2
-#define WL1271_NVS_INI_SPARE_SIZE 124
-
-struct wl1271_nvs_file {
- /* NVS section */
- u8 nvs[WL1271_NVS_SECTION_SIZE];
-
- /* INI section */
- u8 general_params[WL1271_NVS_GENERAL_PARAMS_SIZE_PADDED];
- u8 stat_radio_params[WL1271_NVS_STAT_RADIO_PARAMS_SIZE_PADDED];
- u8 dyn_radio_params[WL1271_NVS_FEM_COUNT]
- [WL1271_NVS_DYN_RADIO_PARAMS_SIZE_PADDED];
- u8 ini_spare[WL1271_NVS_INI_SPARE_SIZE];
-} __attribute__ ((packed));
-
/*
* Enable/disable 802.11a support for WL1273
*/
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 19393e2..241b477 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -212,8 +212,8 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
gen_parms->test.id = TEST_CMD_INI_FILE_GENERAL_PARAM;
- memcpy(gen_parms->params, wl->nvs->general_params,
- WL1271_NVS_GENERAL_PARAMS_SIZE);
+ memcpy(&gen_parms->general_params, &wl->nvs->general_params,
+ sizeof(struct wl1271_ini_general_params));
ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), 0);
if (ret < 0)
@@ -238,11 +238,11 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
radio_parms->test.id = TEST_CMD_INI_FILE_RADIO_PARAM;
- memcpy(radio_parms->stat_radio_params, wl->nvs->stat_radio_params,
- WL1271_NVS_STAT_RADIO_PARAMS_SIZE);
- memcpy(radio_parms->dyn_radio_params,
- wl->nvs->dyn_radio_params[rparam->fem],
- WL1271_NVS_DYN_RADIO_PARAMS_SIZE);
+ memcpy(&radio_parms->static_params_2, &wl->nvs->stat_radio_params_2,
+ sizeof(struct wl1271_ini_band_params_2));
+ memcpy(&radio_parms->dyn_params_2,
+ &wl->nvs->dyn_radio_params_2[rparam->fem].params,
+ sizeof(struct wl1271_ini_fem_params_2));
/* FIXME: current NVS is missing 5GHz parameters */
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index f2820b4..4ff966f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -439,24 +439,30 @@ struct wl1271_general_parms_cmd {
struct wl1271_cmd_test_header test;
- u8 params[WL1271_NVS_GENERAL_PARAMS_SIZE];
- s8 reserved[23];
-} __attribute__ ((packed));
+ struct wl1271_ini_general_params general_params;
-#define WL1271_STAT_RADIO_PARAMS_5_SIZE 29
-#define WL1271_DYN_RADIO_PARAMS_5_SIZE 104
+ u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+ u8 sr_sen_n_p;
+ u8 sr_sen_n_p_gain;
+ u8 sr_sen_nrn;
+ u8 sr_sen_prn;
+ u8 padding[3];
+} __attribute__ ((packed));
struct wl1271_radio_parms_cmd {
struct wl1271_cmd_header header;
struct wl1271_cmd_test_header test;
- u8 stat_radio_params[WL1271_NVS_STAT_RADIO_PARAMS_SIZE];
- u8 stat_radio_params_5[WL1271_STAT_RADIO_PARAMS_5_SIZE];
+ /* Static radio parameters */
+ struct wl1271_ini_band_params_2 static_params_2;
+ struct wl1271_ini_band_params_5 static_params_5;
- u8 dyn_radio_params[WL1271_NVS_DYN_RADIO_PARAMS_SIZE];
- u8 reserved;
- u8 dyn_radio_params_5[WL1271_DYN_RADIO_PARAMS_5_SIZE];
+ /* Dynamic radio parameters */
+ struct wl1271_ini_fem_params_2 dyn_params_2;
+ u8 padding2;
+ struct wl1271_ini_fem_params_5 dyn_params_5;
+ u8 padding3[2];
} __attribute__ ((packed));
struct wl1271_cmd_cal_channel_tune {
diff --git a/drivers/net/wireless/wl12xx/wl1271_ini.h b/drivers/net/wireless/wl12xx/wl1271_ini.h
new file mode 100644
index 0000000..d1590bc
--- /dev/null
+++ b/drivers/net/wireless/wl12xx/wl1271_ini.h
@@ -0,0 +1,118 @@
+/*
+ * This file is part of wl1271
+ *
+ * Copyright (C) 2010 Nokia Corporation
+ *
+ * Contact: Luciano Coelho <luciano.coelho@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __WL1271_INI_H__
+#define __WL1271_INI_H__
+
+#define WL1271_INI_MAX_SMART_REFLEX_PARAM 16
+
+struct wl1271_ini_general_params {
+ u8 ref_clock;
+ u8 settling_time;
+ u8 clk_valid_on_wakeup;
+ u8 dc2dc_mode;
+ u8 dual_mode_select;
+ u8 tx_bip_fem_auto_detect;
+ u8 tx_bip_fem_manufacturer;
+ u8 general_settings;
+ u8 sr_state;
+ u8 srf1[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+ u8 srf2[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+ u8 srf3[WL1271_INI_MAX_SMART_REFLEX_PARAM];
+} __attribute__ ((packed));
+
+#define WL1271_INI_RSSI_PROCESS_COMPENS_SIZE 15
+
+struct wl1271_ini_band_params_2 {
+ u8 rx_trace_insertion_loss;
+ u8 tx_trace_loss;
+ u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE];
+} __attribute__ ((packed));
+
+#define WL1271_INI_RATE_GROUP_COUNT 6
+#define WL1271_INI_CHANNEL_COUNT_2 14
+
+struct wl1271_ini_fem_params_2 {
+ __le16 tx_bip_ref_pd_voltage;
+ u8 tx_bip_ref_power;
+ u8 tx_bip_ref_offset;
+ u8 tx_per_rate_pwr_limits_normal[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_degraded[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_extreme[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_chan_pwr_limits_11b[WL1271_INI_CHANNEL_COUNT_2];
+ u8 tx_per_chan_pwr_limits_ofdm[WL1271_INI_CHANNEL_COUNT_2];
+ u8 tx_pd_vs_rate_offsets[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_ibias[WL1271_INI_RATE_GROUP_COUNT];
+ u8 rx_fem_insertion_loss;
+ u8 degraded_low_to_normal_thr;
+ u8 normal_to_degraded_high_thr;
+} __attribute__ ((packed));
+
+#define WL1271_INI_CHANNEL_COUNT_5 35
+#define WL1271_INI_SUB_BAND_COUNT_5 7
+
+struct wl1271_ini_band_params_5 {
+ u8 rx_trace_insertion_loss[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_trace_loss[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE];
+} __attribute__ ((packed));
+
+struct wl1271_ini_fem_params_5 {
+ __le16 tx_bip_ref_pd_voltage[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_bip_ref_power[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_bip_ref_offset[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 tx_per_rate_pwr_limits_normal[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_degraded[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_rate_pwr_limits_extreme[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_per_chan_pwr_limits_ofdm[WL1271_INI_CHANNEL_COUNT_5];
+ u8 tx_pd_vs_rate_offsets[WL1271_INI_RATE_GROUP_COUNT];
+ u8 tx_ibias[WL1271_INI_RATE_GROUP_COUNT];
+ u8 rx_fem_insertion_loss[WL1271_INI_SUB_BAND_COUNT_5];
+ u8 degraded_low_to_normal_thr;
+ u8 normal_to_degraded_high_thr;
+} __attribute__ ((packed));
+
+
+/* NVS data structure */
+#define WL1271_INI_NVS_SECTION_SIZE 468
+#define WL1271_INI_SPARE_SIZE 124
+#define WL1271_INI_FEM_MODULE_COUNT 2
+
+struct wl1271_nvs_file {
+ /* NVS section */
+ u8 nvs[WL1271_INI_NVS_SECTION_SIZE];
+
+ /* INI section */
+ struct wl1271_ini_general_params general_params;
+ u8 padding1;
+ struct wl1271_ini_band_params_2 stat_radio_params_2;
+ u8 padding2;
+ struct {
+ struct wl1271_ini_fem_params_2 params;
+ u8 padding;
+ } dyn_radio_params_2[WL1271_INI_FEM_MODULE_COUNT];
+
+ u8 ini_spare[WL1271_INI_SPARE_SIZE];
+} __attribute__ ((packed));
+
+#endif
--
1.6.3.3
^ permalink raw reply related
* [PATCH 0/3] wl1271: patches for wk19
From: Luciano Coelho @ 2010-05-14 7:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
Hi John,
Here's our weekly patchset for the wl1271 driver.
Cheers,
Luca.
Juuso Oikarinen (3):
wl1271: Update handling of the NVS file / INI parameters
wl1271: Add support for NVS files with 5GHz band parameters
wl1271: Fix RX data path frame lengths
drivers/net/wireless/wl12xx/wl1271.h | 28 +------
drivers/net/wireless/wl12xx/wl1271_cmd.c | 25 +++--
drivers/net/wireless/wl12xx/wl1271_cmd.h | 26 +++--
drivers/net/wireless/wl12xx/wl1271_ini.h | 123 +++++++++++++++++++++++++
drivers/net/wireless/wl12xx/wl1271_main.c | 13 ++-
drivers/net/wireless/wl12xx/wl1271_rx.c | 2 +
drivers/net/wireless/wl12xx/wl1271_testmode.c | 11 ++-
7 files changed, 177 insertions(+), 51 deletions(-)
create mode 100644 drivers/net/wireless/wl12xx/wl1271_ini.h
^ permalink raw reply
* [PATCH 3/3] wl1271: Fix RX data path frame lengths
From: Luciano Coelho @ 2010-05-14 7:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1273822457-9194-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
The current frame length used by the driver for RX frames is the SPI bus
transfer length. This length has padding bytes, which do not belong to the
WLAN frame.
As there is no other length information in the WLAN frame except the skb
length this problem caused for instance extra ESSID's to be listed at the
end of scan results (IE id 0) with zero length.
Fix the frame length by removing padding.
Fixes: NB#168117 - Extra padding in scan result information elements
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_rx.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c
index 57f4bfd..b98fb64 100644
--- a/drivers/net/wireless/wl12xx/wl1271_rx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_rx.c
@@ -113,6 +113,8 @@ static void wl1271_rx_handle_data(struct wl1271 *wl, u32 length)
wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len,
beacon ? "beacon" : "");
+ skb_trim(skb, skb->len - desc->pad_len);
+
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
ieee80211_rx_ni(wl->hw, skb);
}
--
1.6.3.3
^ permalink raw reply related
* [PATCH 2/3] wl1271: Add support for NVS files with 5GHz band parameters
From: Luciano Coelho @ 2010-05-14 7:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Juuso Oikarinen
In-Reply-To: <1273822457-9194-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
This patch adds support for NVS files with 5GHz band parameters. The change
is done in a backward compatible manner - if 11a is not enabled in the driver,
the driver will allow also old NVS files to be loaded.
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_cmd.c | 9 ++++++++-
drivers/net/wireless/wl12xx/wl1271_ini.h | 11 ++++++++---
drivers/net/wireless/wl12xx/wl1271_main.c | 13 ++++++++++---
drivers/net/wireless/wl12xx/wl1271_testmode.c | 11 +++++++++--
4 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 241b477..d7bcce8 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -238,13 +238,20 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
radio_parms->test.id = TEST_CMD_INI_FILE_RADIO_PARAM;
+ /* 2.4GHz parameters */
memcpy(&radio_parms->static_params_2, &wl->nvs->stat_radio_params_2,
sizeof(struct wl1271_ini_band_params_2));
memcpy(&radio_parms->dyn_params_2,
&wl->nvs->dyn_radio_params_2[rparam->fem].params,
sizeof(struct wl1271_ini_fem_params_2));
- /* FIXME: current NVS is missing 5GHz parameters */
+ /* 5GHz parameters */
+ memcpy(&radio_parms->static_params_5,
+ &wl->nvs->stat_radio_params_5,
+ sizeof(struct wl1271_ini_band_params_5));
+ memcpy(&radio_parms->dyn_params_5,
+ &wl->nvs->dyn_radio_params_5[rparam->fem].params,
+ sizeof(struct wl1271_ini_fem_params_5));
wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ",
radio_parms, sizeof(*radio_parms));
diff --git a/drivers/net/wireless/wl12xx/wl1271_ini.h b/drivers/net/wireless/wl12xx/wl1271_ini.h
index d1590bc..0fb156a 100644
--- a/drivers/net/wireless/wl12xx/wl1271_ini.h
+++ b/drivers/net/wireless/wl12xx/wl1271_ini.h
@@ -95,9 +95,10 @@ struct wl1271_ini_fem_params_5 {
/* NVS data structure */
#define WL1271_INI_NVS_SECTION_SIZE 468
-#define WL1271_INI_SPARE_SIZE 124
#define WL1271_INI_FEM_MODULE_COUNT 2
+#define WL1271_INI_LEGACY_NVS_FILE_SIZE 800
+
struct wl1271_nvs_file {
/* NVS section */
u8 nvs[WL1271_INI_NVS_SECTION_SIZE];
@@ -111,8 +112,12 @@ struct wl1271_nvs_file {
struct wl1271_ini_fem_params_2 params;
u8 padding;
} dyn_radio_params_2[WL1271_INI_FEM_MODULE_COUNT];
-
- u8 ini_spare[WL1271_INI_SPARE_SIZE];
+ struct wl1271_ini_band_params_5 stat_radio_params_5;
+ u8 padding3;
+ struct {
+ struct wl1271_ini_fem_params_5 params;
+ u8 padding;
+ } dyn_radio_params_5[WL1271_INI_FEM_MODULE_COUNT];
} __attribute__ ((packed));
#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 933e432..371c394 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -566,14 +566,21 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
return ret;
}
- if (fw->size != sizeof(struct wl1271_nvs_file)) {
+ /*
+ * FIXME: the LEGACY NVS image support (NVS's missing the 5GHz band
+ * configurations) can be removed when those NVS files stop floating
+ * around.
+ */
+ if (fw->size != sizeof(struct wl1271_nvs_file) &&
+ (fw->size != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
+ wl1271_11a_enabled())) {
wl1271_error("nvs size is not as expected: %zu != %zu",
fw->size, sizeof(struct wl1271_nvs_file));
ret = -EILSEQ;
goto out;
}
- wl->nvs = kmalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
+ wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
if (!wl->nvs) {
wl1271_error("could not allocate memory for the nvs file");
@@ -581,7 +588,7 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
goto out;
}
- memcpy(wl->nvs, fw->data, sizeof(struct wl1271_nvs_file));
+ memcpy(wl->nvs, fw->data, fw->size);
out:
release_firmware(fw);
diff --git a/drivers/net/wireless/wl12xx/wl1271_testmode.c b/drivers/net/wireless/wl12xx/wl1271_testmode.c
index 554deb4..6e0952f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_testmode.c
+++ b/drivers/net/wireless/wl12xx/wl1271_testmode.c
@@ -199,7 +199,14 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
buf = nla_data(tb[WL1271_TM_ATTR_DATA]);
len = nla_len(tb[WL1271_TM_ATTR_DATA]);
- if (len != sizeof(struct wl1271_nvs_file)) {
+ /*
+ * FIXME: the LEGACY NVS image support (NVS's missing the 5GHz band
+ * configurations) can be removed when those NVS files stop floating
+ * around.
+ */
+ if (len != sizeof(struct wl1271_nvs_file) &&
+ (len != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
+ wl1271_11a_enabled())) {
wl1271_error("nvs size is not as expected: %zu != %zu",
len, sizeof(struct wl1271_nvs_file));
return -EMSGSIZE;
@@ -209,7 +216,7 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[])
kfree(wl->nvs);
- wl->nvs = kmalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
+ wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
if (!wl->nvs) {
wl1271_error("could not allocate memory for the nvs file");
ret = -ENOMEM;
--
1.6.3.3
^ permalink raw reply related
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Justin P. Mattock @ 2010-05-14 6:42 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Bruno Randolf, Luis Rodriguez, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <AANLkTikKqFTS9MyvJKtyP9pNsrYyFPk5ijidjS9IA_30@mail.gmail.com>
On 05/13/10 23:36, Luis R. Rodriguez wrote:
> On Thu, May 13, 2010 at 11:31 PM, Justin P. Mattock
> <justinmattock@gmail.com> wrote:
>> On 05/13/10 23:20, Bruno Randolf wrote:
>>>
>>> On Friday 14 May 2010 15:16:22 Luis R. Rodriguez wrote:
>>>>
>>>> On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
>>>>
>>>> <justinmattock@gmail.com> wrote:
>>>>>
>>>>> On 05/13/10 21:01, Luis R. Rodriguez wrote:
>>>>>>
>>>>>> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
>>>>>>
>>>>>> <justinmattock@gmail.com> wrote:
>>>>>>>
>>>>>>> what I can try, is(not at the convention, on eth0
>>>>>>> at the moment), but when I get back to the convention
>>>>>>> center place I can try your patch as well as the
>>>>>>> modprobe option, to see if I can get any signs of
>>>>>>> a recreation(if so I'll bisect there).
>>>>>>
>>>>>> The debug info I just need upon load of the module, I don't need you
>>>>>> to run the debug stuff to try to reproduce. The debug print upon load
>>>>>> will tell us the rxbuf size and cache line size.
>>>>>>
>>>>>> Luis
>>>>>
>>>>> o.k. it's not pretty due
>>>>> to loads of avc's for SELinux:
>>>>> (I run a rootless system).
>>>>>
>>>>> [ 84.172649] ath9k: Driver unloaded
>>>>> [ 100.675300] audit_printk_skb: 6 callbacks suppressed
>>>>> [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied {
>>>>> search
>>>>> } for pid=2168 comm="modprobe" name="modules" dev=sda3 ino=2500
>>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>>> tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
>>>>> [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied {
>>>>> search
>>>>> } for pid=2168 comm="modprobe" name="2.6.34-rc7-00057-gcdfda35"
>>>>> dev=sda3 ino=524392 scontext=name:staff_r:staff_sudo_t:s0
>>>>> tcontext=name:object_r:modules_object_t:s0 tclass=dir
>>>>> [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read
>>>>> }
>>>>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>>>> [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open
>>>>> }
>>>>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>>>> [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e
>>>>> syscall=2 success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0
>>>>> ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
>>>>> sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
>>>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>>> [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied {
>>>>> getattr } for pid=2168 comm="modprobe"
>>>>> path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
>>>>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
>>>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>>>> [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e
>>>>> syscall=5 success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0
>>>>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
>>>>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
>>>>> exe="/sbin/modprobe"
>>>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>>> [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
>>>>> IRQ 17
>>>>> [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
>>>>> [ 100.828787] ath: EEPROM regdomain: 0x64
>>>>> [ 100.828790] ath: EEPROM indicates we should expect a direct regpair
>>>>> map [ 100.828793] ath: Country alpha2 being used: 00
>>>>> [ 100.828795] ath: Regpair used: 0x64
>>>>> [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied {
>>>>> search
>>>>> } for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs ino=18
>>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>>> tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
>>>>> [ 100.848788] phy1: Selected rate control algorithm
>>>>> 'ath9k_rate_control'
>>>>> [ 100.850035] Registered led device: ath9k-phy1::radio
>>>>> [ 100.850488] Registered led device: ath9k-phy1::assoc
>>>>> [ 100.851227] Registered led device: ath9k-phy1::tx
>>>>> [ 100.851633] Registered led device: ath9k-phy1::rx
>>>>> [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
>>>>> mem=0xffffc900005a0000, irq=17
>>>>> [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e
>>>>> syscall=175 success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0
>>>>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
>>>>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
>>>>> exe="/sbin/modprobe"
>>>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>>>
>>>>> but there you go dmesg of the debug info for you
>>>>
>>>> Justin, did you forget to use the debug parameter on modprobe ath9k?
>>>>
>>>> modprobe ath9k debug=0x0000020
>>>>
>>>> I do not see the output I expected.
>>>
>>> i think you have to do at least "ifconfig wlan0 up" to see it - (at least
>>> for
>>> ath5k).
>>>
>>> bruno
>>>
>>
>> didn't think todo so, I'll redu
>> again and see. BTW: the connection
>> over here is dodgy(hotel) should I at-least
>> find a stable access point?
>
> Up to you, just need that print line.
>
> ath_print(common, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n",
> common->cachelsz, common->rx_bufsize);
>
> Luis
>
alright.. (in a few) I'll go ahead and enable
as much as possible, as well as the prink
ans see if I can grab the right info for you.
Justin P. Mattock
^ permalink raw reply
* Re: Architecture for wireless driver development in the Linux environment
From: Luis R. Rodriguez @ 2010-05-14 6:39 UTC (permalink / raw)
To: Madhavi Manchala; +Cc: linux-wireless
In-Reply-To: <AANLkTimgcy5UV-snifCoduVOyhooS_1X7tn_HxKTXQ6w@mail.gmail.com>
On Thu, May 13, 2010 at 11:23 PM, Madhavi Manchala
<madhavi.linux@gmail.com> wrote:
> Dear Experts,
>
> I am new to the wireless driver development in the Linux environment.
> I have gone through the http://wireless.kernel.org/ link about the
> wireless driver development in the Linux environment. However, I did
> not find any architecture or skeleton driver like usb-skeleton.c file
> either in the drivers/Documentation or in the mentioned link. I want
> to develop a driver for USB WIFI device for x86 architecture. Please
> let me where can find the USB WIFI driver development architecture in
> the Linux environment.
You can look at:
drivers/net/wireless/mac80211_hwsim.c
> http://wireless.kernel.org/en/developers/Documentation/cfg80211
> What is cfg80211? Are we need to follow this configuration method for
> developing the drivers in the Linux environment?
Its what defines the generic data structure for all 802.11 devices,
both FullMAC and SoftMAC, it also defines the new API for 802.11 for
Linux, you register your struct wiphy device to cfg80211, your driver
has cfg80211_ops and you use nl80211 to communicate to cfg80211 from
userspace for a wiphy device or just generally to cfg80211 (for iw reg
get/set).
Luis
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Bruno Randolf @ 2010-05-14 6:38 UTC (permalink / raw)
To: Justin P. Mattock
Cc: Luis R. Rodriguez, Luis Rodriguez, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <4BECEE3E.6090303@gmail.com>
On Friday 14 May 2010 15:31:26 Justin P. Mattock wrote:
> On 05/13/10 23:20, Bruno Randolf wrote:
> > On Friday 14 May 2010 15:16:22 Luis R. Rodriguez wrote:
> >> On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
> >>
> >> <justinmattock@gmail.com> wrote:
> >>> On 05/13/10 21:01, Luis R. Rodriguez wrote:
> >>>> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
> >>>>
> >>>> <justinmattock@gmail.com> wrote:
> >>>>> what I can try, is(not at the convention, on eth0
> >>>>> at the moment), but when I get back to the convention
> >>>>> center place I can try your patch as well as the
> >>>>> modprobe option, to see if I can get any signs of
> >>>>> a recreation(if so I'll bisect there).
> >>>>
> >>>> The debug info I just need upon load of the module, I don't need you
> >>>> to run the debug stuff to try to reproduce. The debug print upon load
> >>>> will tell us the rxbuf size and cache line size.
> >>>>
> >>>> Luis
> >>>
> >>> o.k. it's not pretty due
> >>> to loads of avc's for SELinux:
> >>> (I run a rootless system).
> >>>
> >>> [ 84.172649] ath9k: Driver unloaded
> >>> [ 100.675300] audit_printk_skb: 6 callbacks suppressed
> >>> [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied {
> >>> search } for pid=2168 comm="modprobe" name="modules" dev=sda3
> >>> ino=2500 scontext=name:staff_r:staff_sudo_t:s0
> >>> tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
> >>> [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied {
> >>> search } for pid=2168 comm="modprobe"
> >>> name="2.6.34-rc7-00057-gcdfda35" dev=sda3 ino=524392
> >>> scontext=name:staff_r:staff_sudo_t:s0
> >>> tcontext=name:object_r:modules_object_t:s0 tclass=dir
> >>> [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read
> >>> } for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3
> >>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
> >>> tcontext=name:object_r:modules_object_t:s0 tclass=file
> >>> [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open
> >>> } for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3
> >>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
> >>> tcontext=name:object_r:modules_object_t:s0 tclass=file
> >>> [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e
> >>> syscall=2 success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0
> >>> ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
> >>> sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
> >>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
> >>> [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied {
> >>> getattr } for pid=2168 comm="modprobe"
> >>> path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
> >>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
> >>> tcontext=name:object_r:modules_object_t:s0 tclass=file
> >>> [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e
> >>> syscall=5 success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0
> >>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
> >>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
> >>> exe="/sbin/modprobe"
> >>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
> >>> [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
> >>> IRQ 17
> >>> [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
> >>> [ 100.828787] ath: EEPROM regdomain: 0x64
> >>> [ 100.828790] ath: EEPROM indicates we should expect a direct regpair
> >>> map [ 100.828793] ath: Country alpha2 being used: 00
> >>> [ 100.828795] ath: Regpair used: 0x64
> >>> [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied {
> >>> search } for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs
> >>> ino=18 scontext=name:staff_r:staff_sudo_t:s0
> >>> tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
> >>> [ 100.848788] phy1: Selected rate control algorithm
> >>> 'ath9k_rate_control' [ 100.850035] Registered led device:
> >>> ath9k-phy1::radio
> >>> [ 100.850488] Registered led device: ath9k-phy1::assoc
> >>> [ 100.851227] Registered led device: ath9k-phy1::tx
> >>> [ 100.851633] Registered led device: ath9k-phy1::rx
> >>> [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
> >>> mem=0xffffc900005a0000, irq=17
> >>> [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e
> >>> syscall=175 success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0
> >>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
> >>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
> >>> exe="/sbin/modprobe"
> >>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
> >>>
> >>> but there you go dmesg of the debug info for you
> >>
> >> Justin, did you forget to use the debug parameter on modprobe ath9k?
> >>
> >> modprobe ath9k debug=0x0000020
> >>
> >> I do not see the output I expected.
> >
> > i think you have to do at least "ifconfig wlan0 up" to see it - (at least
> > for ath5k).
> >
> > bruno
>
> didn't think todo so, I'll redu
> again and see. BTW: the connection
> over here is dodgy(hotel) should I at-least
> find a stable access point? i.g. convetion
> center seemed semi somewhat there
no that does not matter. just ifconfig up is enough. it's just initialization,
you don't need a connection for that.
bruno
> Justin P. Mattock
> --
> 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: ath9k: BUG kmalloc-8192: Poison overwritten
From: Luis R. Rodriguez @ 2010-05-14 6:36 UTC (permalink / raw)
To: Justin P. Mattock
Cc: Bruno Randolf, Luis Rodriguez, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <4BECEE3E.6090303@gmail.com>
On Thu, May 13, 2010 at 11:31 PM, Justin P. Mattock
<justinmattock@gmail.com> wrote:
> On 05/13/10 23:20, Bruno Randolf wrote:
>>
>> On Friday 14 May 2010 15:16:22 Luis R. Rodriguez wrote:
>>>
>>> On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
>>>
>>> <justinmattock@gmail.com> wrote:
>>>>
>>>> On 05/13/10 21:01, Luis R. Rodriguez wrote:
>>>>>
>>>>> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
>>>>>
>>>>> <justinmattock@gmail.com> wrote:
>>>>>>
>>>>>> what I can try, is(not at the convention, on eth0
>>>>>> at the moment), but when I get back to the convention
>>>>>> center place I can try your patch as well as the
>>>>>> modprobe option, to see if I can get any signs of
>>>>>> a recreation(if so I'll bisect there).
>>>>>
>>>>> The debug info I just need upon load of the module, I don't need you
>>>>> to run the debug stuff to try to reproduce. The debug print upon load
>>>>> will tell us the rxbuf size and cache line size.
>>>>>
>>>>> Luis
>>>>
>>>> o.k. it's not pretty due
>>>> to loads of avc's for SELinux:
>>>> (I run a rootless system).
>>>>
>>>> [ 84.172649] ath9k: Driver unloaded
>>>> [ 100.675300] audit_printk_skb: 6 callbacks suppressed
>>>> [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied {
>>>> search
>>>> } for pid=2168 comm="modprobe" name="modules" dev=sda3 ino=2500
>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>> tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
>>>> [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied {
>>>> search
>>>> } for pid=2168 comm="modprobe" name="2.6.34-rc7-00057-gcdfda35"
>>>> dev=sda3 ino=524392 scontext=name:staff_r:staff_sudo_t:s0
>>>> tcontext=name:object_r:modules_object_t:s0 tclass=dir
>>>> [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read
>>>> }
>>>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>>> [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open
>>>> }
>>>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>>> [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e
>>>> syscall=2 success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0
>>>> ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
>>>> sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
>>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>> [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied {
>>>> getattr } for pid=2168 comm="modprobe"
>>>> path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
>>>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
>>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>>> [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e
>>>> syscall=5 success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0
>>>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
>>>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
>>>> exe="/sbin/modprobe"
>>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>> [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
>>>> IRQ 17
>>>> [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
>>>> [ 100.828787] ath: EEPROM regdomain: 0x64
>>>> [ 100.828790] ath: EEPROM indicates we should expect a direct regpair
>>>> map [ 100.828793] ath: Country alpha2 being used: 00
>>>> [ 100.828795] ath: Regpair used: 0x64
>>>> [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied {
>>>> search
>>>> } for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs ino=18
>>>> scontext=name:staff_r:staff_sudo_t:s0
>>>> tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
>>>> [ 100.848788] phy1: Selected rate control algorithm
>>>> 'ath9k_rate_control'
>>>> [ 100.850035] Registered led device: ath9k-phy1::radio
>>>> [ 100.850488] Registered led device: ath9k-phy1::assoc
>>>> [ 100.851227] Registered led device: ath9k-phy1::tx
>>>> [ 100.851633] Registered led device: ath9k-phy1::rx
>>>> [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
>>>> mem=0xffffc900005a0000, irq=17
>>>> [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e
>>>> syscall=175 success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0
>>>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
>>>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
>>>> exe="/sbin/modprobe"
>>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>>
>>>> but there you go dmesg of the debug info for you
>>>
>>> Justin, did you forget to use the debug parameter on modprobe ath9k?
>>>
>>> modprobe ath9k debug=0x0000020
>>>
>>> I do not see the output I expected.
>>
>> i think you have to do at least "ifconfig wlan0 up" to see it - (at least
>> for
>> ath5k).
>>
>> bruno
>>
>
> didn't think todo so, I'll redu
> again and see. BTW: the connection
> over here is dodgy(hotel) should I at-least
> find a stable access point?
Up to you, just need that print line.
ath_print(common, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n",
common->cachelsz, common->rx_bufsize);
Luis
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Justin P. Mattock @ 2010-05-14 6:31 UTC (permalink / raw)
To: Bruno Randolf
Cc: Luis R. Rodriguez, Luis Rodriguez, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <201005141520.30802.br1@einfach.org>
On 05/13/10 23:20, Bruno Randolf wrote:
> On Friday 14 May 2010 15:16:22 Luis R. Rodriguez wrote:
>> On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
>>
>> <justinmattock@gmail.com> wrote:
>>> On 05/13/10 21:01, Luis R. Rodriguez wrote:
>>>> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
>>>>
>>>> <justinmattock@gmail.com> wrote:
>>>>> what I can try, is(not at the convention, on eth0
>>>>> at the moment), but when I get back to the convention
>>>>> center place I can try your patch as well as the
>>>>> modprobe option, to see if I can get any signs of
>>>>> a recreation(if so I'll bisect there).
>>>>
>>>> The debug info I just need upon load of the module, I don't need you
>>>> to run the debug stuff to try to reproduce. The debug print upon load
>>>> will tell us the rxbuf size and cache line size.
>>>>
>>>> Luis
>>>
>>> o.k. it's not pretty due
>>> to loads of avc's for SELinux:
>>> (I run a rootless system).
>>>
>>> [ 84.172649] ath9k: Driver unloaded
>>> [ 100.675300] audit_printk_skb: 6 callbacks suppressed
>>> [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied { search
>>> } for pid=2168 comm="modprobe" name="modules" dev=sda3 ino=2500
>>> scontext=name:staff_r:staff_sudo_t:s0
>>> tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
>>> [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied { search
>>> } for pid=2168 comm="modprobe" name="2.6.34-rc7-00057-gcdfda35"
>>> dev=sda3 ino=524392 scontext=name:staff_r:staff_sudo_t:s0
>>> tcontext=name:object_r:modules_object_t:s0 tclass=dir
>>> [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read }
>>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>>> scontext=name:staff_r:staff_sudo_t:s0
>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>> [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open }
>>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>>> scontext=name:staff_r:staff_sudo_t:s0
>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>> [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e
>>> syscall=2 success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0
>>> ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
>>> sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>> [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied {
>>> getattr } for pid=2168 comm="modprobe"
>>> path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
>>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
>>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>>> [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e
>>> syscall=5 success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0
>>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
>>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
>>> exe="/sbin/modprobe"
>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>> [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
>>> IRQ 17
>>> [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
>>> [ 100.828787] ath: EEPROM regdomain: 0x64
>>> [ 100.828790] ath: EEPROM indicates we should expect a direct regpair
>>> map [ 100.828793] ath: Country alpha2 being used: 00
>>> [ 100.828795] ath: Regpair used: 0x64
>>> [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied { search
>>> } for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs ino=18
>>> scontext=name:staff_r:staff_sudo_t:s0
>>> tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
>>> [ 100.848788] phy1: Selected rate control algorithm 'ath9k_rate_control'
>>> [ 100.850035] Registered led device: ath9k-phy1::radio
>>> [ 100.850488] Registered led device: ath9k-phy1::assoc
>>> [ 100.851227] Registered led device: ath9k-phy1::tx
>>> [ 100.851633] Registered led device: ath9k-phy1::rx
>>> [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
>>> mem=0xffffc900005a0000, irq=17
>>> [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e
>>> syscall=175 success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0
>>> items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
>>> egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
>>> exe="/sbin/modprobe"
>>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>>
>>> but there you go dmesg of the debug info for you
>>
>> Justin, did you forget to use the debug parameter on modprobe ath9k?
>>
>> modprobe ath9k debug=0x0000020
>>
>> I do not see the output I expected.
>
> i think you have to do at least "ifconfig wlan0 up" to see it - (at least for
> ath5k).
>
> bruno
>
didn't think todo so, I'll redu
again and see. BTW: the connection
over here is dodgy(hotel) should I at-least
find a stable access point? i.g. convetion
center seemed semi somewhat there
Justin P. Mattock
^ permalink raw reply
* Architecture for wireless driver development in the Linux environment
From: Madhavi Manchala @ 2010-05-14 6:23 UTC (permalink / raw)
To: linux-wireless
Dear Experts,
I am new to the wireless driver development in the Linux environment.
I have gone through the http://wireless.kernel.org/ link about the
wireless driver development in the Linux environment. However, I did
not find any architecture or skeleton driver like usb-skeleton.c file
either in the drivers/Documentation or in the mentioned link. I want
to develop a driver for USB WIFI device for x86 architecture. Please
let me where can find the USB WIFI driver development architecture in
the Linux environment.
http://wireless.kernel.org/en/developers/Documentation/cfg80211
What is cfg80211? Are we need to follow this configuration method for
developing the drivers in the Linux environment?
Thanks and Regards,
Madhavi.
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Bruno Randolf @ 2010-05-14 6:20 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Justin P. Mattock, Luis Rodriguez, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <AANLkTinE1q2K3j-IwCa3IPzTUChgi9wKTqBrVR1mGlv9@mail.gmail.com>
On Friday 14 May 2010 15:16:22 Luis R. Rodriguez wrote:
> On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
>
> <justinmattock@gmail.com> wrote:
> > On 05/13/10 21:01, Luis R. Rodriguez wrote:
> >> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
> >>
> >> <justinmattock@gmail.com> wrote:
> >>> what I can try, is(not at the convention, on eth0
> >>> at the moment), but when I get back to the convention
> >>> center place I can try your patch as well as the
> >>> modprobe option, to see if I can get any signs of
> >>> a recreation(if so I'll bisect there).
> >>
> >> The debug info I just need upon load of the module, I don't need you
> >> to run the debug stuff to try to reproduce. The debug print upon load
> >> will tell us the rxbuf size and cache line size.
> >>
> >> Luis
> >
> > o.k. it's not pretty due
> > to loads of avc's for SELinux:
> > (I run a rootless system).
> >
> > [ 84.172649] ath9k: Driver unloaded
> > [ 100.675300] audit_printk_skb: 6 callbacks suppressed
> > [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied { search
> > } for pid=2168 comm="modprobe" name="modules" dev=sda3 ino=2500
> > scontext=name:staff_r:staff_sudo_t:s0
> > tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
> > [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied { search
> > } for pid=2168 comm="modprobe" name="2.6.34-rc7-00057-gcdfda35"
> > dev=sda3 ino=524392 scontext=name:staff_r:staff_sudo_t:s0
> > tcontext=name:object_r:modules_object_t:s0 tclass=dir
> > [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read }
> > for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
> > scontext=name:staff_r:staff_sudo_t:s0
> > tcontext=name:object_r:modules_object_t:s0 tclass=file
> > [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open }
> > for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
> > scontext=name:staff_r:staff_sudo_t:s0
> > tcontext=name:object_r:modules_object_t:s0 tclass=file
> > [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e
> > syscall=2 success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0
> > ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
> > sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
> > subj=name:staff_r:staff_sudo_t:s0 key=(null)
> > [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied {
> > getattr } for pid=2168 comm="modprobe"
> > path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
> > ino=525251 scontext=name:staff_r:staff_sudo_t:s0
> > tcontext=name:object_r:modules_object_t:s0 tclass=file
> > [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e
> > syscall=5 success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0
> > items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
> > egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
> > exe="/sbin/modprobe"
> > subj=name:staff_r:staff_sudo_t:s0 key=(null)
> > [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) ->
> > IRQ 17
> > [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
> > [ 100.828787] ath: EEPROM regdomain: 0x64
> > [ 100.828790] ath: EEPROM indicates we should expect a direct regpair
> > map [ 100.828793] ath: Country alpha2 being used: 00
> > [ 100.828795] ath: Regpair used: 0x64
> > [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied { search
> > } for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs ino=18
> > scontext=name:staff_r:staff_sudo_t:s0
> > tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
> > [ 100.848788] phy1: Selected rate control algorithm 'ath9k_rate_control'
> > [ 100.850035] Registered led device: ath9k-phy1::radio
> > [ 100.850488] Registered led device: ath9k-phy1::assoc
> > [ 100.851227] Registered led device: ath9k-phy1::tx
> > [ 100.851633] Registered led device: ath9k-phy1::rx
> > [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
> > mem=0xffffc900005a0000, irq=17
> > [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e
> > syscall=175 success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0
> > items=0 ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
> > egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="modprobe"
> > exe="/sbin/modprobe"
> > subj=name:staff_r:staff_sudo_t:s0 key=(null)
> >
> > but there you go dmesg of the debug info for you
>
> Justin, did you forget to use the debug parameter on modprobe ath9k?
>
> modprobe ath9k debug=0x0000020
>
> I do not see the output I expected.
i think you have to do at least "ifconfig wlan0 up" to see it - (at least for
ath5k).
bruno
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Justin P. Mattock @ 2010-05-14 6:20 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Luis Rodriguez, Bruno Randolf, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <AANLkTinE1q2K3j-IwCa3IPzTUChgi9wKTqBrVR1mGlv9@mail.gmail.com>
On 05/13/10 23:16, Luis R. Rodriguez wrote:
> On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
> <justinmattock@gmail.com> wrote:
>> On 05/13/10 21:01, Luis R. Rodriguez wrote:
>>>
>>> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
>>> <justinmattock@gmail.com> wrote:
>>>
>>>>
>>>> what I can try, is(not at the convention, on eth0
>>>> at the moment), but when I get back to the convention
>>>> center place I can try your patch as well as the
>>>> modprobe option, to see if I can get any signs of
>>>> a recreation(if so I'll bisect there).
>>>
>>> The debug info I just need upon load of the module, I don't need you
>>> to run the debug stuff to try to reproduce. The debug print upon load
>>> will tell us the rxbuf size and cache line size.
>>>
>>> Luis
>>>
>>
>> o.k. it's not pretty due
>> to loads of avc's for SELinux:
>> (I run a rootless system).
>>
>> [ 84.172649] ath9k: Driver unloaded
>> [ 100.675300] audit_printk_skb: 6 callbacks suppressed
>> [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied { search }
>> for pid=2168 comm="modprobe" name="modules" dev=sda3 ino=2500
>> scontext=name:staff_r:staff_sudo_t:s0
>> tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
>> [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied { search }
>> for pid=2168 comm="modprobe" name="2.6.34-rc7-00057-gcdfda35" dev=sda3
>> ino=524392 scontext=name:staff_r:staff_sudo_t:s0
>> tcontext=name:object_r:modules_object_t:s0 tclass=dir
>> [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read }
>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>> scontext=name:staff_r:staff_sudo_t:s0
>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>> [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open }
>> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
>> scontext=name:staff_r:staff_sudo_t:s0
>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>> [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e syscall=2
>> success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0 ppid=2080 pid=2168
>> auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0
>> ses=1 comm="modprobe" exe="/sbin/modprobe" subj=name:staff_r:staff_sudo_t:s0
>> key=(null)
>> [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied { getattr }
>> for pid=2168 comm="modprobe"
>> path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
>> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
>> tcontext=name:object_r:modules_object_t:s0 tclass=file
>> [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e syscall=5
>> success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0 items=0
>> ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
>> fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>> [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ
>> 17
>> [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
>> [ 100.828787] ath: EEPROM regdomain: 0x64
>> [ 100.828790] ath: EEPROM indicates we should expect a direct regpair map
>> [ 100.828793] ath: Country alpha2 being used: 00
>> [ 100.828795] ath: Regpair used: 0x64
>> [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied { search }
>> for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs ino=18
>> scontext=name:staff_r:staff_sudo_t:s0
>> tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
>> [ 100.848788] phy1: Selected rate control algorithm 'ath9k_rate_control'
>> [ 100.850035] Registered led device: ath9k-phy1::radio
>> [ 100.850488] Registered led device: ath9k-phy1::assoc
>> [ 100.851227] Registered led device: ath9k-phy1::tx
>> [ 100.851633] Registered led device: ath9k-phy1::rx
>> [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
>> mem=0xffffc900005a0000, irq=17
>> [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e syscall=175
>> success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0 items=0 ppid=2080
>> pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
>> tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
>> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>>
>> but there you go dmesg of the debug info for you
>
> Justin, did you forget to use the debug parameter on modprobe ath9k?
>
> modprobe ath9k debug=0x0000020
>
> I do not see the output I expected.
>
> Luis
>
no.. I used your code
literally i.g. just copied and
pasted as is.
I can give that a try again
and see.Before though what
kernel parameters/kconfig might I be missing
just to be sure?
Justin P. Mattock
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Luis R. Rodriguez @ 2010-05-14 6:16 UTC (permalink / raw)
To: Justin P. Mattock
Cc: Luis Rodriguez, Bruno Randolf, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List
In-Reply-To: <4BECD518.6040801@gmail.com>
On Thu, May 13, 2010 at 9:44 PM, Justin P. Mattock
<justinmattock@gmail.com> wrote:
> On 05/13/10 21:01, Luis R. Rodriguez wrote:
>>
>> On Thu, May 13, 2010 at 7:14 PM, Justin P. Mattock
>> <justinmattock@gmail.com> wrote:
>>
>>>
>>> what I can try, is(not at the convention, on eth0
>>> at the moment), but when I get back to the convention
>>> center place I can try your patch as well as the
>>> modprobe option, to see if I can get any signs of
>>> a recreation(if so I'll bisect there).
>>
>> The debug info I just need upon load of the module, I don't need you
>> to run the debug stuff to try to reproduce. The debug print upon load
>> will tell us the rxbuf size and cache line size.
>>
>> Luis
>>
>
> o.k. it's not pretty due
> to loads of avc's for SELinux:
> (I run a rootless system).
>
> [ 84.172649] ath9k: Driver unloaded
> [ 100.675300] audit_printk_skb: 6 callbacks suppressed
> [ 100.675306] type=1400 audit(1273811633.675:20): avc: denied { search }
> for pid=2168 comm="modprobe" name="modules" dev=sda3 ino=2500
> scontext=name:staff_r:staff_sudo_t:s0
> tcontext=system_u:object_r:modules_object_t:s0 tclass=dir
> [ 100.675408] type=1400 audit(1273811633.675:20): avc: denied { search }
> for pid=2168 comm="modprobe" name="2.6.34-rc7-00057-gcdfda35" dev=sda3
> ino=524392 scontext=name:staff_r:staff_sudo_t:s0
> tcontext=name:object_r:modules_object_t:s0 tclass=dir
> [ 100.675552] type=1400 audit(1273811633.675:20): avc: denied { read }
> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
> scontext=name:staff_r:staff_sudo_t:s0
> tcontext=name:object_r:modules_object_t:s0 tclass=file
> [ 100.675598] type=1400 audit(1273811633.675:20): avc: denied { open }
> for pid=2168 comm="modprobe" name="modules.dep.bin" dev=sda3 ino=525251
> scontext=name:staff_r:staff_sudo_t:s0
> tcontext=name:object_r:modules_object_t:s0 tclass=file
> [ 100.675748] type=1300 audit(1273811633.675:20): arch=c000003e syscall=2
> success=yes exit=3 a0=60d140 a1=0 a2=1b6 a3=0 items=0 ppid=2080 pid=2168
> auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0
> ses=1 comm="modprobe" exe="/sbin/modprobe" subj=name:staff_r:staff_sudo_t:s0
> key=(null)
> [ 100.675902] type=1400 audit(1273811633.675:21): avc: denied { getattr }
> for pid=2168 comm="modprobe"
> path="/lib/modules/2.6.34-rc7-00057-gcdfda35/modules.dep.bin" dev=sda3
> ino=525251 scontext=name:staff_r:staff_sudo_t:s0
> tcontext=name:object_r:modules_object_t:s0 tclass=file
> [ 100.676052] type=1300 audit(1273811633.675:21): arch=c000003e syscall=5
> success=yes exit=0 a0=3 a1=7fffd2d1dd70 a2=7fffd2d1dd70 a3=0 items=0
> ppid=2080 pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
> fsgid=0 tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
> subj=name:staff_r:staff_sudo_t:s0 key=(null)
> [ 100.698392] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ
> 17
> [ 100.698409] ath9k 0000:03:00.0: setting latency timer to 64
> [ 100.828787] ath: EEPROM regdomain: 0x64
> [ 100.828790] ath: EEPROM indicates we should expect a direct regpair map
> [ 100.828793] ath: Country alpha2 being used: 00
> [ 100.828795] ath: Regpair used: 0x64
> [ 100.848609] type=1400 audit(1273811633.678:22): avc: denied { search }
> for pid=2168 comm="modprobe" name="ieee80211" dev=debugfs ino=18
> scontext=name:staff_r:staff_sudo_t:s0
> tcontext=system_u:object_r:debugfs_t:s0 tclass=dir
> [ 100.848788] phy1: Selected rate control algorithm 'ath9k_rate_control'
> [ 100.850035] Registered led device: ath9k-phy1::radio
> [ 100.850488] Registered led device: ath9k-phy1::assoc
> [ 100.851227] Registered led device: ath9k-phy1::tx
> [ 100.851633] Registered led device: ath9k-phy1::rx
> [ 100.851640] phy1: Atheros AR5418 MAC/BB Rev:2 AR5133 RF Rev:81
> mem=0xffffc900005a0000, irq=17
> [ 100.852240] type=1300 audit(1273811633.678:22): arch=c000003e syscall=175
> success=yes exit=0 a0=7f1e9d6ab010 a1=19580 a2=60d920 a3=0 items=0 ppid=2080
> pid=2168 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
> tty=pts0 ses=1 comm="modprobe" exe="/sbin/modprobe"
> subj=name:staff_r:staff_sudo_t:s0 key=(null)
>
> but there you go dmesg of the debug info for you
Justin, did you forget to use the debug parameter on modprobe ath9k?
modprobe ath9k debug=0x0000020
I do not see the output I expected.
Luis
^ permalink raw reply
* [PATCH 4/4] ath9k_htc: Increase credit size
From: Sujith @ 2010-05-14 5:48 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
This is the maximum supported by the firmware.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/htc_hst.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 064397f..2173196 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -159,7 +159,7 @@ static int htc_config_pipe_credits(struct htc_target *target)
cp_msg->message_id = cpu_to_be16(HTC_MSG_CONFIG_PIPE_ID);
cp_msg->pipe_id = USB_WLAN_TX_PIPE;
- cp_msg->credits = 28;
+ cp_msg->credits = 33;
target->htc_flags |= HTC_OP_CONFIG_PIPE_CREDITS;
--
1.7.1
^ permalink raw reply related
* [PATCH 3/4] ath9k_htc: Remove HW queue translation
From: Sujith @ 2010-05-14 5:48 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
There is no need to determine the HW queue
for each packet that is transmitted. The endpoint
can be chosen directly based on the queue type
that mac80211 sends down.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 15e716a..8d461aa 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -81,7 +81,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
struct ath9k_htc_vif *avp;
struct ath9k_htc_tx_ctl tx_ctl;
enum htc_endpoint_id epid;
- u16 qnum, hw_qnum;
+ u16 qnum;
__le16 fc;
u8 *tx_fhdr;
u8 sta_idx;
@@ -141,22 +141,21 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
memcpy(tx_fhdr, (u8 *) &tx_hdr, sizeof(tx_hdr));
qnum = skb_get_queue_mapping(skb);
- hw_qnum = get_hw_qnum(qnum, priv->hwq_map);
- switch (hw_qnum) {
+ switch (qnum) {
case 0:
- TX_QSTAT_INC(WME_AC_BE);
- epid = priv->data_be_ep;
+ TX_QSTAT_INC(WME_AC_VO);
+ epid = priv->data_vo_ep;
break;
- case 2:
+ case 1:
TX_QSTAT_INC(WME_AC_VI);
epid = priv->data_vi_ep;
break;
- case 3:
- TX_QSTAT_INC(WME_AC_VO);
- epid = priv->data_vo_ep;
+ case 2:
+ TX_QSTAT_INC(WME_AC_BE);
+ epid = priv->data_be_ep;
break;
- case 1:
+ case 3:
default:
TX_QSTAT_INC(WME_AC_BK);
epid = priv->data_bk_ep;
--
1.7.1
^ permalink raw reply related
* [PATCH 2/4] ath9k_htc: Initialize beacon/CAB queues
From: Sujith @ 2010-05-14 5:48 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
This patch initializes the beacon and CAB HW queues
when the driver is loaded.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/htc.h | 4 +++
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 14 ++++++++++++
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 28 ++++++++++++++++++------
3 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 2dd9ad3..47255c8 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -392,6 +392,9 @@ struct ath9k_htc_priv {
int led_off_duration;
int led_on_cnt;
int led_off_cnt;
+
+ int beaconq;
+ int cabq;
int hwq_map[ATH9K_WME_AC_VO+1];
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
@@ -428,6 +431,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb);
void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv,
enum ath9k_tx_queue_subtype qtype);
+int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv);
int get_hw_qnum(u16 queue, int *hwq_map);
int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum,
struct ath9k_tx_queue_info *qinfo);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index dc01507..7ec2c2e 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -420,6 +420,20 @@ static int ath9k_init_queues(struct ath9k_htc_priv *priv)
for (i = 0; i < ARRAY_SIZE(priv->hwq_map); i++)
priv->hwq_map[i] = -1;
+ priv->beaconq = ath9k_hw_beaconq_setup(priv->ah);
+ if (priv->beaconq == -1) {
+ ath_print(common, ATH_DBG_FATAL,
+ "Unable to setup BEACON xmit queue\n");
+ goto err;
+ }
+
+ priv->cabq = ath9k_htc_cabq_setup(priv);
+ if (priv->cabq == -1) {
+ ath_print(common, ATH_DBG_FATAL,
+ "Unable to setup CAB xmit queue\n");
+ goto err;
+ }
+
if (!ath9k_htc_txq_setup(priv, ATH9K_WME_AC_BE)) {
ath_print(common, ATH_DBG_FATAL,
"Unable to setup xmit queue for BE traffic\n");
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 2a0585d..15e716a 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -20,6 +20,16 @@
/* TX */
/******/
+#define ATH9K_HTC_INIT_TXQ(subtype) do { \
+ qi.tqi_subtype = subtype; \
+ qi.tqi_aifs = ATH9K_TXQ_USEDEFAULT; \
+ qi.tqi_cwmin = ATH9K_TXQ_USEDEFAULT; \
+ qi.tqi_cwmax = ATH9K_TXQ_USEDEFAULT; \
+ qi.tqi_physCompBuf = 0; \
+ qi.tqi_qflags = TXQ_FLAG_TXEOLINT_ENABLE | \
+ TXQ_FLAG_TXDESCINT_ENABLE; \
+ } while (0)
+
int get_hw_qnum(u16 queue, int *hwq_map)
{
switch (queue) {
@@ -297,13 +307,7 @@ bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv,
int qnum;
memset(&qi, 0, sizeof(qi));
-
- qi.tqi_subtype = subtype;
- qi.tqi_aifs = ATH9K_TXQ_USEDEFAULT;
- qi.tqi_cwmin = ATH9K_TXQ_USEDEFAULT;
- qi.tqi_cwmax = ATH9K_TXQ_USEDEFAULT;
- qi.tqi_physCompBuf = 0;
- qi.tqi_qflags = TXQ_FLAG_TXEOLINT_ENABLE | TXQ_FLAG_TXDESCINT_ENABLE;
+ ATH9K_HTC_INIT_TXQ(subtype);
qnum = ath9k_hw_setuptxqueue(priv->ah, ATH9K_TX_QUEUE_DATA, &qi);
if (qnum == -1)
@@ -321,6 +325,16 @@ bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv,
return true;
}
+int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)
+{
+ struct ath9k_tx_queue_info qi;
+
+ memset(&qi, 0, sizeof(qi));
+ ATH9K_HTC_INIT_TXQ(0);
+
+ return ath9k_hw_setuptxqueue(priv->ah, ATH9K_TX_QUEUE_CAB, &qi);
+}
+
/******/
/* RX */
/******/
--
1.7.1
^ permalink raw reply related
* [PATCH 1/4] ath9k_htc: Add queue statistics to xmit debugfs file
From: Sujith @ 2010-05-14 5:48 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/htc.h | 3 +++
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 13 +++++++++++++
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 4 ++++
3 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index ad556aa..2dd9ad3 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -256,12 +256,15 @@ struct ath9k_htc_tx_ctl {
#define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++)
#define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++)
+#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
+
struct ath_tx_stats {
u32 buf_queued;
u32 buf_completed;
u32 skb_queued;
u32 skb_completed;
u32 skb_dropped;
+ u32 queue_stats[WME_NUM_AC];
};
struct ath_rx_stats {
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 9d371c1..cf1112b 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -617,6 +617,19 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
"%20s : %10u\n", "SKBs dropped",
priv->debug.tx_stats.skb_dropped);
+ len += snprintf(buf + len, sizeof(buf) - len,
+ "%20s : %10u\n", "BE queued",
+ priv->debug.tx_stats.queue_stats[WME_AC_BE]);
+ len += snprintf(buf + len, sizeof(buf) - len,
+ "%20s : %10u\n", "BK queued",
+ priv->debug.tx_stats.queue_stats[WME_AC_BK]);
+ len += snprintf(buf + len, sizeof(buf) - len,
+ "%20s : %10u\n", "VI queued",
+ priv->debug.tx_stats.queue_stats[WME_AC_VI]);
+ len += snprintf(buf + len, sizeof(buf) - len,
+ "%20s : %10u\n", "VO queued",
+ priv->debug.tx_stats.queue_stats[WME_AC_VO]);
+
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 28abc7d..2a0585d 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -135,16 +135,20 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
switch (hw_qnum) {
case 0:
+ TX_QSTAT_INC(WME_AC_BE);
epid = priv->data_be_ep;
break;
case 2:
+ TX_QSTAT_INC(WME_AC_VI);
epid = priv->data_vi_ep;
break;
case 3:
+ TX_QSTAT_INC(WME_AC_VO);
epid = priv->data_vo_ep;
break;
case 1:
default:
+ TX_QSTAT_INC(WME_AC_BK);
epid = priv->data_bk_ep;
break;
}
--
1.7.1
^ permalink raw reply related
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Justin P. Mattock @ 2010-05-14 5:19 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Pekka Enberg, linux-wireless, Linux Kernel Mailing List,
Christoph Lameter
In-Reply-To: <AANLkTimmctk1GWOTlW8Han7E3gJVgqJjUAMeqYnvyuHn@mail.gmail.com>
On 05/13/10 22:07, Luis R. Rodriguez wrote:
> On Thu, May 13, 2010 at 9:55 PM, Pekka Enberg<penberg@cs.helsinki.fi> wrote:
>> Hi Luis,
>>
>> On Fri, May 14, 2010 at 2:01 AM, Luis R. Rodriguez
>> <lrodriguez@atheros.com> wrote:
>>> On Thu, May 13, 2010 at 3:17 PM, Justin P. Mattock
>>> <justinmattock@gmail.com> wrote:
>>>> not sure what this is, but while at a convention
>>>> I was trying to access the internet and(below is
>>>> full dmesg) this showed up.
>>>>
>>>> After receiving this, I sat and tried to re-create
>>>> my steps to reproduce but had no luck(was even going
>>>> todo a bisect n the spot if I could re-create).
>>>
>>> OK this stuff is hard to reproduce it seems.. you have an Atheros
>>> AR5418 MAC/BB Rev:2 AR5133 RF Rev:81, what kconfig option do you use
>>> to get the poison stuff? I am just surprised we haven't seen it
>>> ourselves yet. Let me make sure all of us get this kconfig option
>>> enabled.
>>
>> CONFIG_SLUB_DEBUG and then either CONFIG_SLUB_DEBUG_ON or pass
>> 'slub_debug' as kernel parameter.
>
> Ah OK I had CONFIG_SLUB_DEBUG but not CONFIG_SLUB_DEBUG_ON, will
> enable it from here on.
>
> Luis
>
I enable these options as well..
(then see If I can(hopefully)re-create this
then I'll bisect it).
Justin P. Mattock
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Luis R. Rodriguez @ 2010-05-14 5:07 UTC (permalink / raw)
To: Pekka Enberg
Cc: Justin P. Mattock, linux-wireless, Linux Kernel Mailing List,
Christoph Lameter
In-Reply-To: <AANLkTim7fnKebMoEu1DjD3S-15ZqlTUez3Lpp0wGVJQ6@mail.gmail.com>
On Thu, May 13, 2010 at 9:55 PM, Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> Hi Luis,
>
> On Fri, May 14, 2010 at 2:01 AM, Luis R. Rodriguez
> <lrodriguez@atheros.com> wrote:
>> On Thu, May 13, 2010 at 3:17 PM, Justin P. Mattock
>> <justinmattock@gmail.com> wrote:
>>> not sure what this is, but while at a convention
>>> I was trying to access the internet and(below is
>>> full dmesg) this showed up.
>>>
>>> After receiving this, I sat and tried to re-create
>>> my steps to reproduce but had no luck(was even going
>>> todo a bisect n the spot if I could re-create).
>>
>> OK this stuff is hard to reproduce it seems.. you have an Atheros
>> AR5418 MAC/BB Rev:2 AR5133 RF Rev:81, what kconfig option do you use
>> to get the poison stuff? I am just surprised we haven't seen it
>> ourselves yet. Let me make sure all of us get this kconfig option
>> enabled.
>
> CONFIG_SLUB_DEBUG and then either CONFIG_SLUB_DEBUG_ON or pass
> 'slub_debug' as kernel parameter.
Ah OK I had CONFIG_SLUB_DEBUG but not CONFIG_SLUB_DEBUG_ON, will
enable it from here on.
Luis
^ permalink raw reply
* Re: ath9k: BUG kmalloc-8192: Poison overwritten
From: Pekka Enberg @ 2010-05-14 4:55 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Justin P. Mattock, linux-wireless, Linux Kernel Mailing List,
Christoph Lameter
In-Reply-To: <AANLkTim7B5z76zJ33by6SGMgSy1gZF6qiwhEhAQ3NUtG@mail.gmail.com>
Hi Luis,
On Fri, May 14, 2010 at 2:01 AM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:
> On Thu, May 13, 2010 at 3:17 PM, Justin P. Mattock
> <justinmattock@gmail.com> wrote:
>> not sure what this is, but while at a convention
>> I was trying to access the internet and(below is
>> full dmesg) this showed up.
>>
>> After receiving this, I sat and tried to re-create
>> my steps to reproduce but had no luck(was even going
>> todo a bisect n the spot if I could re-create).
>
> OK this stuff is hard to reproduce it seems.. you have an Atheros
> AR5418 MAC/BB Rev:2 AR5133 RF Rev:81, what kconfig option do you use
> to get the poison stuff? I am just surprised we haven't seen it
> ourselves yet. Let me make sure all of us get this kconfig option
> enabled.
CONFIG_SLUB_DEBUG and then either CONFIG_SLUB_DEBUG_ON or pass
'slub_debug' as kernel parameter.
^ permalink raw reply
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