aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2012-05-10 05:14:17 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-05 08:58:51 -0400
commit858403ab4434a3acd59eb892a49e1dbea30a2fcf (patch)
treed1e93fd876c05e5152387f1dd58c066c00bfdb53 /drivers
parent5add82edd14d9bf051e06588ac65c7e2182bd330 (diff)
wl18xx: export low/high band component values as module params
We use hardcoded values for the different board types. In some cases we may need to override the defaults, so export the values as module params. If not defined, the defaults for the specified board type will be used. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index ab3dd118f7de..6baeb26b79c8 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -49,6 +49,10 @@ static int n_antennas_2_param = 1;
49static int n_antennas_5_param = 1; 49static int n_antennas_5_param = 1;
50static bool checksum_param = true; 50static bool checksum_param = true;
51static bool enable_11a_param = true; 51static bool enable_11a_param = true;
52static int low_band_component = -1;
53static int low_band_component_type = -1;
54static int high_band_component = -1;
55static int high_band_component_type = -1;
52 56
53static const u8 wl18xx_rate_to_idx_2ghz[] = { 57static const u8 wl18xx_rate_to_idx_2ghz[] = {
54 /* MCS rates are used only with 11n */ 58 /* MCS rates are used only with 11n */
@@ -1160,6 +1164,32 @@ int __devinit wl18xx_probe(struct platform_device *pdev)
1160 goto out_free; 1164 goto out_free;
1161 } 1165 }
1162 1166
1167 /*
1168 * If the module param is not set, update it with the one from
1169 * conf. If it is set, overwrite conf with it.
1170 */
1171 if (low_band_component == -1)
1172 low_band_component = priv->conf.phy.low_band_component;
1173 else
1174 priv->conf.phy.low_band_component = low_band_component;
1175 if (low_band_component_type == -1)
1176 low_band_component_type =
1177 priv->conf.phy.low_band_component_type;
1178 else
1179 priv->conf.phy.low_band_component_type =
1180 low_band_component_type;
1181
1182 if (high_band_component == -1)
1183 high_band_component = priv->conf.phy.high_band_component;
1184 else
1185 priv->conf.phy.high_band_component = high_band_component;
1186 if (high_band_component_type == -1)
1187 high_band_component_type =
1188 priv->conf.phy.high_band_component_type;
1189 else
1190 priv->conf.phy.high_band_component_type =
1191 high_band_component_type;
1192
1163 if (!checksum_param) { 1193 if (!checksum_param) {
1164 wl18xx_ops.set_rx_csum = NULL; 1194 wl18xx_ops.set_rx_csum = NULL;
1165 wl18xx_ops.init_vif = NULL; 1195 wl18xx_ops.init_vif = NULL;
@@ -1224,6 +1254,22 @@ MODULE_PARM_DESC(checksum, "Enable TCP checksum: boolean (defaults to true)");
1224module_param_named(enable_11a, enable_11a_param, bool, S_IRUSR); 1254module_param_named(enable_11a, enable_11a_param, bool, S_IRUSR);
1225MODULE_PARM_DESC(enable_11a, "Enable 11a (5GHz): boolean (defaults to true)"); 1255MODULE_PARM_DESC(enable_11a, "Enable 11a (5GHz): boolean (defaults to true)");
1226 1256
1257module_param(low_band_component, uint, S_IRUSR);
1258MODULE_PARM_DESC(low_band_component, "Low band component: u8 "
1259 "(default is 0x01)");
1260
1261module_param(low_band_component_type, uint, S_IRUSR);
1262MODULE_PARM_DESC(low_band_component_type, "Low band component type: u8 "
1263 "(default is 0x05 or 0x06 depending on the board_type)");
1264
1265module_param(high_band_component, uint, S_IRUSR);
1266MODULE_PARM_DESC(high_band_component, "High band component: u8, "
1267 "(default is 0x01)");
1268
1269module_param(high_band_component_type, uint, S_IRUSR);
1270MODULE_PARM_DESC(high_band_component_type, "High band component type: u8 "
1271 "(default is 0x09)");
1272
1227MODULE_LICENSE("GPL v2"); 1273MODULE_LICENSE("GPL v2");
1228MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); 1274MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
1229MODULE_FIRMWARE(WL18XX_FW_NAME); 1275MODULE_FIRMWARE(WL18XX_FW_NAME);