diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-25 04:42:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 04:42:21 -0400 |
commit | c649c0e31d5736a4b7c5c3454182091dda4bbe62 (patch) | |
tree | 93da11bf4ea828611ab5277a7dbadf57724c2b1e /drivers/net | |
parent | daebafed7fef54fcc73d2d01431122cfd578d1e0 (diff) | |
parent | 4e2fd555199977c5994d1a4d2d3b8761b20ca4c7 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/gianfar.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/airo.c | 23 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/reset.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 2 |
7 files changed, 35 insertions, 18 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 2bb038b98cc4..4ae1d259fced 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1851,8 +1851,17 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) | |||
1851 | 1851 | ||
1852 | if (unlikely(!newskb)) | 1852 | if (unlikely(!newskb)) |
1853 | newskb = skb; | 1853 | newskb = skb; |
1854 | else if (skb) | 1854 | else if (skb) { |
1855 | /* | ||
1856 | * We need to reset ->data to what it | ||
1857 | * was before gfar_new_skb() re-aligned | ||
1858 | * it to an RXBUF_ALIGNMENT boundary | ||
1859 | * before we put the skb back on the | ||
1860 | * recycle list. | ||
1861 | */ | ||
1862 | skb->data = skb->head + NET_SKB_PAD; | ||
1855 | __skb_queue_head(&priv->rx_recycle, skb); | 1863 | __skb_queue_head(&priv->rx_recycle, skb); |
1864 | } | ||
1856 | } else { | 1865 | } else { |
1857 | /* Increment the number of packets */ | 1866 | /* Increment the number of packets */ |
1858 | dev->stats.rx_packets++; | 1867 | dev->stats.rx_packets++; |
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/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index c1862f8a2e7b..66067733ddd3 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/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" |
@@ -68,10 +68,10 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah, | |||
68 | 68 | ||
69 | /* Get exponent | 69 | /* Get exponent |
70 | * ALGO: coef_exp = 14 - highest set bit position */ | 70 | * ALGO: coef_exp = 14 - highest set bit position */ |
71 | coef_exp = get_bitmask_order(coef_scaled); | 71 | coef_exp = ilog2(coef_scaled); |
72 | 72 | ||
73 | /* Doesn't make sense if it's zero*/ | 73 | /* Doesn't make sense if it's zero*/ |
74 | if (!coef_exp) | 74 | if (!coef_scaled || !coef_exp) |
75 | return -EINVAL; | 75 | return -EINVAL; |
76 | 76 | ||
77 | /* Note: we've shifted coef_scaled by 24 */ | 77 | /* Note: we've shifted coef_scaled by 24 */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 89e1477b5143..ab29aab6b2d5 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-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index f6d4af5c7509..e26875dbe859 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", |
@@ -592,6 +589,8 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
592 | 589 | ||
593 | mutex_lock(&priv->mutex); | 590 | mutex_lock(&priv->mutex); |
594 | 591 | ||
592 | cancel_delayed_work(&priv->scan_check); | ||
593 | |||
595 | if (!iwl_is_ready(priv)) { | 594 | if (!iwl_is_ready(priv)) { |
596 | IWL_WARN(priv, "request scan called when driver not ready.\n"); | 595 | IWL_WARN(priv, "request scan called when driver not ready.\n"); |
597 | goto done; | 596 | goto done; |
@@ -819,6 +818,8 @@ void iwl_bg_scan_completed(struct work_struct *work) | |||
819 | 818 | ||
820 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); | 819 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); |
821 | 820 | ||
821 | cancel_delayed_work(&priv->scan_check); | ||
822 | |||
822 | ieee80211_scan_completed(priv->hw, false); | 823 | ieee80211_scan_completed(priv->hw, false); |
823 | 824 | ||
824 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 825 | 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 c434f493daf5..5c10b87d0336 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -2937,6 +2937,8 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
2937 | 2937 | ||
2938 | mutex_lock(&priv->mutex); | 2938 | mutex_lock(&priv->mutex); |
2939 | 2939 | ||
2940 | cancel_delayed_work(&priv->scan_check); | ||
2941 | |||
2940 | if (!iwl_is_ready(priv)) { | 2942 | if (!iwl_is_ready(priv)) { |
2941 | IWL_WARN(priv, "request scan called when driver not ready.\n"); | 2943 | IWL_WARN(priv, "request scan called when driver not ready.\n"); |
2942 | goto done; | 2944 | 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 */ |