2012-02-27 18:49:24

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH 0/4] iwlegacy cleanups

The first two patches reorganize the Kconfig for the iwlegacy drivers. This is
intended to make the debug options appear in a more logical manner.

The second two patches remove some unused code from the iwlegacy driver.

These patches are based on the wireless-next tree.

Greg Dietsche (4):
iwlegacy: Kconfig: Move Debugging Options
iwlegacy: Kconfig: Change Debug Option to be more clear
iwlegacy: remove enum iw_calib and related code
iwlegacy: remove unused enum il4965_calib_enabled_state

drivers/net/wireless/iwlegacy/4965-calib.c | 12 ----
drivers/net/wireless/iwlegacy/4965-mac.c | 1 -
drivers/net/wireless/iwlegacy/4965.h | 1 -
drivers/net/wireless/iwlegacy/Kconfig | 78 ++++++++++++++--------------
drivers/net/wireless/iwlegacy/common.h | 23 --------
5 files changed, 39 insertions(+), 76 deletions(-)

--
1.7.6.4



2012-02-27 18:49:25

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH 3/4] iwlegacy: remove enum iw_calib and related code

Remove the enum il_calib. It defined one identifier: IL_CALIB_MAX.
Remove the function il4965_calib_free_results. It was doing nothing
because IL_CALIB_MAX is zero. Next, remove calib_results from the
il_priv structure and also remove the associated return
type/struct il_calib_result.

Signed-off-by: Greg Dietsche <[email protected]>
---
drivers/net/wireless/iwlegacy/4965-calib.c | 12 ------------
drivers/net/wireless/iwlegacy/4965-mac.c | 1 -
drivers/net/wireless/iwlegacy/4965.h | 1 -
drivers/net/wireless/iwlegacy/common.h | 18 ------------------
4 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/4965-calib.c b/drivers/net/wireless/iwlegacy/4965-calib.c
index 47c20e3..e78bdef 100644
--- a/drivers/net/wireless/iwlegacy/4965-calib.c
+++ b/drivers/net/wireless/iwlegacy/4965-calib.c
@@ -79,18 +79,6 @@ struct stats_general_data {
u32 beacon_energy_c;
};

-void
-il4965_calib_free_results(struct il_priv *il)
-{
- int i;
-
- for (i = 0; i < IL_CALIB_MAX; i++) {
- kfree(il->calib_results[i].buf);
- il->calib_results[i].buf = NULL;
- il->calib_results[i].buf_len = 0;
- }
-}
-
/*****************************************************************************
* RUNTIME calibrations framework
*****************************************************************************/
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 2d01db0..3160e37 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -6347,7 +6347,6 @@ err:
static void
il4965_uninit_drv(struct il_priv *il)
{
- il4965_calib_free_results(il);
il_free_geos(il);
il_free_channel_map(il);
kfree(il->scan_cmd);
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 208a456..1db6776 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -927,7 +927,6 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp);
void il4965_sensitivity_calibration(struct il_priv *il, void *resp);
void il4965_init_sensitivity(struct il_priv *il);
void il4965_reset_run_time_calib(struct il_priv *il);
-void il4965_calib_free_results(struct il_priv *il);

/* Debug */
#ifdef CONFIG_IWLEGACY_DEBUGFS
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 6ed9871..d0de922 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -961,21 +961,6 @@ enum il4965_calib_enabled_state {
IL_CALIB_ENABLED = 1,
};

-/*
- * enum il_calib
- * defines the order in which results of initial calibrations
- * should be sent to the runtime uCode
- */
-enum il_calib {
- IL_CALIB_MAX,
-};
-
-/* Opaque calibration results */
-struct il_calib_result {
- void *buf;
- size_t buf_len;
-};
-
enum ucode_type {
UCODE_NONE = 0,
UCODE_INIT,
@@ -1195,9 +1180,6 @@ struct il_priv {
s32 temperature; /* degrees Kelvin */
s32 last_temperature;

- /* init calibration results */
- struct il_calib_result calib_results[IL_CALIB_MAX];
-
/* Scan related variables */
unsigned long scan_start;
unsigned long scan_start_tsf;
--
1.7.6.4


2012-02-27 18:54:00

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH 2/4] iwlegacy: Kconfig: Change Debug Option to be more clear

Since the menuconfig system doesn't indent the debug options
for the 3945 /4965, add some text to make it clear which
debug options are being configured.

Signed-off-by: Greg Dietsche <[email protected]>
---
drivers/net/wireless/iwlegacy/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/Kconfig b/drivers/net/wireless/iwlegacy/Kconfig
index 4d81b80..fb91972 100644
--- a/drivers/net/wireless/iwlegacy/Kconfig
+++ b/drivers/net/wireless/iwlegacy/Kconfig
@@ -60,7 +60,7 @@ config IWL3945
say M here and read <file:Documentation/kbuild/modules.txt>. The
module will be called iwl3945.

-menu "Debugging Options"
+menu "iwl3945 / iwl4965 Debugging Options"
depends on IWLEGACY

config IWLEGACY_DEBUG
--
1.7.6.4


2012-02-27 18:37:33

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH 1/4] iwlegacy: Kconfig: Move Debugging Options

