diff mbox

[06/10] rsi: add module parameter rsi_reg

Message ID 1520260620-4694-7-git-send-email-amitkarwar@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Amitkumar Karwar March 5, 2018, 2:36 p.m. UTC
From: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>

For few regulatory customizations, we are taking rsi_reg
as module parameter.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_main.c | 4 ++++
 drivers/net/wireless/rsi/rsi_common.h   | 3 +++
 2 files changed, 7 insertions(+)

Comments

Kalle Valo March 13, 2018, 3:25 p.m. UTC | #1
Amitkumar Karwar <amitkarwar@gmail.com> writes:

> From: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
>
> For few regulatory customizations, we are taking rsi_reg
> as module parameter.

Why?

> +static u16 rsi_reg = RSI_REG_DEF;
> +module_param(rsi_reg, ushort, 0444);
> +MODULE_PARM_DESC(rsi_reg, "0 - RSI_REG_DEF, 1 - RSI_REG_DLCAR");

The documentation tells nothing.
Amitkumar Karwar March 15, 2018, 10:58 a.m. UTC | #2
On Tue, Mar 13, 2018 at 8:55 PM, Kalle Valo <kvalo@codeaurora.org> wrote:
> Amitkumar Karwar <amitkarwar@gmail.com> writes:
>
>> From: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
>>
>> For few regulatory customizations, we are taking rsi_reg
>> as module parameter.
>
> Why?

We have a custom power table and country to region mapping, This
setting will be used only for a special mode called 'dlcar'
We want to have an option to enable this mode through a module parameter.
This patch introduces a module parameter. Next patch makes use of it.
Let me know if you have any suggestions here.

>> +static u16 rsi_reg = RSI_REG_DEF;
>> +module_param(rsi_reg, ushort, 0444)
>> +MODULE_PARM_DESC(rsi_reg, "0 - RSI_REG_DEF, 1 - RSI_REG_DLCAR");
>
> The documentation tells nothing.
>

Below are the details. I will add include this info if the approach
and patches(6/10 and 7/10) look ok to you.
0 - RSI_REG_DEF
         Keep default regulatory configuration
1 - RSI_REG_DLCAR
         Enable custom settings for 'dlcar' mode

Regards,
Amitkumar
diff mbox

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c
index bf05242..e290779 100644
--- a/drivers/net/wireless/rsi/rsi_91x_main.c
+++ b/drivers/net/wireless/rsi/rsi_91x_main.c
@@ -24,6 +24,10 @@ 
 #include "rsi_coex.h"
 #include "rsi_hal.h"
 
+static u16 rsi_reg = RSI_REG_DEF;
+module_param(rsi_reg, ushort, 0444);
+MODULE_PARM_DESC(rsi_reg, "0 - RSI_REG_DEF, 1 - RSI_REG_DLCAR");
+
 u32 rsi_zone_enabled = /* INFO_ZONE |
 			INIT_ZONE |
 			MGMT_TX_ZONE |
diff --git a/drivers/net/wireless/rsi/rsi_common.h b/drivers/net/wireless/rsi/rsi_common.h
index d9ff3b8..df40556 100644
--- a/drivers/net/wireless/rsi/rsi_common.h
+++ b/drivers/net/wireless/rsi/rsi_common.h
@@ -24,6 +24,9 @@ 
 #define QUEUE_NOT_FULL                  1
 #define QUEUE_FULL                      0
 
+#define RSI_REG_DEF			0
+#define RSI_REG_DLCAR			1
+
 static inline int rsi_init_event(struct rsi_event *pevent)
 {
 	atomic_set(&pevent->event_condition, 1);