diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-10-22 20:21:40 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-06 16:54:40 -0500 |
commit | 259a8e7ddd55485b4a75ec39bc6716745c08fce0 (patch) | |
tree | 4d773d4a2838bf42c5a6d3080d30702d1e5af941 /drivers/net/wireless/mwl8k.c | |
parent | 5e4cf166f4a9801ea9ca1bab210d763d27538de6 (diff) | |
download | kernel_samsung_smdk4412-259a8e7ddd55485b4a75ec39bc6716745c08fce0.tar.gz kernel_samsung_smdk4412-259a8e7ddd55485b4a75ec39bc6716745c08fce0.tar.bz2 kernel_samsung_smdk4412-259a8e7ddd55485b4a75ec39bc6716745c08fce0.zip |
mwl8k: add AP firmware (mbss) handling to mwl8k_set_mac_addr()
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 1c4114f8d31..4ee68f7d20f 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -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; @@ -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); |