Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171054
b: refs/heads/master
c: fef0640
h: refs/heads/master
v: v3
  • Loading branch information
Holger Schurig authored and John W. Linville committed Oct 27, 2009
1 parent f64a6b4 commit af70e0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e93156e7c4c3e2be355cac27c58664e4385c58fd
refs/heads/master: fef0640e1e5d5f79c48d1de1f54ed285429b4a6c
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/libertas/assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,8 @@ static int assoc_helper_mode(struct lbs_private *priv,
}

priv->mode = assoc_req->mode;
ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, assoc_req->mode);
ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE,
assoc_req->mode == IW_MODE_ADHOC ? 2 : 1);

done:
lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val)
switch (oid) {
case SNMP_MIB_OID_BSS_TYPE:
cmd.bufsize = cpu_to_le16(sizeof(u8));
cmd.value[0] = (val == IW_MODE_ADHOC) ? 2 : 1;
cmd.value[0] = val;
break;
case SNMP_MIB_OID_11D_ENABLE:
case SNMP_MIB_OID_FRAG_THRESHOLD:
Expand Down Expand Up @@ -443,13 +443,7 @@ int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val)

switch (le16_to_cpu(cmd.bufsize)) {
case sizeof(u8):
if (oid == SNMP_MIB_OID_BSS_TYPE) {
if (cmd.value[0] == 2)
*out_val = IW_MODE_ADHOC;
else
*out_val = IW_MODE_INFRA;
} else
*out_val = cmd.value[0];
*out_val = cmd.value[0];
break;
case sizeof(u16):
*out_val = le16_to_cpu(*((__le16 *)(&cmd.value)));
Expand Down

0 comments on commit af70e0e

Please sign in to comment.