Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79150
b: refs/heads/master
c: b6b8abe
h: refs/heads/master
v: v3
  • Loading branch information
Holger Schurig authored and David S. Miller committed Jan 28, 2008
1 parent 297087e commit c660260
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: c3f949618d01d6c40a0267ae8c01695cc2de08e2
refs/heads/master: b6b8abe4ddec2cfb3471ea60f965a137cd4d529d
14 changes: 8 additions & 6 deletions trunk/drivers/net/wireless/libertas/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,30 +410,32 @@ static ssize_t lbs_threshold_read(
char *buf = (char *)addr;
u8 value;
u8 freq;
int events = 0;

struct cmd_ds_802_11_subscribe_event *events = kzalloc(
struct cmd_ds_802_11_subscribe_event *subscribed = kzalloc(
sizeof(struct cmd_ds_802_11_subscribe_event),
GFP_KERNEL);
struct mrvlietypes_thresholds *got;

res = lbs_prepare_and_send_command(priv,
CMD_802_11_SUBSCRIBE_EVENT, CMD_ACT_GET,
CMD_OPTION_WAITFORRSP, 0, events);
CMD_OPTION_WAITFORRSP, 0, subscribed);
if (res) {
kfree(events);
kfree(subscribed);
return res;
}

got = lbs_tlv_find(tlv_type, events->tlv, sizeof(events->tlv));
got = lbs_tlv_find(tlv_type, subscribed->tlv, sizeof(subscribed->tlv));
if (got) {
value = got->value;
freq = got->freq;
events = le16_to_cpu(subscribed->events);
}
kfree(events);
kfree(subscribed);

if (got)
pos += snprintf(buf, len, "%d %d %d\n", value, freq,
!!(le16_to_cpu(events->events) & event_mask));
!!(events & event_mask));

res = simple_read_from_buffer(userbuf, count, ppos, buf, pos);

Expand Down

0 comments on commit c660260

Please sign in to comment.