aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-10-22 09:30:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:49:58 -0400
commitfef0640e1e5d5f79c48d1de1f54ed285429b4a6c (patch)
treee14580411b287bd5db9d6b481b94a76c8cee20ca /drivers/net/wireless/libertas/cmd.c
parente93156e7c4c3e2be355cac27c58664e4385c58fd (diff)
libertas: remove some references to IW_MODE_abc
... in pursue to quaff the wide-spread references to WEXT constants. When setting SNMP_MIB_OID_BSS_TYPE, wext.c can directly calculate the value the firmware wants. Reading of SNMP_MIB_OID_BSS_TYPE doesn't happen anywhere, so no need to convert the firmware value into WEXT values anyway. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 65fd50d31764..1065ce29cd08 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -390,7 +390,7 @@ int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val)
390 switch (oid) { 390 switch (oid) {
391 case SNMP_MIB_OID_BSS_TYPE: 391 case SNMP_MIB_OID_BSS_TYPE:
392 cmd.bufsize = cpu_to_le16(sizeof(u8)); 392 cmd.bufsize = cpu_to_le16(sizeof(u8));
393 cmd.value[0] = (val == IW_MODE_ADHOC) ? 2 : 1; 393 cmd.value[0] = val;
394 break; 394 break;
395 case SNMP_MIB_OID_11D_ENABLE: 395 case SNMP_MIB_OID_11D_ENABLE:
396 case SNMP_MIB_OID_FRAG_THRESHOLD: 396 case SNMP_MIB_OID_FRAG_THRESHOLD:
@@ -443,13 +443,7 @@ int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val)
443 443
444 switch (le16_to_cpu(cmd.bufsize)) { 444 switch (le16_to_cpu(cmd.bufsize)) {
445 case sizeof(u8): 445 case sizeof(u8):
446 if (oid == SNMP_MIB_OID_BSS_TYPE) { 446 *out_val = cmd.value[0];
447 if (cmd.value[0] == 2)
448 *out_val = IW_MODE_ADHOC;
449 else
450 *out_val = IW_MODE_INFRA;
451 } else
452 *out_val = cmd.value[0];
453 break; 447 break;
454 case sizeof(u16): 448 case sizeof(u16):
455 *out_val = le16_to_cpu(*((__le16 *)(&cmd.value))); 449 *out_val = le16_to_cpu(*((__le16 *)(&cmd.value)));