diff options
-rw-r--r-- | drivers/net/bnx2x.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 25 | ||||
-rw-r--r-- | net/wireless/reg.c | 3 |
7 files changed, 44 insertions, 9 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 408eae7d6cc6..a329bee25550 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
@@ -160,7 +160,7 @@ struct sw_rx_page { | |||
160 | #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) | 160 | #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) |
161 | #define SGE_PAGE_SIZE PAGE_SIZE | 161 | #define SGE_PAGE_SIZE PAGE_SIZE |
162 | #define SGE_PAGE_SHIFT PAGE_SHIFT | 162 | #define SGE_PAGE_SHIFT PAGE_SHIFT |
163 | #define SGE_PAGE_ALIGN(addr) PAGE_ALIGN(addr) | 163 | #define SGE_PAGE_ALIGN(addr) PAGE_ALIGN((typeof(PAGE_SIZE))addr) |
164 | 164 | ||
165 | /* SGE ring related macros */ | 165 | /* SGE ring related macros */ |
166 | #define NUM_RX_SGE_PAGES 2 | 166 | #define NUM_RX_SGE_PAGES 2 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 31e64bd96d1e..7902d22da663 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3482,8 +3482,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3482 | out_iounmap: | 3482 | out_iounmap: |
3483 | pci_iounmap(pdev, priv->hw_base); | 3483 | pci_iounmap(pdev, priv->hw_base); |
3484 | out_pci_release_regions: | 3484 | out_pci_release_regions: |
3485 | pci_release_regions(pdev); | ||
3486 | pci_set_drvdata(pdev, NULL); | 3485 | pci_set_drvdata(pdev, NULL); |
3486 | pci_release_regions(pdev); | ||
3487 | out_pci_disable_device: | 3487 | out_pci_disable_device: |
3488 | pci_disable_device(pdev); | 3488 | pci_disable_device(pdev); |
3489 | out_ieee80211_free_hw: | 3489 | out_ieee80211_free_hw: |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index a2bde78e548d..d37679c69a5c 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -5110,7 +5110,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5110 | /* amp init */ | 5110 | /* amp init */ |
5111 | err = priv->cfg->ops->lib->apm_ops.init(priv); | 5111 | err = priv->cfg->ops->lib->apm_ops.init(priv); |
5112 | if (err < 0) { | 5112 | if (err < 0) { |
5113 | IWL_DEBUG_INFO(priv, "Failed to init APMG\n"); | 5113 | IWL_DEBUG_INFO(priv, "Failed to init the card\n"); |
5114 | goto out_iounmap; | 5114 | goto out_iounmap; |
5115 | } | 5115 | } |
5116 | 5116 | ||
@@ -5234,8 +5234,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5234 | out_pci_release_regions: | 5234 | out_pci_release_regions: |
5235 | pci_release_regions(pdev); | 5235 | pci_release_regions(pdev); |
5236 | out_pci_disable_device: | 5236 | out_pci_disable_device: |
5237 | pci_disable_device(pdev); | ||
5238 | pci_set_drvdata(pdev, NULL); | 5237 | pci_set_drvdata(pdev, NULL); |
5238 | pci_disable_device(pdev); | ||
5239 | out_ieee80211_free_hw: | 5239 | out_ieee80211_free_hw: |
5240 | ieee80211_free_hw(priv->hw); | 5240 | ieee80211_free_hw(priv->hw); |
5241 | out: | 5241 | out: |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index fcf43bcae979..14438a642fdd 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -849,10 +849,11 @@ static struct sk_buff *p54_find_tx_entry(struct ieee80211_hw *dev, | |||
849 | __le32 req_id) | 849 | __le32 req_id) |
850 | { | 850 | { |
851 | struct p54_common *priv = dev->priv; | 851 | struct p54_common *priv = dev->priv; |
852 | struct sk_buff *entry = priv->tx_queue.next; | 852 | struct sk_buff *entry; |
853 | unsigned long flags; | 853 | unsigned long flags; |
854 | 854 | ||
855 | spin_lock_irqsave(&priv->tx_queue.lock, flags); | 855 | spin_lock_irqsave(&priv->tx_queue.lock, flags); |
856 | entry = priv->tx_queue.next; | ||
856 | while (entry != (struct sk_buff *)&priv->tx_queue) { | 857 | while (entry != (struct sk_buff *)&priv->tx_queue) { |
857 | struct p54_hdr *hdr = (struct p54_hdr *) entry->data; | 858 | struct p54_hdr *hdr = (struct p54_hdr *) entry->data; |
858 | 859 | ||
@@ -871,7 +872,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
871 | struct p54_common *priv = dev->priv; | 872 | struct p54_common *priv = dev->priv; |
872 | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; | 873 | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; |
873 | struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; | 874 | struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; |
874 | struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next; | 875 | struct sk_buff *entry; |
875 | u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; | 876 | u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; |
876 | struct p54_tx_info *range = NULL; | 877 | struct p54_tx_info *range = NULL; |
877 | u32 freed = 0; | 878 | u32 freed = 0; |
@@ -880,6 +881,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
880 | int count, idx; | 881 | int count, idx; |
881 | 882 | ||
882 | spin_lock_irqsave(&priv->tx_queue.lock, flags); | 883 | spin_lock_irqsave(&priv->tx_queue.lock, flags); |
884 | entry = (struct sk_buff *) priv->tx_queue.next; | ||
883 | while (entry != (struct sk_buff *)&priv->tx_queue) { | 885 | while (entry != (struct sk_buff *)&priv->tx_queue) { |
884 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); | 886 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); |
885 | struct p54_hdr *entry_hdr; | 887 | struct p54_hdr *entry_hdr; |
@@ -1122,7 +1124,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
1122 | struct p54_hdr *data, u32 len) | 1124 | struct p54_hdr *data, u32 len) |
1123 | { | 1125 | { |
1124 | struct p54_common *priv = dev->priv; | 1126 | struct p54_common *priv = dev->priv; |
1125 | struct sk_buff *entry = priv->tx_queue.next; | 1127 | struct sk_buff *entry; |
1126 | struct sk_buff *target_skb = NULL; | 1128 | struct sk_buff *target_skb = NULL; |
1127 | struct ieee80211_tx_info *info; | 1129 | struct ieee80211_tx_info *info; |
1128 | struct p54_tx_info *range; | 1130 | struct p54_tx_info *range; |
@@ -1160,6 +1162,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
1160 | } | 1162 | } |
1161 | } | 1163 | } |
1162 | 1164 | ||
1165 | entry = priv->tx_queue.next; | ||
1163 | while (left--) { | 1166 | while (left--) { |
1164 | u32 hole_size; | 1167 | u32 hole_size; |
1165 | info = IEEE80211_SKB_CB(entry); | 1168 | info = IEEE80211_SKB_CB(entry); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index ca280674180e..9e630e70fc97 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -2004,6 +2004,8 @@ static struct usb_device_id rt2500usb_device_table[] = { | |||
2004 | { USB_DEVICE(0x13b1, 0x000d), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2004 | { USB_DEVICE(0x13b1, 0x000d), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2005 | { USB_DEVICE(0x13b1, 0x0011), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2005 | { USB_DEVICE(0x13b1, 0x0011), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2006 | { USB_DEVICE(0x13b1, 0x001a), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2006 | { USB_DEVICE(0x13b1, 0x001a), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2007 | /* CNet */ | ||
2008 | { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
2007 | /* Conceptronic */ | 2009 | /* Conceptronic */ |
2008 | { USB_DEVICE(0x14b2, 0x3c02), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2010 | { USB_DEVICE(0x14b2, 0x3c02), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2009 | /* D-LINK */ | 2011 | /* D-LINK */ |
@@ -2028,14 +2030,20 @@ static struct usb_device_id rt2500usb_device_table[] = { | |||
2028 | { USB_DEVICE(0x148f, 0x2570), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2030 | { USB_DEVICE(0x148f, 0x2570), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2029 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2031 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2030 | { USB_DEVICE(0x148f, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2032 | { USB_DEVICE(0x148f, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2033 | /* Sagem */ | ||
2034 | { USB_DEVICE(0x079b, 0x004b), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
2031 | /* Siemens */ | 2035 | /* Siemens */ |
2032 | { USB_DEVICE(0x0681, 0x3c06), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2036 | { USB_DEVICE(0x0681, 0x3c06), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2033 | /* SMC */ | 2037 | /* SMC */ |
2034 | { USB_DEVICE(0x0707, 0xee13), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2038 | { USB_DEVICE(0x0707, 0xee13), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2035 | /* Spairon */ | 2039 | /* Spairon */ |
2036 | { USB_DEVICE(0x114b, 0x0110), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2040 | { USB_DEVICE(0x114b, 0x0110), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2041 | /* SURECOM */ | ||
2042 | { USB_DEVICE(0x0769, 0x11f3), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
2037 | /* Trust */ | 2043 | /* Trust */ |
2038 | { USB_DEVICE(0x0eb0, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2044 | { USB_DEVICE(0x0eb0, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2045 | /* VTech */ | ||
2046 | { USB_DEVICE(0x0f88, 0x3012), USB_DEVICE_DATA(&rt2500usb_ops) }, | ||
2039 | /* Zinwell */ | 2047 | /* Zinwell */ |
2040 | { USB_DEVICE(0x5a57, 0x0260), USB_DEVICE_DATA(&rt2500usb_ops) }, | 2048 | { USB_DEVICE(0x5a57, 0x0260), USB_DEVICE_DATA(&rt2500usb_ops) }, |
2041 | { 0, } | 2049 | { 0, } |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 90ace51ab496..24fdfdfee3df 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2341,10 +2341,18 @@ static const struct rt2x00_ops rt73usb_ops = { | |||
2341 | */ | 2341 | */ |
2342 | static struct usb_device_id rt73usb_device_table[] = { | 2342 | static struct usb_device_id rt73usb_device_table[] = { |
2343 | /* AboCom */ | 2343 | /* AboCom */ |
2344 | { USB_DEVICE(0x07b8, 0xb21b), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2345 | { USB_DEVICE(0x07b8, 0xb21c), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2344 | { USB_DEVICE(0x07b8, 0xb21d), USB_DEVICE_DATA(&rt73usb_ops) }, | 2346 | { USB_DEVICE(0x07b8, 0xb21d), USB_DEVICE_DATA(&rt73usb_ops) }, |
2347 | { USB_DEVICE(0x07b8, 0xb21e), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2348 | { USB_DEVICE(0x07b8, 0xb21f), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2349 | /* AL */ | ||
2350 | { USB_DEVICE(0x14b2, 0x3c10), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2345 | /* Amigo */ | 2351 | /* Amigo */ |
2346 | { USB_DEVICE(0x148f, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) }, | 2352 | { USB_DEVICE(0x148f, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) }, |
2347 | { USB_DEVICE(0x0eb0, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) }, | 2353 | { USB_DEVICE(0x0eb0, 0x9021), USB_DEVICE_DATA(&rt73usb_ops) }, |
2354 | /* AMIT */ | ||
2355 | { USB_DEVICE(0x18c5, 0x0002), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2348 | /* Askey */ | 2356 | /* Askey */ |
2349 | { USB_DEVICE(0x1690, 0x0722), USB_DEVICE_DATA(&rt73usb_ops) }, | 2357 | { USB_DEVICE(0x1690, 0x0722), USB_DEVICE_DATA(&rt73usb_ops) }, |
2350 | /* ASUS */ | 2358 | /* ASUS */ |
@@ -2357,6 +2365,7 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2357 | { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) }, | 2365 | { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) }, |
2358 | /* Billionton */ | 2366 | /* Billionton */ |
2359 | { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, | 2367 | { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, |
2368 | { USB_DEVICE(0x08dd, 0x0120), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2360 | /* Buffalo */ | 2369 | /* Buffalo */ |
2361 | { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) }, | 2370 | { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) }, |
2362 | { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, | 2371 | { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, |
@@ -2372,6 +2381,11 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2372 | { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, | 2381 | { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, |
2373 | { USB_DEVICE(0x07d1, 0x3c06), USB_DEVICE_DATA(&rt73usb_ops) }, | 2382 | { USB_DEVICE(0x07d1, 0x3c06), USB_DEVICE_DATA(&rt73usb_ops) }, |
2374 | { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) }, | 2383 | { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) }, |
2384 | /* Edimax */ | ||
2385 | { USB_DEVICE(0x7392, 0x7318), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2386 | { USB_DEVICE(0x7392, 0x7618), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2387 | /* EnGenius */ | ||
2388 | { USB_DEVICE(0x1740, 0x3701), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2375 | /* Gemtek */ | 2389 | /* Gemtek */ |
2376 | { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, | 2390 | { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, |
2377 | /* Gigabyte */ | 2391 | /* Gigabyte */ |
@@ -2399,16 +2413,25 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2399 | { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, | 2413 | { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, |
2400 | { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) }, | 2414 | { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) }, |
2401 | { USB_DEVICE(0x18e8, 0x6238), USB_DEVICE_DATA(&rt73usb_ops) }, | 2415 | { USB_DEVICE(0x18e8, 0x6238), USB_DEVICE_DATA(&rt73usb_ops) }, |
2416 | /* Samsung */ | ||
2417 | { USB_DEVICE(0x04e8, 0x4471), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2402 | /* Senao */ | 2418 | /* Senao */ |
2403 | { USB_DEVICE(0x1740, 0x7100), USB_DEVICE_DATA(&rt73usb_ops) }, | 2419 | { USB_DEVICE(0x1740, 0x7100), USB_DEVICE_DATA(&rt73usb_ops) }, |
2404 | /* Sitecom */ | 2420 | /* Sitecom */ |
2405 | { USB_DEVICE(0x0df6, 0x9712), USB_DEVICE_DATA(&rt73usb_ops) }, | 2421 | { USB_DEVICE(0x0df6, 0x0024), USB_DEVICE_DATA(&rt73usb_ops) }, |
2422 | { USB_DEVICE(0x0df6, 0x0027), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2423 | { USB_DEVICE(0x0df6, 0x002f), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2406 | { USB_DEVICE(0x0df6, 0x90ac), USB_DEVICE_DATA(&rt73usb_ops) }, | 2424 | { USB_DEVICE(0x0df6, 0x90ac), USB_DEVICE_DATA(&rt73usb_ops) }, |
2425 | { USB_DEVICE(0x0df6, 0x9712), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2407 | /* Surecom */ | 2426 | /* Surecom */ |
2408 | { USB_DEVICE(0x0769, 0x31f3), USB_DEVICE_DATA(&rt73usb_ops) }, | 2427 | { USB_DEVICE(0x0769, 0x31f3), USB_DEVICE_DATA(&rt73usb_ops) }, |
2428 | /* Philips */ | ||
2429 | { USB_DEVICE(0x0471, 0x200a), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2409 | /* Planex */ | 2430 | /* Planex */ |
2410 | { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) }, | 2431 | { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) }, |
2411 | { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) }, | 2432 | { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) }, |
2433 | /* Zcom */ | ||
2434 | { USB_DEVICE(0x0cde, 0x001c), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2412 | /* ZyXEL */ | 2435 | /* ZyXEL */ |
2413 | { USB_DEVICE(0x0586, 0x3415), USB_DEVICE_DATA(&rt73usb_ops) }, | 2436 | { USB_DEVICE(0x0586, 0x3415), USB_DEVICE_DATA(&rt73usb_ops) }, |
2414 | { 0, } | 2437 | { 0, } |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ce66bfdf57ec..58df98f10990 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -392,7 +392,8 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule) | |||
392 | 392 | ||
393 | freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; | 393 | freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; |
394 | 394 | ||
395 | if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff) | 395 | if (freq_range->end_freq_khz <= freq_range->start_freq_khz || |
396 | freq_range->max_bandwidth_khz > freq_diff) | ||
396 | return false; | 397 | return false; |
397 | 398 | ||
398 | return true; | 399 | return true; |