/* Set station id on hw using the provided mac address  */
int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
/* Set station id on hw using the provided mac address  */
int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
{
	struct ath_common *common = ath5k_hw_common(ah);
	u32 low_id, high_id;
	u32 pcu_reg;
	ATH5K_TRACE(ah->ah_sc);
	memcpy(common->macaddr, mac, ETH_ALEN);
	pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000;
	low_id = get_unaligned_le32(mac);
	high_id = get_unaligned_le16(mac + 4);
	ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0);
	ath5k_hw_reg_write(ah, pcu_reg | high_id, AR5K_STA_ID1);
	return 0;
}