diff options
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 40759e5f3cc5..53a6bb2dbd4c 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -1925,7 +1925,8 @@ static int ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) | |||
1925 | goto exit; | 1925 | goto exit; |
1926 | } | 1926 | } |
1927 | spin_unlock_irqrestore(&priv->lock, flags); | 1927 | spin_unlock_irqrestore(&priv->lock, flags); |
1928 | } | 1928 | } else |
1929 | rc = 0; | ||
1929 | 1930 | ||
1930 | if (priv->status & STATUS_RF_KILL_HW) { | 1931 | if (priv->status & STATUS_RF_KILL_HW) { |
1931 | IPW_ERROR("Failed to send %s: Aborted due to RF kill switch.\n", | 1932 | IPW_ERROR("Failed to send %s: Aborted due to RF kill switch.\n", |
@@ -7011,9 +7012,9 @@ u8 ipw_qos_current_mode(struct ipw_priv * priv) | |||
7011 | /* | 7012 | /* |
7012 | * Handle management frame beacon and probe response | 7013 | * Handle management frame beacon and probe response |
7013 | */ | 7014 | */ |
7014 | static int ipw_qos_handle_probe_reponse(struct ipw_priv *priv, | 7015 | static int ipw_qos_handle_probe_response(struct ipw_priv *priv, |
7015 | int active_network, | 7016 | int active_network, |
7016 | struct ieee80211_network *network) | 7017 | struct ieee80211_network *network) |
7017 | { | 7018 | { |
7018 | u32 size = sizeof(struct ieee80211_qos_parameters); | 7019 | u32 size = sizeof(struct ieee80211_qos_parameters); |
7019 | 7020 | ||
@@ -7407,35 +7408,41 @@ static void ipw_bg_qos_activate(void *data) | |||
7407 | up(&priv->sem); | 7408 | up(&priv->sem); |
7408 | } | 7409 | } |
7409 | 7410 | ||
7410 | /* | 7411 | static int ipw_handle_probe_response(struct net_device *dev, |
7411 | * Handler for probe responce and beacon frame | 7412 | struct ieee80211_probe_response *resp, |
7412 | */ | 7413 | struct ieee80211_network *network) |
7413 | static int ipw_handle_management(struct net_device *dev, | ||
7414 | struct ieee80211_network *network, u16 type) | ||
7415 | { | 7414 | { |
7416 | struct ipw_priv *priv = ieee80211_priv(dev); | 7415 | struct ipw_priv *priv = ieee80211_priv(dev); |
7417 | int active_network; | 7416 | int active_network = ((priv->status & STATUS_ASSOCIATED) && |
7417 | (network == priv->assoc_network)); | ||
7418 | 7418 | ||
7419 | if (priv->status & STATUS_ASSOCIATED && network == priv->assoc_network) | 7419 | ipw_qos_handle_probe_response(priv, active_network, network); |
7420 | active_network = 1; | ||
7421 | else | ||
7422 | active_network = 0; | ||
7423 | 7420 | ||
7424 | switch (type) { | 7421 | return 0; |
7425 | case IEEE80211_STYPE_PROBE_RESP: | 7422 | } |
7426 | case IEEE80211_STYPE_BEACON: | 7423 | |
7427 | ipw_qos_handle_probe_reponse(priv, active_network, network); | 7424 | static int ipw_handle_beacon(struct net_device *dev, |
7428 | break; | 7425 | struct ieee80211_beacon *resp, |
7429 | case IEEE80211_STYPE_ASSOC_RESP: | 7426 | struct ieee80211_network *network) |
7430 | ipw_qos_association_resp(priv, network); | 7427 | { |
7431 | break; | 7428 | struct ipw_priv *priv = ieee80211_priv(dev); |
7432 | default: | 7429 | int active_network = ((priv->status & STATUS_ASSOCIATED) && |
7433 | break; | 7430 | (network == priv->assoc_network)); |
7434 | } | 7431 | |
7432 | ipw_qos_handle_probe_response(priv, active_network, network); | ||
7435 | 7433 | ||
7436 | return 0; | 7434 | return 0; |
7437 | } | 7435 | } |
7438 | 7436 | ||
7437 | static int ipw_handle_assoc_response(struct net_device *dev, | ||
7438 | struct ieee80211_assoc_response *resp, | ||
7439 | struct ieee80211_network *network) | ||
7440 | { | ||
7441 | struct ipw_priv *priv = ieee80211_priv(dev); | ||
7442 | ipw_qos_association_resp(priv, network); | ||
7443 | return 0; | ||
7444 | } | ||
7445 | |||
7439 | static int ipw_send_qos_params_command(struct ipw_priv *priv, struct ieee80211_qos_parameters | 7446 | static int ipw_send_qos_params_command(struct ipw_priv *priv, struct ieee80211_qos_parameters |
7440 | *qos_param) | 7447 | *qos_param) |
7441 | { | 7448 | { |
@@ -11260,7 +11267,9 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
11260 | priv->ieee->is_queue_full = ipw_net_is_queue_full; | 11267 | priv->ieee->is_queue_full = ipw_net_is_queue_full; |
11261 | 11268 | ||
11262 | #ifdef CONFIG_IPW_QOS | 11269 | #ifdef CONFIG_IPW_QOS |
11263 | priv->ieee->handle_management = ipw_handle_management; | 11270 | priv->ieee->handle_probe_response = ipw_handle_beacon; |
11271 | priv->ieee->handle_beacon = ipw_handle_probe_response; | ||
11272 | priv->ieee->handle_assoc_response = ipw_handle_assoc_response; | ||
11264 | #endif /* CONFIG_IPW_QOS */ | 11273 | #endif /* CONFIG_IPW_QOS */ |
11265 | 11274 | ||
11266 | priv->ieee->perfect_rssi = -20; | 11275 | priv->ieee->perfect_rssi = -20; |