diff options
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index a04863633d1a..cc160418e6c5 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -208,10 +208,7 @@ struct mwl8k_priv { | |||
208 | 208 | ||
209 | /* Per interface specific private data */ | 209 | /* Per interface specific private data */ |
210 | struct mwl8k_vif { | 210 | struct mwl8k_vif { |
211 | /* Local MAC address. */ | 211 | /* Non AMPDU sequence number assigned by driver. */ |
212 | u8 mac_addr[ETH_ALEN]; | ||
213 | |||
214 | /* Non AMPDU sequence number assigned by driver */ | ||
215 | u16 seqno; | 212 | u16 seqno; |
216 | }; | 213 | }; |
217 | #define MWL8K_VIF(_vif) ((struct mwl8k_vif *)&((_vif)->drv_priv)) | 214 | #define MWL8K_VIF(_vif) ((struct mwl8k_vif *)&((_vif)->drv_priv)) |
@@ -2287,8 +2284,8 @@ struct mwl8k_cmd_set_rts_threshold { | |||
2287 | __le16 threshold; | 2284 | __le16 threshold; |
2288 | } __attribute__((packed)); | 2285 | } __attribute__((packed)); |
2289 | 2286 | ||
2290 | static int mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, | 2287 | static int |
2291 | u16 action, u16 threshold) | 2288 | mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int rts_thresh) |
2292 | { | 2289 | { |
2293 | struct mwl8k_cmd_set_rts_threshold *cmd; | 2290 | struct mwl8k_cmd_set_rts_threshold *cmd; |
2294 | int rc; | 2291 | int rc; |
@@ -2299,8 +2296,8 @@ static int mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, | |||
2299 | 2296 | ||
2300 | cmd->header.code = cpu_to_le16(MWL8K_CMD_RTS_THRESHOLD); | 2297 | cmd->header.code = cpu_to_le16(MWL8K_CMD_RTS_THRESHOLD); |
2301 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); | 2298 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); |
2302 | cmd->action = cpu_to_le16(action); | 2299 | cmd->action = cpu_to_le16(MWL8K_CMD_SET); |
2303 | cmd->threshold = cpu_to_le16(threshold); | 2300 | cmd->threshold = cpu_to_le16(rts_thresh); |
2304 | 2301 | ||
2305 | rc = mwl8k_post_cmd(hw, &cmd->header); | 2302 | rc = mwl8k_post_cmd(hw, &cmd->header); |
2306 | kfree(cmd); | 2303 | kfree(cmd); |
@@ -2955,14 +2952,13 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw, | |||
2955 | return -EINVAL; | 2952 | return -EINVAL; |
2956 | } | 2953 | } |
2957 | 2954 | ||
2955 | /* Set the mac address. */ | ||
2956 | mwl8k_cmd_set_mac_addr(hw, vif->addr); | ||
2957 | |||
2958 | /* Clean out driver private area */ | 2958 | /* Clean out driver private area */ |
2959 | mwl8k_vif = MWL8K_VIF(vif); | 2959 | mwl8k_vif = MWL8K_VIF(vif); |
2960 | memset(mwl8k_vif, 0, sizeof(*mwl8k_vif)); | 2960 | memset(mwl8k_vif, 0, sizeof(*mwl8k_vif)); |
2961 | 2961 | ||
2962 | /* Set and save the mac address */ | ||
2963 | mwl8k_cmd_set_mac_addr(hw, vif->addr); | ||
2964 | memcpy(mwl8k_vif->mac_addr, vif->addr, ETH_ALEN); | ||
2965 | |||
2966 | /* Set Initial sequence number to zero */ | 2962 | /* Set Initial sequence number to zero */ |
2967 | mwl8k_vif->seqno = 0; | 2963 | mwl8k_vif->seqno = 0; |
2968 | 2964 | ||
@@ -2977,9 +2973,6 @@ static void mwl8k_remove_interface(struct ieee80211_hw *hw, | |||
2977 | { | 2973 | { |
2978 | struct mwl8k_priv *priv = hw->priv; | 2974 | struct mwl8k_priv *priv = hw->priv; |
2979 | 2975 | ||
2980 | if (priv->vif == NULL) | ||
2981 | return; | ||
2982 | |||
2983 | mwl8k_cmd_set_mac_addr(hw, "\x00\x00\x00\x00\x00\x00"); | 2976 | mwl8k_cmd_set_mac_addr(hw, "\x00\x00\x00\x00\x00\x00"); |
2984 | 2977 | ||
2985 | priv->vif = NULL; | 2978 | priv->vif = NULL; |
@@ -3252,7 +3245,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw, | |||
3252 | 3245 | ||
3253 | static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) | 3246 | static int mwl8k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) |
3254 | { | 3247 | { |
3255 | return mwl8k_cmd_set_rts_threshold(hw, MWL8K_CMD_SET, value); | 3248 | return mwl8k_cmd_set_rts_threshold(hw, value); |
3256 | } | 3249 | } |
3257 | 3250 | ||
3258 | struct mwl8k_sta_notify_item | 3251 | struct mwl8k_sta_notify_item |
@@ -3669,7 +3662,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, | |||
3669 | 3662 | ||
3670 | /* | 3663 | /* |
3671 | * Temporarily enable interrupts. Initial firmware host | 3664 | * Temporarily enable interrupts. Initial firmware host |
3672 | * commands use interrupts and avoids polling. Disable | 3665 | * commands use interrupts and avoid polling. Disable |
3673 | * interrupts when done. | 3666 | * interrupts when done. |
3674 | */ | 3667 | */ |
3675 | iowrite32(MWL8K_A2H_EVENTS, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); | 3668 | iowrite32(MWL8K_A2H_EVENTS, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); |