Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125111
b: refs/heads/master
c: 6d5a681
h: refs/heads/master
i:
  125109: 7eaac48
  125107: 78b5961
  125103: b8d21f4
v: v3
  • Loading branch information
Stefano Panella authored and David Vrabel committed Nov 4, 2008
1 parent aafb356 commit 67412ab
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 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: c5995bd2819dc577d0b32b26be0836d16c977e24
refs/heads/master: 6d5a681dfb583b2f1eefe7cd5505419ca2d4d6c8
20 changes: 19 additions & 1 deletion trunk/drivers/uwb/uwb-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ static int cmd_rsv_terminate(struct uwb_rc *rc,
return 0;
}

static int cmd_ie_add(struct uwb_rc *rc, struct uwb_dbg_cmd_ie *ie_to_add)
{
return uwb_rc_ie_add(rc,
(const struct uwb_ie_hdr *) ie_to_add->data,
ie_to_add->len);
}

static int cmd_ie_rm(struct uwb_rc *rc, struct uwb_dbg_cmd_ie *ie_to_rm)
{
return uwb_rc_ie_rm(rc, ie_to_rm->data[0]);
}

static int command_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
Expand Down Expand Up @@ -195,6 +207,12 @@ static ssize_t command_write(struct file *file, const char __user *buf,
case UWB_DBG_CMD_RSV_TERMINATE:
ret = cmd_rsv_terminate(rc, &cmd.rsv_terminate);
break;
case UWB_DBG_CMD_IE_ADD:
ret = cmd_ie_add(rc, &cmd.ie_add);
break;
case UWB_DBG_CMD_IE_RM:
ret = cmd_ie_rm(rc, &cmd.ie_rm);
break;
default:
return -EINVAL;
}
Expand Down Expand Up @@ -332,7 +350,7 @@ void uwb_dbg_add_rc(struct uwb_rc *rc)
}

/**
* uwb_dbg_add_rc - remove a radio controller's debug interface
* uwb_dbg_del_rc - remove a radio controller's debug interface
* @rc: the radio controller
*/
void uwb_dbg_del_rc(struct uwb_rc *rc)
Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/uwb/debug-cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
enum uwb_dbg_cmd_type {
UWB_DBG_CMD_RSV_ESTABLISH = 1,
UWB_DBG_CMD_RSV_TERMINATE = 2,
UWB_DBG_CMD_IE_ADD = 3,
UWB_DBG_CMD_IE_RM = 4,
};

struct uwb_dbg_cmd_rsv_establish {
Expand All @@ -46,11 +48,18 @@ struct uwb_dbg_cmd_rsv_terminate {
int index;
};

struct uwb_dbg_cmd_ie {
__u8 data[128];
int len;
};

struct uwb_dbg_cmd {
__u32 type;
union {
struct uwb_dbg_cmd_rsv_establish rsv_establish;
struct uwb_dbg_cmd_rsv_terminate rsv_terminate;
struct uwb_dbg_cmd_ie ie_add;
struct uwb_dbg_cmd_ie ie_rm;
};
};

Expand Down

0 comments on commit 67412ab

Please sign in to comment.