aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-10-22 14:21:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-11-06 16:54:40 -0500
commit259a8e7ddd55485b4a75ec39bc6716745c08fce0 (patch)
tree4d773d4a2838bf42c5a6d3080d30702d1e5af941
parent5e4cf166f4a9801ea9ca1bab210d763d27538de6 (diff)
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>
-rw-r--r--drivers/net/wireless/mwl8k.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 1c4114f8d317..4ee68f7d20f4 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)
2135 */ 2135 */
2136struct mwl8k_cmd_set_mac_addr { 2136struct mwl8k_cmd_set_mac_addr {
2137 struct mwl8k_cmd_pkt header; 2137 struct mwl8k_cmd_pkt header;
2138 __u8 mac_addr[ETH_ALEN]; 2138 union {
2139 struct {
2140 __le16 mac_type;
2141 __u8 mac_addr[ETH_ALEN];
2142 } mbss;
2143 __u8 mac_addr[ETH_ALEN];
2144 };
2139} __attribute__((packed)); 2145} __attribute__((packed));
2140 2146
2141static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac) 2147static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
2142{ 2148{
2149 struct mwl8k_priv *priv = hw->priv;
2143 struct mwl8k_cmd_set_mac_addr *cmd; 2150 struct mwl8k_cmd_set_mac_addr *cmd;
2144 int rc; 2151 int rc;
2145 2152
@@ -2149,7 +2156,12 @@ static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
2149 2156
2150 cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR); 2157 cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR);
2151 cmd->header.length = cpu_to_le16(sizeof(*cmd)); 2158 cmd->header.length = cpu_to_le16(sizeof(*cmd));
2152 memcpy(cmd->mac_addr, mac, ETH_ALEN); 2159 if (priv->ap_fw) {
2160 cmd->mbss.mac_type = 0;
2161 memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN);
2162 } else {
2163 memcpy(cmd->mac_addr, mac, ETH_ALEN);
2164 }
2153 2165
2154 rc = mwl8k_post_cmd(hw, &cmd->header); 2166 rc = mwl8k_post_cmd(hw, &cmd->header);
2155 kfree(cmd); 2167 kfree(cmd);