Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171461
b: refs/heads/master
c: 259a8e7
h: refs/heads/master
i:
  171459: 3eeba2e
v: v3
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Nov 6, 2009
1 parent e32c185 commit bdcd17b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 5e4cf166f4a9801ea9ca1bab210d763d27538de6
refs/heads/master: 259a8e7ddd55485b4a75ec39bc6716745c08fce0
16 changes: 14 additions & 2 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,11 +2135,18 @@ static int mwl8k_enable_sniffer(struct ieee80211_hw *hw, bool enable)
*/
struct mwl8k_cmd_set_mac_addr {
struct mwl8k_cmd_pkt header;
__u8 mac_addr[ETH_ALEN];
union {
struct {
__le16 mac_type;
__u8 mac_addr[ETH_ALEN];
} mbss;
__u8 mac_addr[ETH_ALEN];
};
} __attribute__((packed));

static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
{
struct mwl8k_priv *priv = hw->priv;
struct mwl8k_cmd_set_mac_addr *cmd;
int rc;

Expand All @@ -2149,7 +2156,12 @@ static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)

cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR);
cmd->header.length = cpu_to_le16(sizeof(*cmd));
memcpy(cmd->mac_addr, mac, ETH_ALEN);
if (priv->ap_fw) {
cmd->mbss.mac_type = 0;
memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN);
} else {
memcpy(cmd->mac_addr, mac, ETH_ALEN);
}

rc = mwl8k_post_cmd(hw, &cmd->header);
kfree(cmd);
Expand Down

0 comments on commit bdcd17b

Please sign in to comment.