diff options
| author | David S. Miller <davem@davemloft.net> | 2009-05-20 20:31:25 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-05-20 20:31:25 -0400 |
| commit | 86c2fe1e3adacec9204c03f2b056b49534ecf0ed (patch) | |
| tree | 9d6a2c3f3802cd83d5a266df1d2576bd77aaad93 | |
| parent | 1ddbcb005c395518c2cd0df504cff3d4b5c85853 (diff) | |
| parent | a6c67339784db5763d6f20ae1881aeebe8c5a9f4 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| -rw-r--r-- | drivers/net/wireless/airo.c | 23 | ||||
| -rw-r--r-- | drivers/net/wireless/ath5k/phy.c | 49 | ||||
| -rw-r--r-- | drivers/net/wireless/ath5k/reset.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 9 | ||||
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 2 | ||||
| -rw-r--r-- | net/wireless/reg.c | 7 | ||||
| -rw-r--r-- | net/wireless/wext.c | 7 |
10 files changed, 68 insertions, 53 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index d73475739127..9eabf4d1f2e7 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -6467,6 +6467,7 @@ static int airo_get_encode(struct net_device *dev, | |||
| 6467 | { | 6467 | { |
| 6468 | struct airo_info *local = dev->ml_priv; | 6468 | struct airo_info *local = dev->ml_priv; |
| 6469 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; | 6469 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; |
| 6470 | int wep_key_len; | ||
| 6470 | u8 buf[16]; | 6471 | u8 buf[16]; |
| 6471 | 6472 | ||
| 6472 | if (!local->wep_capable) | 6473 | if (!local->wep_capable) |
| @@ -6500,11 +6501,13 @@ static int airo_get_encode(struct net_device *dev, | |||
| 6500 | dwrq->flags |= index + 1; | 6501 | dwrq->flags |= index + 1; |
| 6501 | 6502 | ||
| 6502 | /* Copy the key to the user buffer */ | 6503 | /* Copy the key to the user buffer */ |
| 6503 | dwrq->length = get_wep_key(local, index, &buf[0], sizeof(buf)); | 6504 | wep_key_len = get_wep_key(local, index, &buf[0], sizeof(buf)); |
| 6504 | if (dwrq->length != -1) | 6505 | if (wep_key_len < 0) { |
| 6505 | memcpy(extra, buf, dwrq->length); | ||
| 6506 | else | ||
| 6507 | dwrq->length = 0; | 6506 | dwrq->length = 0; |
| 6507 | } else { | ||
| 6508 | dwrq->length = wep_key_len; | ||
| 6509 | memcpy(extra, buf, dwrq->length); | ||
| 6510 | } | ||
| 6508 | 6511 | ||
| 6509 | return 0; | 6512 | return 0; |
| 6510 | } | 6513 | } |
| @@ -6617,7 +6620,7 @@ static int airo_get_encodeext(struct net_device *dev, | |||
| 6617 | struct airo_info *local = dev->ml_priv; | 6620 | struct airo_info *local = dev->ml_priv; |
| 6618 | struct iw_point *encoding = &wrqu->encoding; | 6621 | struct iw_point *encoding = &wrqu->encoding; |
| 6619 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 6622 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
| 6620 | int idx, max_key_len; | 6623 | int idx, max_key_len, wep_key_len; |
| 6621 | u8 buf[16]; | 6624 | u8 buf[16]; |
| 6622 | 6625 | ||
| 6623 | if (!local->wep_capable) | 6626 | if (!local->wep_capable) |
| @@ -6661,11 +6664,13 @@ static int airo_get_encodeext(struct net_device *dev, | |||
| 6661 | memset(extra, 0, 16); | 6664 | memset(extra, 0, 16); |
| 6662 | 6665 | ||
| 6663 | /* Copy the key to the user buffer */ | 6666 | /* Copy the key to the user buffer */ |
| 6664 | ext->key_len = get_wep_key(local, idx, &buf[0], sizeof(buf)); | 6667 | wep_key_len = get_wep_key(local, idx, &buf[0], sizeof(buf)); |
| 6665 | if (ext->key_len != -1) | 6668 | if (wep_key_len < 0) { |
| 6666 | memcpy(extra, buf, ext->key_len); | ||
| 6667 | else | ||
| 6668 | ext->key_len = 0; | 6669 | ext->key_len = 0; |
| 6670 | } else { | ||
| 6671 | ext->key_len = wep_key_len; | ||
| 6672 | memcpy(extra, buf, ext->key_len); | ||
| 6673 | } | ||
| 6669 | 6674 | ||
| 6670 | return 0; | 6675 | return 0; |
| 6671 | } | 6676 | } |
diff --git a/drivers/net/wireless/ath5k/phy.c b/drivers/net/wireless/ath5k/phy.c index 9e2faae5ae94..b48b29dca3d2 100644 --- a/drivers/net/wireless/ath5k/phy.c +++ b/drivers/net/wireless/ath5k/phy.c | |||
| @@ -1487,28 +1487,35 @@ ath5k_get_linear_pcdac_min(const u8 *stepL, const u8 *stepR, | |||
| 1487 | { | 1487 | { |
| 1488 | s8 tmp; | 1488 | s8 tmp; |
| 1489 | s16 min_pwrL, min_pwrR; | 1489 | s16 min_pwrL, min_pwrR; |
| 1490 | s16 pwr_i = pwrL[0]; | 1490 | s16 pwr_i; |
| 1491 | 1491 | ||
| 1492 | do { | 1492 | if (pwrL[0] == pwrL[1]) |
| 1493 | pwr_i--; | 1493 | min_pwrL = pwrL[0]; |
| 1494 | tmp = (s8) ath5k_get_interpolated_value(pwr_i, | 1494 | else { |
| 1495 | pwrL[0], pwrL[1], | 1495 | pwr_i = pwrL[0]; |
| 1496 | stepL[0], stepL[1]); | 1496 | do { |
| 1497 | 1497 | pwr_i--; | |
| 1498 | } while (tmp > 1); | 1498 | tmp = (s8) ath5k_get_interpolated_value(pwr_i, |
| 1499 | 1499 | pwrL[0], pwrL[1], | |
| 1500 | min_pwrL = pwr_i; | 1500 | stepL[0], stepL[1]); |
| 1501 | 1501 | } while (tmp > 1); | |
| 1502 | pwr_i = pwrR[0]; | 1502 | |
| 1503 | do { | 1503 | min_pwrL = pwr_i; |
| 1504 | pwr_i--; | 1504 | } |
| 1505 | tmp = (s8) ath5k_get_interpolated_value(pwr_i, | ||
| 1506 | pwrR[0], pwrR[1], | ||
| 1507 | stepR[0], stepR[1]); | ||
| 1508 | |||
| 1509 | } while (tmp > 1); | ||
| 1510 | 1505 | ||
| 1511 | min_pwrR = pwr_i; | 1506 | if (pwrR[0] == pwrR[1]) |
| 1507 | min_pwrR = pwrR[0]; | ||
| 1508 | else { | ||
| 1509 | pwr_i = pwrR[0]; | ||
| 1510 | do { | ||
| 1511 | pwr_i--; | ||
| 1512 | tmp = (s8) ath5k_get_interpolated_value(pwr_i, | ||
| 1513 | pwrR[0], pwrR[1], | ||
| 1514 | stepR[0], stepR[1]); | ||
| 1515 | } while (tmp > 1); | ||
| 1516 | |||
| 1517 | min_pwrR = pwr_i; | ||
| 1518 | } | ||
| 1512 | 1519 | ||
| 1513 | /* Keep the right boundary so that it works for both curves */ | 1520 | /* Keep the right boundary so that it works for both curves */ |
| 1514 | return max(min_pwrL, min_pwrR); | 1521 | return max(min_pwrL, min_pwrR); |
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c index 7a17d31b2fd9..5f72c111c2e8 100644 --- a/drivers/net/wireless/ath5k/reset.c +++ b/drivers/net/wireless/ath5k/reset.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | \*****************************/ | 26 | \*****************************/ |
| 27 | 27 | ||
| 28 | #include <linux/pci.h> /* To determine if a card is pci-e */ | 28 | #include <linux/pci.h> /* To determine if a card is pci-e */ |
| 29 | #include <linux/bitops.h> /* For get_bitmask_order */ | 29 | #include <linux/log2.h> |
| 30 | #include "ath5k.h" | 30 | #include "ath5k.h" |
| 31 | #include "reg.h" | 31 | #include "reg.h" |
| 32 | #include "base.h" | 32 | #include "base.h" |
| @@ -69,10 +69,10 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah, | |||
| 69 | 69 | ||
| 70 | /* Get exponent | 70 | /* Get exponent |
| 71 | * ALGO: coef_exp = 14 - highest set bit position */ | 71 | * ALGO: coef_exp = 14 - highest set bit position */ |
| 72 | coef_exp = get_bitmask_order(coef_scaled); | 72 | coef_exp = ilog2(coef_scaled); |
| 73 | 73 | ||
| 74 | /* Doesn't make sense if it's zero*/ | 74 | /* Doesn't make sense if it's zero*/ |
| 75 | if (!coef_exp) | 75 | if (!coef_scaled || !coef_exp) |
| 76 | return -EINVAL; | 76 | return -EINVAL; |
| 77 | 77 | ||
| 78 | /* Note: we've shifted coef_scaled by 24 */ | 78 | /* Note: we've shifted coef_scaled by 24 */ |
| @@ -359,7 +359,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial) | |||
| 359 | mode |= AR5K_PHY_MODE_FREQ_5GHZ; | 359 | mode |= AR5K_PHY_MODE_FREQ_5GHZ; |
| 360 | 360 | ||
| 361 | if (ah->ah_radio == AR5K_RF5413) | 361 | if (ah->ah_radio == AR5K_RF5413) |
| 362 | clock |= AR5K_PHY_PLL_40MHZ_5413; | 362 | clock = AR5K_PHY_PLL_40MHZ_5413; |
| 363 | else | 363 | else |
| 364 | clock |= AR5K_PHY_PLL_40MHZ; | 364 | clock |= AR5K_PHY_PLL_40MHZ; |
| 365 | 365 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index e5ca2511a81a..9452461ce864 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | #include "iwl-6000-hw.h" | 46 | #include "iwl-6000-hw.h" |
| 47 | 47 | ||
| 48 | /* Highest firmware API version supported */ | 48 | /* Highest firmware API version supported */ |
| 49 | #define IWL5000_UCODE_API_MAX 1 | 49 | #define IWL5000_UCODE_API_MAX 2 |
| 50 | #define IWL5150_UCODE_API_MAX 2 | 50 | #define IWL5150_UCODE_API_MAX 2 |
| 51 | 51 | ||
| 52 | /* Lowest firmware API version supported */ | 52 | /* Lowest firmware API version supported */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 3bb28db4a40f..f46ba2475776 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
| @@ -669,13 +669,6 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode) | |||
| 669 | if (!iwl_is_ready_rf(priv)) | 669 | if (!iwl_is_ready_rf(priv)) |
| 670 | return -EAGAIN; | 670 | return -EAGAIN; |
| 671 | 671 | ||
| 672 | cancel_delayed_work(&priv->scan_check); | ||
| 673 | if (iwl_scan_cancel_timeout(priv, 100)) { | ||
| 674 | IWL_WARN(priv, "Aborted scan still in progress after 100ms\n"); | ||
| 675 | IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n"); | ||
| 676 | return -EAGAIN; | ||
| 677 | } | ||
| 678 | |||
| 679 | iwl_commit_rxon(priv); | 672 | iwl_commit_rxon(priv); |
| 680 | 673 | ||
| 681 | return 0; | 674 | return 0; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index e7c65c4f741b..6330b91e37ce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
| @@ -227,9 +227,6 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, | |||
| 227 | /* The HW is no longer scanning */ | 227 | /* The HW is no longer scanning */ |
| 228 | clear_bit(STATUS_SCAN_HW, &priv->status); | 228 | clear_bit(STATUS_SCAN_HW, &priv->status); |
| 229 | 229 | ||
| 230 | /* The scan completion notification came in, so kill that timer... */ | ||
| 231 | cancel_delayed_work(&priv->scan_check); | ||
| 232 | |||
| 233 | IWL_DEBUG_INFO(priv, "Scan pass on %sGHz took %dms\n", | 230 | IWL_DEBUG_INFO(priv, "Scan pass on %sGHz took %dms\n", |
| 234 | (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) ? | 231 | (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) ? |
| 235 | "2.4" : "5.2", | 232 | "2.4" : "5.2", |
| @@ -712,6 +709,8 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
| 712 | 709 | ||
| 713 | mutex_lock(&priv->mutex); | 710 | mutex_lock(&priv->mutex); |
| 714 | 711 | ||
| 712 | cancel_delayed_work(&priv->scan_check); | ||
| 713 | |||
| 715 | if (!iwl_is_ready(priv)) { | 714 | if (!iwl_is_ready(priv)) { |
| 716 | IWL_WARN(priv, "request scan called when driver not ready.\n"); | 715 | IWL_WARN(priv, "request scan called when driver not ready.\n"); |
| 717 | goto done; | 716 | goto done; |
| @@ -925,6 +924,8 @@ void iwl_bg_scan_completed(struct work_struct *work) | |||
| 925 | 924 | ||
| 926 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); | 925 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); |
| 927 | 926 | ||
| 927 | cancel_delayed_work(&priv->scan_check); | ||
| 928 | |||
| 928 | ieee80211_scan_completed(priv->hw, false); | 929 | ieee80211_scan_completed(priv->hw, false); |
| 929 | 930 | ||
| 930 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 931 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 4cce66133500..ff4d0e41d7c4 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
| @@ -782,13 +782,6 @@ static int iwl3945_set_mode(struct iwl_priv *priv, int mode) | |||
| 782 | if (!iwl_is_ready_rf(priv)) | 782 | if (!iwl_is_ready_rf(priv)) |
| 783 | return -EAGAIN; | 783 | return -EAGAIN; |
| 784 | 784 | ||
| 785 | cancel_delayed_work(&priv->scan_check); | ||
| 786 | if (iwl_scan_cancel_timeout(priv, 100)) { | ||
| 787 | IWL_WARN(priv, "Aborted scan still in progress after 100ms\n"); | ||
| 788 | IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n"); | ||
| 789 | return -EAGAIN; | ||
| 790 | } | ||
| 791 | |||
| 792 | iwl3945_commit_rxon(priv); | 785 | iwl3945_commit_rxon(priv); |
| 793 | 786 | ||
| 794 | return 0; | 787 | return 0; |
| @@ -3298,6 +3291,8 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
| 3298 | 3291 | ||
| 3299 | mutex_lock(&priv->mutex); | 3292 | mutex_lock(&priv->mutex); |
| 3300 | 3293 | ||
| 3294 | cancel_delayed_work(&priv->scan_check); | ||
| 3295 | |||
| 3301 | if (!iwl_is_ready(priv)) { | 3296 | if (!iwl_is_ready(priv)) { |
| 3302 | IWL_WARN(priv, "request scan called when driver not ready.\n"); | 3297 | IWL_WARN(priv, "request scan called when driver not ready.\n"); |
| 3303 | goto done; | 3298 | goto done; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 07d378ef0b46..7b3ee8c2eaef 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
| @@ -138,7 +138,7 @@ void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev, | |||
| 138 | 138 | ||
| 139 | if (cipher == CIPHER_TKIP_NO_MIC) | 139 | if (cipher == CIPHER_TKIP_NO_MIC) |
| 140 | cipher = CIPHER_TKIP; | 140 | cipher = CIPHER_TKIP; |
| 141 | if (cipher == CIPHER_NONE || cipher > CIPHER_MAX) | 141 | if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX) |
| 142 | return; | 142 | return; |
| 143 | 143 | ||
| 144 | /* Remove CIPHER_NONE index */ | 144 | /* Remove CIPHER_NONE index */ |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 08265ca15785..487cb627ddba 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
| @@ -1551,6 +1551,13 @@ static int regulatory_hint_core(const char *alpha2) | |||
| 1551 | 1551 | ||
| 1552 | queue_regulatory_request(request); | 1552 | queue_regulatory_request(request); |
| 1553 | 1553 | ||
| 1554 | /* | ||
| 1555 | * This ensures last_request is populated once modules | ||
| 1556 | * come swinging in and calling regulatory hints and | ||
| 1557 | * wiphy_apply_custom_regulatory(). | ||
| 1558 | */ | ||
| 1559 | flush_scheduled_work(); | ||
| 1560 | |||
| 1554 | return 0; | 1561 | return 0; |
| 1555 | } | 1562 | } |
| 1556 | 1563 | ||
diff --git a/net/wireless/wext.c b/net/wireless/wext.c index cb6a5bb85d80..0e59f9ae9b81 100644 --- a/net/wireless/wext.c +++ b/net/wireless/wext.c | |||
| @@ -786,6 +786,13 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd, | |||
| 786 | err = -EFAULT; | 786 | err = -EFAULT; |
| 787 | goto out; | 787 | goto out; |
| 788 | } | 788 | } |
| 789 | |||
| 790 | if (cmd == SIOCSIWENCODEEXT) { | ||
| 791 | struct iw_encode_ext *ee = (void *) extra; | ||
| 792 | |||
| 793 | if (iwp->length < sizeof(*ee) + ee->key_len) | ||
| 794 | return -EFAULT; | ||
| 795 | } | ||
| 789 | } | 796 | } |
| 790 | 797 | ||
| 791 | err = handler(dev, info, (union iwreq_data *) iwp, extra); | 798 | err = handler(dev, info, (union iwreq_data *) iwp, extra); |
