diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2010-01-08 12:31:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 14:02:09 -0500 |
commit | a9e00b151ec2121b7ae09d84a2b5a68b6461e98a (patch) | |
tree | 30205da7ec605c0837dc568578e189bdc04cae93 /drivers/net | |
parent | 3f5610ff560aeaccf051a6f93f25535c219599a0 (diff) |
mwl8k: correctly set the mac_type field for AP 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')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index f0026f33232d..428575beb8d0 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2607,6 +2607,9 @@ struct mwl8k_cmd_set_mac_addr { | |||
2607 | }; | 2607 | }; |
2608 | } __attribute__((packed)); | 2608 | } __attribute__((packed)); |
2609 | 2609 | ||
2610 | #define MWL8K_MAC_TYPE_PRIMARY_CLIENT 0 | ||
2611 | #define MWL8K_MAC_TYPE_PRIMARY_AP 2 | ||
2612 | |||
2610 | static int mwl8k_cmd_set_mac_addr(struct ieee80211_hw *hw, u8 *mac) | 2613 | static int mwl8k_cmd_set_mac_addr(struct ieee80211_hw *hw, u8 *mac) |
2611 | { | 2614 | { |
2612 | struct mwl8k_priv *priv = hw->priv; | 2615 | struct mwl8k_priv *priv = hw->priv; |
@@ -2620,7 +2623,7 @@ static int mwl8k_cmd_set_mac_addr(struct ieee80211_hw *hw, u8 *mac) | |||
2620 | cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR); | 2623 | cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR); |
2621 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); | 2624 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); |
2622 | if (priv->ap_fw) { | 2625 | if (priv->ap_fw) { |
2623 | cmd->mbss.mac_type = 0; | 2626 | cmd->mbss.mac_type = cpu_to_le16(MWL8K_MAC_TYPE_PRIMARY_AP); |
2624 | memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN); | 2627 | memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN); |
2625 | } else { | 2628 | } else { |
2626 | memcpy(cmd->mac_addr, mac, ETH_ALEN); | 2629 | memcpy(cmd->mac_addr, mac, ETH_ALEN); |