mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 08:46:52 +07:00
mwl8k: minor cleanups
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
3f0e0b220f
commit
c2c2b12a8b
@ -208,10 +208,7 @@ struct mwl8k_priv {
|
|||||||
|
|
||||||
/* Per interface specific private data */
|
/* Per interface specific private data */
|
||||||
struct mwl8k_vif {
|
struct mwl8k_vif {
|
||||||
/* Local MAC address. */
|
/* Non AMPDU sequence number assigned by driver. */
|
||||||
u8 mac_addr[ETH_ALEN];
|
|
||||||
|
|
||||||
/* Non AMPDU sequence number assigned by driver */
|
|
||||||
u16 seqno;
|
u16 seqno;
|
||||||
};
|
};
|
||||||
#define MWL8K_VIF(_vif) ((struct mwl8k_vif *)&((_vif)->drv_priv))
|
#define MWL8K_VIF(_vif) ((struct mwl8k_vif *)&((_vif)->drv_priv))
|
||||||
@ -2287,8 +2284,8 @@ struct mwl8k_cmd_set_rts_threshold {
|
|||||||
__le16 threshold;
|
__le16 threshold;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
static int mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw,
|
static int
|
||||||
u16 action, u16 threshold)
|
mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int rts_thresh)
|
||||||
{
|
{
|
||||||
struct mwl8k_cmd_set_rts_threshold *cmd;
|
struct mwl8k_cmd_set_rts_threshold *cmd;
|
||||||
int rc;
|
int rc;
|
||||||
@ -2299,8 +2296,8 @@ static int mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
cmd->header.code = cpu_to_le16(MWL8K_CMD_RTS_THRESHOLD);
|
cmd->header.code = cpu_to_le16(MWL8K_CMD_RTS_THRESHOLD);
|
||||||
cmd->header.length = cpu_to_le16(sizeof(*cmd));
|
cmd->header.length = cpu_to_le16(sizeof(*cmd));
|
||||||
cmd->action = cpu_to_le16(action);
|
cmd->action = cpu_to_le16(MWL8K_CMD_SET);
|
||||||
cmd->threshold = cpu_to_le16(threshold);
|
cmd->threshold = cpu_to_le16(rts_thresh);
|
||||||
|
|
||||||
rc = mwl8k_post_cmd(hw, &cmd->header);
|
rc = mwl8k_post_cmd(hw, &cmd->header);
|
||||||
kfree(cmd);
|
kfree(cmd);
|
||||||
@ -2955,14 +2952,13 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the mac address. */
|
||||||
|
mwl8k_cmd_set_mac_addr(hw, vif->addr);
|
||||||
|
|
||||||
/* Clean out driver private area */
|
/* Clean out driver private area */
|
||||||
mwl8k_vif = MWL8K_VIF(vif);
|
mwl8k_vif = MWL8K_VIF(vif);
|
||||||
memset(mwl8k_vif, 0, sizeof(*mwl8k_vif));
|
memset(mwl8k_vif, 0, sizeof(*mwl8k_vif));
|
||||||
|
|
||||||
/* Set and save the mac address */
|
|
||||||
mwl8k_cmd_set_mac_addr(hw, vif->addr);
|
|
||||||
memcpy(mwl8k_vif->mac_addr, vif->addr, ETH_ALEN);
|
|
||||||
|
|
||||||
/* Set Initial sequence number to zero */
|
/* Set Initial sequence number to zero */
|
||||||
mwl8k_vif->seqno = 0;
|
mwl8k_vif->seqno = 0;
|
||||||
|
|
||||||
@ -2977,9 +2973,6 @@ static void mwl8k_remove_interface(struct ieee80211_hw *hw,
|
|||||||
{
|
{
|
||||||
struct mwl8k_priv *priv = hw->priv;
|
struct mwl8k_priv *priv = hw->priv;
|
||||||
|
|
||||||
if (priv->vif == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mwl8k_cmd_set_mac_addr(hw, "\x00\x00\x00\x00\x00\x00");
|
mwl8k_cmd_set_mac_addr(hw, "\x00\x00\x00\x00\x00\x00");
|
||||||
|
|
||||||
priv->vif = NULL;
|
priv->vif = NULL;
|
||||||
@ -3252,7 +3245,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
||||||
{
|
{
|
||||||
return mwl8k_cmd_set_rts_threshold(hw, MWL8K_CMD_SET, value);
|
return mwl8k_cmd_set_rts_threshold(hw, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mwl8k_sta_notify_item
|
struct mwl8k_sta_notify_item
|
||||||
@ -3669,7 +3662,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Temporarily enable interrupts. Initial firmware host
|
* Temporarily enable interrupts. Initial firmware host
|
||||||
* commands use interrupts and avoids polling. Disable
|
* commands use interrupts and avoid polling. Disable
|
||||||
* interrupts when done.
|
* interrupts when done.
|
||||||
*/
|
*/
|
||||||
iowrite32(MWL8K_A2H_EVENTS, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
|
iowrite32(MWL8K_A2H_EVENTS, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
|
||||||
|
Loading…
Reference in New Issue
Block a user