* [PATCH 2/3] ath9k: use nohwcrypt in ath_common structure
2011-01-05 19:22 [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure John W. Linville
@ 2011-01-05 19:22 ` John W. Linville
2011-01-05 19:22 ` [PATCH 3/3] ath9k_htc: " John W. Linville
2011-01-05 19:40 ` [PATCH 1/3] ath5k: move nohwcrypt to " Joe Perches
2 siblings, 0 replies; 7+ messages in thread
From: John W. Linville @ 2011-01-05 19:22 UTC (permalink / raw)
To: linux-wireless; +Cc: ath5k-devel, ath9k-devel, John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ath9k/ath9k.h | 1 -
drivers/net/wireless/ath/ath9k/init.c | 5 +++--
drivers/net/wireless/ath/ath9k/main.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index fcc087c..0e97352 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -664,7 +664,6 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
}
extern struct ieee80211_ops ath9k_ops;
-extern int modparam_nohwcrypt;
extern int led_blink;
extern int ath9k_pm_qos_value;
extern bool is_ath9k_unloaded;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index b6643b5..9aafd29 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -29,7 +29,7 @@ static unsigned int ath9k_debug = ATH_DBG_DEFAULT;
module_param_named(debug, ath9k_debug, uint, 0);
MODULE_PARM_DESC(debug, "Debugging mask");
-int modparam_nohwcrypt;
+static int modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
@@ -552,6 +552,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
common->priv = sc;
common->debug_mask = ath9k_debug;
common->btcoex_enabled = ath9k_btcoex_enable == 1;
+ common->nohwcrypt = modparam_nohwcrypt;
spin_lock_init(&common->cc_lock);
spin_lock_init(&sc->wiphy_lock);
@@ -653,7 +654,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
- if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt)
+ if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || common->nohwcrypt)
hw->flags |= IEEE80211_HW_MFP_CAPABLE;
hw->wiphy->interface_modes =
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index a818e4f..b2149ee 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1829,7 +1829,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
int ret = 0;
- if (modparam_nohwcrypt)
+ if (common->nohwcrypt)
return -ENOSPC;
mutex_lock(&sc->mutex);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] ath9k_htc: use nohwcrypt in ath_common structure
2011-01-05 19:22 [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure John W. Linville
2011-01-05 19:22 ` [PATCH 2/3] ath9k: use nohwcrypt in " John W. Linville
@ 2011-01-05 19:22 ` John W. Linville
2011-01-05 19:40 ` [PATCH 1/3] ath5k: move nohwcrypt to " Joe Perches
2 siblings, 0 replies; 7+ messages in thread
From: John W. Linville @ 2011-01-05 19:22 UTC (permalink / raw)
To: linux-wireless; +Cc: ath5k-devel, ath9k-devel, John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ath9k/htc.h | 1 -
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 5 +++--
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index a099b3e..64d1684 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -42,7 +42,6 @@
((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
extern struct ieee80211_ops ath9k_htc_ops;
-extern int htc_modparam_nohwcrypt;
enum htc_phymode {
HTC_MODE_AUTO = 0,
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 38433f9..2f1d494 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -24,8 +24,8 @@ static unsigned int ath9k_debug = ATH_DBG_DEFAULT;
module_param_named(debug, ath9k_debug, uint, 0);
MODULE_PARM_DESC(debug, "Debugging mask");
-int htc_modparam_nohwcrypt;
-module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, 0444);
+static int modparam_nohwcrypt;
+module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
#define CHAN2G(_freq, _idx) { \
@@ -641,6 +641,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv,
common->hw = priv->hw;
common->priv = priv;
common->debug_mask = ath9k_debug;
+ common->nohwcrypt = modparam_nohwcrypt;
spin_lock_init(&priv->wmi->wmi_lock);
spin_lock_init(&priv->beacon_lock);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 845b4c9..4c7ca46 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1372,7 +1372,7 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
struct ath_common *common = ath9k_hw_common(priv->ah);
int ret = 0;
- if (htc_modparam_nohwcrypt)
+ if (common->nohwcrypt)
return -ENOSPC;
mutex_lock(&priv->mutex);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure
2011-01-05 19:22 [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure John W. Linville
2011-01-05 19:22 ` [PATCH 2/3] ath9k: use nohwcrypt in " John W. Linville
2011-01-05 19:22 ` [PATCH 3/3] ath9k_htc: " John W. Linville
@ 2011-01-05 19:40 ` Joe Perches
2011-01-05 19:49 ` Bob Copeland
2 siblings, 1 reply; 7+ messages in thread
From: Joe Perches @ 2011-01-05 19:40 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, ath5k-devel, ath9k-devel
On Wed, 2011-01-05 at 14:22 -0500, John W. Linville wrote:
> diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
[]
> + bool nohwcrypt;
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> -int modparam_nohwcrypt;
> +static int modparam_nohwcrypt;
> module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
bool/int matching?
Perhaps the modparam_nohwcrypts should be
bool and S_IRUGO
> diff --git a/drivers/net/wireless/ath/ath9k/init.c
[]
> -int modparam_nohwcrypt;
> +static int modparam_nohwcrypt;
> module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
[]
> -int htc_modparam_nohwcrypt;
> -module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, 0444);
> +static int modparam_nohwcrypt;
> +module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure
2011-01-05 19:40 ` [PATCH 1/3] ath5k: move nohwcrypt to " Joe Perches
@ 2011-01-05 19:49 ` Bob Copeland
2011-01-05 19:53 ` Joe Perches
0 siblings, 1 reply; 7+ messages in thread
From: Bob Copeland @ 2011-01-05 19:49 UTC (permalink / raw)
To: Joe Perches; +Cc: John W. Linville, linux-wireless, ath5k-devel, ath9k-devel
On Wed, Jan 5, 2011 at 2:40 PM, Joe Perches <joe@perches.com> wrote:
> On Wed, 2011-01-05 at 14:22 -0500, John W. Linville wrote:
>
>> diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
> []
>> + bool nohwcrypt;
>
>> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
>> -int modparam_nohwcrypt;
>> +static int modparam_nohwcrypt;
>> module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
>
> bool/int matching?
It used to be the case that you had to use ints here. Google tells me
that changed about 2 years ago, so bool should be ok.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure
2011-01-05 19:49 ` Bob Copeland
@ 2011-01-05 19:53 ` Joe Perches
2011-01-05 20:09 ` [ath5k-devel] " Bob Copeland
0 siblings, 1 reply; 7+ messages in thread
From: Joe Perches @ 2011-01-05 19:53 UTC (permalink / raw)
To: Bob Copeland; +Cc: John W. Linville, linux-wireless, ath5k-devel, ath9k-devel
On Wed, 2011-01-05 at 14:49 -0500, Bob Copeland wrote:
> On Wed, Jan 5, 2011 at 2:40 PM, Joe Perches <joe@perches.com> wrote:
> > On Wed, 2011-01-05 at 14:22 -0500, John W. Linville wrote:
> >> diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
> > []
> >> + bool nohwcrypt;
> >> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> >> -int modparam_nohwcrypt;
> >> +static int modparam_nohwcrypt;
> >> module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
> > bool/int matching?
> It used to be the case that you had to use ints here. Google tells me
> that changed about 2 years ago, so bool should be ok.
bool is OK.
modparam_nohwcrypt is declared int and should be declared bool.
Also should be declared and used as bool in ath9k and ath9k_htc too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] [PATCH 1/3] ath5k: move nohwcrypt to ath_common structure
2011-01-05 19:53 ` Joe Perches
@ 2011-01-05 20:09 ` Bob Copeland
0 siblings, 0 replies; 7+ messages in thread
From: Bob Copeland @ 2011-01-05 20:09 UTC (permalink / raw)
To: Joe Perches; +Cc: ath9k-devel, linux-wireless, John W. Linville, ath5k-devel
On Wed, Jan 5, 2011 at 2:53 PM, Joe Perches <joe@perches.com> wrote:
>
> bool is OK.
>
Yes, I was agreeing, just pointing out (for my own benefit, I guess) that
the old rule of using int for bool modparams no longer holds.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread