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>
This commit is contained in:
parent
3f5610ff56
commit
a9e00b151e
@ -2607,6 +2607,9 @@ struct mwl8k_cmd_set_mac_addr {
|
|||||||
};
|
};
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
#define MWL8K_MAC_TYPE_PRIMARY_CLIENT 0
|
||||||
|
#define MWL8K_MAC_TYPE_PRIMARY_AP 2
|
||||||
|
|
||||||
static int mwl8k_cmd_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
|
static int mwl8k_cmd_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
|
||||||
{
|
{
|
||||||
struct mwl8k_priv *priv = hw->priv;
|
struct mwl8k_priv *priv = hw->priv;
|
||||||
@ -2620,7 +2623,7 @@ static int mwl8k_cmd_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
|
|||||||
cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR);
|
cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR);
|
||||||
cmd->header.length = cpu_to_le16(sizeof(*cmd));
|
cmd->header.length = cpu_to_le16(sizeof(*cmd));
|
||||||
if (priv->ap_fw) {
|
if (priv->ap_fw) {
|
||||||
cmd->mbss.mac_type = 0;
|
cmd->mbss.mac_type = cpu_to_le16(MWL8K_MAC_TYPE_PRIMARY_AP);
|
||||||
memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN);
|
memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
memcpy(cmd->mac_addr, mac, ETH_ALEN);
|
memcpy(cmd->mac_addr, mac, ETH_ALEN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user