Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290235
b: refs/heads/master
c: ca1d16a
h: refs/heads/master
i:
  290233: 75a76e0
  290231: 0227d55
v: v3
  • Loading branch information
Raja Mani authored and Kalle Valo committed Dec 23, 2011
1 parent cb648c5 commit 6371a5b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 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: 6e786cb1e514dc87647beccaa96bd8a255d97a0c
refs/heads/master: ca1d16a08fc2c26b693e65ad92fa37a4c778e60d
12 changes: 7 additions & 5 deletions trunk/drivers/net/wireless/ath/ath6kl/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,25 +2479,27 @@ int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class,
return ret;
}

int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, struct wmi_set_ip_cmd *ip_cmd)
int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, u8 if_idx,
__be32 ips0, __be32 ips1)
{
struct sk_buff *skb;
struct wmi_set_ip_cmd *cmd;
int ret;

/* Multicast address are not valid */
if ((*((u8 *) &ip_cmd->ips[0]) >= 0xE0) ||
(*((u8 *) &ip_cmd->ips[1]) >= 0xE0))
if (ipv4_is_multicast(ips0) ||
ipv4_is_multicast(ips1))
return -EINVAL;

skb = ath6kl_wmi_get_new_buf(sizeof(struct wmi_set_ip_cmd));
if (!skb)
return -ENOMEM;

cmd = (struct wmi_set_ip_cmd *) skb->data;
memcpy(cmd, ip_cmd, sizeof(struct wmi_set_ip_cmd));
cmd->ips[0] = ips0;
cmd->ips[1] = ips1;

ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_IP_CMDID,
ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_IP_CMDID,
NO_SYNC_WMIFLAG);
return ret;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/wmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ struct wow_filter {

struct wmi_set_ip_cmd {
/* IP in network byte order */
__le32 ips[MAX_IP_ADDRS];
__be32 ips[MAX_IP_ADDRS];
} __packed;

enum ath6kl_wow_filters {
Expand Down Expand Up @@ -2417,7 +2417,8 @@ int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len);

s32 ath6kl_wmi_get_rate(s8 rate_index);

int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, struct wmi_set_ip_cmd *ip_cmd);
int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, u8 if_idx,
__be32 ips0, __be32 ips1);
int ath6kl_wmi_set_host_sleep_mode_cmd(struct wmi *wmi, u8 if_idx,
enum ath6kl_host_mode host_mode);
int ath6kl_wmi_set_wow_mode_cmd(struct wmi *wmi, u8 if_idx,
Expand Down

0 comments on commit 6371a5b

Please sign in to comment.