Move the debug options so they appear below the 3945 / 4965 options.

Signed-off-by: Greg Dietsche <[email protected]>
---
drivers/net/wireless/iwlegacy/Kconfig | 78 ++++++++++++++++----------------
1 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/Kconfig b/drivers/net/wireless/iwlegacy/Kconfig
index 05bd375..4d81b80 100644
--- a/drivers/net/wireless/iwlegacy/Kconfig
+++ b/drivers/net/wireless/iwlegacy/Kconfig
@@ -6,45 +6,6 @@ config IWLEGACY
select LEDS_TRIGGERS
select MAC80211_LEDS

-menu "Debugging Options"
- depends on IWLEGACY
-
-config IWLEGACY_DEBUG
- bool "Enable full debugging output in iwlegacy (iwl 3945/4965) drivers"
- depends on IWLEGACY
- ---help---
- This option will enable debug tracing output for the iwlegacy
- drivers.
-
- This will result in the kernel module being ~100k larger. You can
- control which debug output is sent to the kernel log by setting the
- value in
-
- /sys/class/net/wlan0/device/debug_level
-
- This entry will only exist if this option is enabled.
-
- To set a value, simply echo an 8-byte hex value to the same file:
-
- % echo 0x43fff > /sys/class/net/wlan0/device/debug_level
-
- You can find the list of debug mask values in:
- drivers/net/wireless/iwlegacy/common.h
-
- If this is your first time using this driver, you should say Y here
- as the debug information can assist others in helping you resolve
- any problems you may encounter.
-
-config IWLEGACY_DEBUGFS
- bool "iwlegacy (iwl 3945/4965) debugfs support"
- depends on IWLEGACY && MAC80211_DEBUGFS
- ---help---
- Enable creation of debugfs files for the iwlegacy drivers. This
- is a low-impact option that allows getting insight into the
- driver's state at runtime.
-
-endmenu
-
config IWL4965
tristate "Intel Wireless WiFi 4965AGN (iwl4965)"
depends on PCI && MAC80211
@@ -98,3 +59,42 @@ config IWL3945
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/kbuild/modules.txt>. The
module will be called iwl3945.
+
+menu "Debugging Options"
+ depends on IWLEGACY
+
+config IWLEGACY_DEBUG
+ bool "Enable full debugging output in iwlegacy (iwl 3945/4965) drivers"
+ depends on IWLEGACY
+ ---help---
+ This option will enable debug tracing output for the iwlegacy
+ drivers.
+
+ This will result in the kernel module being ~100k larger. You can
+ control which debug output is sent to the kernel log by setting the
+ value in
+
+ /sys/class/net/wlan0/device/debug_level
+
+ This entry will only exist if this option is enabled.
+
+ To set a value, simply echo an 8-byte hex value to the same file:
+
+ % echo 0x43fff > /sys/class/net/wlan0/device/debug_level
+
+ You can find the list of debug mask values in:
+ drivers/net/wireless/iwlegacy/common.h
+
+ If this is your first time using this driver, you should say Y here
+ as the debug information can assist others in helping you resolve
+ any problems you may encounter.
+
+config IWLEGACY_DEBUGFS
+ bool "iwlegacy (iwl 3945/4965) debugfs support"
+ depends on IWLEGACY && MAC80211_DEBUGFS
+ ---help---
+ Enable creation of debugfs files for the iwlegacy drivers. This
+ is a low-impact option that allows getting insight into the
+ driver's state at runtime.
+
+endmenu
--
1.7.6.4


2012-02-29 08:32:10

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: [PATCH 0/4] iwlegacy cleanups

On Mon, Feb 27, 2012 at 12:25:29PM -0600, Greg Dietsche wrote:
> The first two patches reorganize the Kconfig for the iwlegacy drivers. This is
> intended to make the debug options appear in a more logical manner.
>
> The second two patches remove some unused code from the iwlegacy driver.
>
> These patches are based on the wireless-next tree.
>
> Greg Dietsche (4):
> iwlegacy: Kconfig: Move Debugging Options
> iwlegacy: Kconfig: Change Debug Option to be more clear
> iwlegacy: remove enum iw_calib and related code
> iwlegacy: remove unused enum il4965_calib_enabled_state

ACK for series, thanks Greg.

Stanislaw

2012-02-27 18:37:31

by Greg Dietsche

[permalink] [raw]
Subject: [PATCH 4/4] iwlegacy: remove unused enum il4965_calib_enabled_state

Remove the enum il4965_calib_enabled_state because it is not used.

Signed-off-by: Greg Dietsche <[email protected]>
---
drivers/net/wireless/iwlegacy/common.h | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index d0de922..5f50177 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -956,11 +956,6 @@ enum il4965_chain_noise_state {
IL_CHAIN_NOISE_DONE,
};

-enum il4965_calib_enabled_state {
- IL_CALIB_DISABLED = 0, /* must be 0 */
- IL_CALIB_ENABLED = 1,
-};
-
enum ucode_type {
UCODE_NONE = 0,
UCODE_INIT,
--
1.7.6.4