Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215033
b: refs/heads/master
c: be86cbe
h: refs/heads/master
i:
  215031: 82304b5
v: v3
  • Loading branch information
Juuso Oikarinen authored and Luciano Coelho committed Sep 28, 2010
1 parent c8968f7 commit b52bb0c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98d633b64a55d6f3e943951ca35f283b0901d7db
refs/heads/master: be86cbea1e9c3a4dd8faedcfa327495d09fe3531
28 changes: 28 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,3 +746,31 @@ int wl1271_cmd_disconnect(struct wl1271 *wl)
out:
return ret;
}

int wl1271_cmd_set_sta_state(struct wl1271 *wl)
{
struct wl1271_cmd_set_sta_state *cmd;
int ret = 0;

wl1271_debug(DEBUG_CMD, "cmd set sta state");

cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
ret = -ENOMEM;
goto out;
}

cmd->state = WL1271_CMD_STA_STATE_CONNECTED;

ret = wl1271_cmd_send(wl, CMD_SET_STA_STATE, cmd, sizeof(*cmd), 0);
if (ret < 0) {
wl1271_error("failed to send set STA state command");
goto out_free;
}

out_free:
kfree(cmd);

out:
return ret;
}
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
u8 key_size, const u8 *key, const u8 *addr,
u32 tx_seq_32, u16 tx_seq_16);
int wl1271_cmd_disconnect(struct wl1271 *wl);
int wl1271_cmd_set_sta_state(struct wl1271 *wl);

enum wl1271_commands {
CMD_INTERROGATE = 1, /*use this to read information elements*/
Expand Down Expand Up @@ -469,4 +470,13 @@ struct wl1271_cmd_disconnect {
u8 padding;
} __packed;

#define WL1271_CMD_STA_STATE_CONNECTED 1

struct wl1271_cmd_set_sta_state {
struct wl1271_cmd_header header;

u8 state;
u8 padding[3];
} __attribute__ ((packed));

#endif /* __WL1271_CMD_H__ */

0 comments on commit b52bb0c

Please sign in to comment.