diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:04:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:04:44 -0400 |
commit | f8965467f366fd18f01feafb5db10512d7b4422c (patch) | |
tree | 3706a9cd779859271ca61b85c63a1bc3f82d626e /drivers/net/wireless/ipw2x00 | |
parent | a26272e5200765691e67d6780e52b32498fdb659 (diff) | |
parent | 2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
qlcnic: adding co maintainer
ixgbe: add support for active DA cables
ixgbe: dcb, do not tag tc_prio_control frames
ixgbe: fix ixgbe_tx_is_paused logic
ixgbe: always enable vlan strip/insert when DCB is enabled
ixgbe: remove some redundant code in setting FCoE FIP filter
ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
ixgbe: fix header len when unsplit packet overflows to data buffer
ipv6: Never schedule DAD timer on dead address
ipv6: Use POSTDAD state
ipv6: Use state_lock to protect ifa state
ipv6: Replace inet6_ifaddr->dead with state
cxgb4: notify upper drivers if the device is already up when they load
cxgb4: keep interrupts available when the ports are brought down
cxgb4: fix initial addition of MAC address
cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
cnic: Convert cnic_local_flags to atomic ops.
can: Fix SJA1000 command register writes on SMP systems
bridge: fix build for CONFIG_SYSFS disabled
ARCNET: Limit com20020 PCI ID matches for SOHARD cards
...
Fix up various conflicts with pcmcia tree drivers/net/
{pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
wireless/orinoco/spectrum_cs.c} and feature removal
(Documentation/feature-removal-schedule.txt).
Also fix a non-content conflict due to pm_qos_requirement getting
renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 49 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 190 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw.h | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_module.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_rx.c | 1 |
5 files changed, 135 insertions, 132 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 2b05fe5e994c..0bd4dfa59a8a 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -2141,7 +2141,7 @@ static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) | |||
2141 | DECLARE_SSID_BUF(ssid); | 2141 | DECLARE_SSID_BUF(ssid); |
2142 | 2142 | ||
2143 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC, | 2143 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC, |
2144 | "disassociated: '%s' %pM \n", | 2144 | "disassociated: '%s' %pM\n", |
2145 | print_ssid(ssid, priv->essid, priv->essid_len), | 2145 | print_ssid(ssid, priv->essid, priv->essid_len), |
2146 | priv->bssid); | 2146 | priv->bssid); |
2147 | 2147 | ||
@@ -3240,7 +3240,6 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) | |||
3240 | IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX, | 3240 | IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX, |
3241 | txq->next); | 3241 | txq->next); |
3242 | } | 3242 | } |
3243 | return; | ||
3244 | } | 3243 | } |
3245 | 3244 | ||
3246 | static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) | 3245 | static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) |
@@ -3286,7 +3285,7 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) | |||
3286 | 3285 | ||
3287 | if (inta & IPW2100_INTA_PARITY_ERROR) { | 3286 | if (inta & IPW2100_INTA_PARITY_ERROR) { |
3288 | printk(KERN_ERR DRV_NAME | 3287 | printk(KERN_ERR DRV_NAME |
3289 | ": ***** PARITY ERROR INTERRUPT !!!! \n"); | 3288 | ": ***** PARITY ERROR INTERRUPT !!!!\n"); |
3290 | priv->inta_other++; | 3289 | priv->inta_other++; |
3291 | write_register(dev, IPW_REG_INTA, IPW2100_INTA_PARITY_ERROR); | 3290 | write_register(dev, IPW_REG_INTA, IPW2100_INTA_PARITY_ERROR); |
3292 | } | 3291 | } |
@@ -6103,7 +6102,7 @@ static const struct net_device_ops ipw2100_netdev_ops = { | |||
6103 | .ndo_validate_addr = eth_validate_addr, | 6102 | .ndo_validate_addr = eth_validate_addr, |
6104 | }; | 6103 | }; |
6105 | 6104 | ||
6106 | /* Look into using netdev destructor to shutdown ieee80211? */ | 6105 | /* Look into using netdev destructor to shutdown libipw? */ |
6107 | 6106 | ||
6108 | static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | 6107 | static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, |
6109 | void __iomem * base_addr, | 6108 | void __iomem * base_addr, |
@@ -6113,7 +6112,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6113 | struct ipw2100_priv *priv; | 6112 | struct ipw2100_priv *priv; |
6114 | struct net_device *dev; | 6113 | struct net_device *dev; |
6115 | 6114 | ||
6116 | dev = alloc_ieee80211(sizeof(struct ipw2100_priv), 0); | 6115 | dev = alloc_libipw(sizeof(struct ipw2100_priv), 0); |
6117 | if (!dev) | 6116 | if (!dev) |
6118 | return NULL; | 6117 | return NULL; |
6119 | priv = libipw_priv(dev); | 6118 | priv = libipw_priv(dev); |
@@ -6426,7 +6425,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
6426 | sysfs_remove_group(&pci_dev->dev.kobj, | 6425 | sysfs_remove_group(&pci_dev->dev.kobj, |
6427 | &ipw2100_attribute_group); | 6426 | &ipw2100_attribute_group); |
6428 | 6427 | ||
6429 | free_ieee80211(dev, 0); | 6428 | free_libipw(dev, 0); |
6430 | pci_set_drvdata(pci_dev, NULL); | 6429 | pci_set_drvdata(pci_dev, NULL); |
6431 | } | 6430 | } |
6432 | 6431 | ||
@@ -6484,10 +6483,10 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev) | |||
6484 | if (dev->base_addr) | 6483 | if (dev->base_addr) |
6485 | iounmap((void __iomem *)dev->base_addr); | 6484 | iounmap((void __iomem *)dev->base_addr); |
6486 | 6485 | ||
6487 | /* wiphy_unregister needs to be here, before free_ieee80211 */ | 6486 | /* wiphy_unregister needs to be here, before free_libipw */ |
6488 | wiphy_unregister(priv->ieee->wdev.wiphy); | 6487 | wiphy_unregister(priv->ieee->wdev.wiphy); |
6489 | kfree(priv->ieee->bg_band.channels); | 6488 | kfree(priv->ieee->bg_band.channels); |
6490 | free_ieee80211(dev, 0); | 6489 | free_libipw(dev, 0); |
6491 | } | 6490 | } |
6492 | 6491 | ||
6493 | pci_release_regions(pci_dev); | 6492 | pci_release_regions(pci_dev); |
@@ -6754,7 +6753,7 @@ static int ipw2100_wx_set_freq(struct net_device *dev, | |||
6754 | err = -EOPNOTSUPP; | 6753 | err = -EOPNOTSUPP; |
6755 | goto done; | 6754 | goto done; |
6756 | } else { /* Set the channel */ | 6755 | } else { /* Set the channel */ |
6757 | IPW_DEBUG_WX("SET Freq/Channel -> %d \n", fwrq->m); | 6756 | IPW_DEBUG_WX("SET Freq/Channel -> %d\n", fwrq->m); |
6758 | err = ipw2100_set_channel(priv, fwrq->m, 0); | 6757 | err = ipw2100_set_channel(priv, fwrq->m, 0); |
6759 | } | 6758 | } |
6760 | 6759 | ||
@@ -6783,7 +6782,7 @@ static int ipw2100_wx_get_freq(struct net_device *dev, | |||
6783 | else | 6782 | else |
6784 | wrqu->freq.m = 0; | 6783 | wrqu->freq.m = 0; |
6785 | 6784 | ||
6786 | IPW_DEBUG_WX("GET Freq/Channel -> %d \n", priv->channel); | 6785 | IPW_DEBUG_WX("GET Freq/Channel -> %d\n", priv->channel); |
6787 | return 0; | 6786 | return 0; |
6788 | 6787 | ||
6789 | } | 6788 | } |
@@ -6795,7 +6794,7 @@ static int ipw2100_wx_set_mode(struct net_device *dev, | |||
6795 | struct ipw2100_priv *priv = libipw_priv(dev); | 6794 | struct ipw2100_priv *priv = libipw_priv(dev); |
6796 | int err = 0; | 6795 | int err = 0; |
6797 | 6796 | ||
6798 | IPW_DEBUG_WX("SET Mode -> %d \n", wrqu->mode); | 6797 | IPW_DEBUG_WX("SET Mode -> %d\n", wrqu->mode); |
6799 | 6798 | ||
6800 | if (wrqu->mode == priv->ieee->iw_mode) | 6799 | if (wrqu->mode == priv->ieee->iw_mode) |
6801 | return 0; | 6800 | return 0; |
@@ -7150,7 +7149,7 @@ static int ipw2100_wx_set_nick(struct net_device *dev, | |||
7150 | memset(priv->nick, 0, sizeof(priv->nick)); | 7149 | memset(priv->nick, 0, sizeof(priv->nick)); |
7151 | memcpy(priv->nick, extra, wrqu->data.length); | 7150 | memcpy(priv->nick, extra, wrqu->data.length); |
7152 | 7151 | ||
7153 | IPW_DEBUG_WX("SET Nickname -> %s \n", priv->nick); | 7152 | IPW_DEBUG_WX("SET Nickname -> %s\n", priv->nick); |
7154 | 7153 | ||
7155 | return 0; | 7154 | return 0; |
7156 | } | 7155 | } |
@@ -7169,7 +7168,7 @@ static int ipw2100_wx_get_nick(struct net_device *dev, | |||
7169 | memcpy(extra, priv->nick, wrqu->data.length); | 7168 | memcpy(extra, priv->nick, wrqu->data.length); |
7170 | wrqu->data.flags = 1; /* active */ | 7169 | wrqu->data.flags = 1; /* active */ |
7171 | 7170 | ||
7172 | IPW_DEBUG_WX("GET Nickname -> %s \n", extra); | 7171 | IPW_DEBUG_WX("GET Nickname -> %s\n", extra); |
7173 | 7172 | ||
7174 | return 0; | 7173 | return 0; |
7175 | } | 7174 | } |
@@ -7208,7 +7207,7 @@ static int ipw2100_wx_set_rate(struct net_device *dev, | |||
7208 | 7207 | ||
7209 | err = ipw2100_set_tx_rates(priv, rate, 0); | 7208 | err = ipw2100_set_tx_rates(priv, rate, 0); |
7210 | 7209 | ||
7211 | IPW_DEBUG_WX("SET Rate -> %04X \n", rate); | 7210 | IPW_DEBUG_WX("SET Rate -> %04X\n", rate); |
7212 | done: | 7211 | done: |
7213 | mutex_unlock(&priv->action_mutex); | 7212 | mutex_unlock(&priv->action_mutex); |
7214 | return err; | 7213 | return err; |
@@ -7259,7 +7258,7 @@ static int ipw2100_wx_get_rate(struct net_device *dev, | |||
7259 | wrqu->bitrate.value = 0; | 7258 | wrqu->bitrate.value = 0; |
7260 | } | 7259 | } |
7261 | 7260 | ||
7262 | IPW_DEBUG_WX("GET Rate -> %d \n", wrqu->bitrate.value); | 7261 | IPW_DEBUG_WX("GET Rate -> %d\n", wrqu->bitrate.value); |
7263 | 7262 | ||
7264 | done: | 7263 | done: |
7265 | mutex_unlock(&priv->action_mutex); | 7264 | mutex_unlock(&priv->action_mutex); |
@@ -7295,7 +7294,7 @@ static int ipw2100_wx_set_rts(struct net_device *dev, | |||
7295 | 7294 | ||
7296 | err = ipw2100_set_rts_threshold(priv, value); | 7295 | err = ipw2100_set_rts_threshold(priv, value); |
7297 | 7296 | ||
7298 | IPW_DEBUG_WX("SET RTS Threshold -> 0x%08X \n", value); | 7297 | IPW_DEBUG_WX("SET RTS Threshold -> 0x%08X\n", value); |
7299 | done: | 7298 | done: |
7300 | mutex_unlock(&priv->action_mutex); | 7299 | mutex_unlock(&priv->action_mutex); |
7301 | return err; | 7300 | return err; |
@@ -7317,7 +7316,7 @@ static int ipw2100_wx_get_rts(struct net_device *dev, | |||
7317 | /* If RTS is set to the default value, then it is disabled */ | 7316 | /* If RTS is set to the default value, then it is disabled */ |
7318 | wrqu->rts.disabled = (priv->rts_threshold & RTS_DISABLED) ? 1 : 0; | 7317 | wrqu->rts.disabled = (priv->rts_threshold & RTS_DISABLED) ? 1 : 0; |
7319 | 7318 | ||
7320 | IPW_DEBUG_WX("GET RTS Threshold -> 0x%08X \n", wrqu->rts.value); | 7319 | IPW_DEBUG_WX("GET RTS Threshold -> 0x%08X\n", wrqu->rts.value); |
7321 | 7320 | ||
7322 | return 0; | 7321 | return 0; |
7323 | } | 7322 | } |
@@ -7356,7 +7355,7 @@ static int ipw2100_wx_set_txpow(struct net_device *dev, | |||
7356 | 7355 | ||
7357 | err = ipw2100_set_tx_power(priv, value); | 7356 | err = ipw2100_set_tx_power(priv, value); |
7358 | 7357 | ||
7359 | IPW_DEBUG_WX("SET TX Power -> %d \n", value); | 7358 | IPW_DEBUG_WX("SET TX Power -> %d\n", value); |
7360 | 7359 | ||
7361 | done: | 7360 | done: |
7362 | mutex_unlock(&priv->action_mutex); | 7361 | mutex_unlock(&priv->action_mutex); |
@@ -7385,7 +7384,7 @@ static int ipw2100_wx_get_txpow(struct net_device *dev, | |||
7385 | 7384 | ||
7386 | wrqu->txpower.flags = IW_TXPOW_DBM; | 7385 | wrqu->txpower.flags = IW_TXPOW_DBM; |
7387 | 7386 | ||
7388 | IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->txpower.value); | 7387 | IPW_DEBUG_WX("GET TX Power -> %d\n", wrqu->txpower.value); |
7389 | 7388 | ||
7390 | return 0; | 7389 | return 0; |
7391 | } | 7390 | } |
@@ -7415,7 +7414,7 @@ static int ipw2100_wx_set_frag(struct net_device *dev, | |||
7415 | priv->frag_threshold = priv->ieee->fts; | 7414 | priv->frag_threshold = priv->ieee->fts; |
7416 | } | 7415 | } |
7417 | 7416 | ||
7418 | IPW_DEBUG_WX("SET Frag Threshold -> %d \n", priv->ieee->fts); | 7417 | IPW_DEBUG_WX("SET Frag Threshold -> %d\n", priv->ieee->fts); |
7419 | 7418 | ||
7420 | return 0; | 7419 | return 0; |
7421 | } | 7420 | } |
@@ -7433,7 +7432,7 @@ static int ipw2100_wx_get_frag(struct net_device *dev, | |||
7433 | wrqu->frag.fixed = 0; /* no auto select */ | 7432 | wrqu->frag.fixed = 0; /* no auto select */ |
7434 | wrqu->frag.disabled = (priv->frag_threshold & FRAG_DISABLED) ? 1 : 0; | 7433 | wrqu->frag.disabled = (priv->frag_threshold & FRAG_DISABLED) ? 1 : 0; |
7435 | 7434 | ||
7436 | IPW_DEBUG_WX("GET Frag Threshold -> %d \n", wrqu->frag.value); | 7435 | IPW_DEBUG_WX("GET Frag Threshold -> %d\n", wrqu->frag.value); |
7437 | 7436 | ||
7438 | return 0; | 7437 | return 0; |
7439 | } | 7438 | } |
@@ -7459,14 +7458,14 @@ static int ipw2100_wx_set_retry(struct net_device *dev, | |||
7459 | 7458 | ||
7460 | if (wrqu->retry.flags & IW_RETRY_SHORT) { | 7459 | if (wrqu->retry.flags & IW_RETRY_SHORT) { |
7461 | err = ipw2100_set_short_retry(priv, wrqu->retry.value); | 7460 | err = ipw2100_set_short_retry(priv, wrqu->retry.value); |
7462 | IPW_DEBUG_WX("SET Short Retry Limit -> %d \n", | 7461 | IPW_DEBUG_WX("SET Short Retry Limit -> %d\n", |
7463 | wrqu->retry.value); | 7462 | wrqu->retry.value); |
7464 | goto done; | 7463 | goto done; |
7465 | } | 7464 | } |
7466 | 7465 | ||
7467 | if (wrqu->retry.flags & IW_RETRY_LONG) { | 7466 | if (wrqu->retry.flags & IW_RETRY_LONG) { |
7468 | err = ipw2100_set_long_retry(priv, wrqu->retry.value); | 7467 | err = ipw2100_set_long_retry(priv, wrqu->retry.value); |
7469 | IPW_DEBUG_WX("SET Long Retry Limit -> %d \n", | 7468 | IPW_DEBUG_WX("SET Long Retry Limit -> %d\n", |
7470 | wrqu->retry.value); | 7469 | wrqu->retry.value); |
7471 | goto done; | 7470 | goto done; |
7472 | } | 7471 | } |
@@ -7475,7 +7474,7 @@ static int ipw2100_wx_set_retry(struct net_device *dev, | |||
7475 | if (!err) | 7474 | if (!err) |
7476 | err = ipw2100_set_long_retry(priv, wrqu->retry.value); | 7475 | err = ipw2100_set_long_retry(priv, wrqu->retry.value); |
7477 | 7476 | ||
7478 | IPW_DEBUG_WX("SET Both Retry Limits -> %d \n", wrqu->retry.value); | 7477 | IPW_DEBUG_WX("SET Both Retry Limits -> %d\n", wrqu->retry.value); |
7479 | 7478 | ||
7480 | done: | 7479 | done: |
7481 | mutex_unlock(&priv->action_mutex); | 7480 | mutex_unlock(&priv->action_mutex); |
@@ -7509,7 +7508,7 @@ static int ipw2100_wx_get_retry(struct net_device *dev, | |||
7509 | wrqu->retry.value = priv->short_retry_limit; | 7508 | wrqu->retry.value = priv->short_retry_limit; |
7510 | } | 7509 | } |
7511 | 7510 | ||
7512 | IPW_DEBUG_WX("GET Retry -> %d \n", wrqu->retry.value); | 7511 | IPW_DEBUG_WX("GET Retry -> %d\n", wrqu->retry.value); |
7513 | 7512 | ||
7514 | return 0; | 7513 | return 0; |
7515 | } | 7514 | } |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 8d72e3d19586..3aa3bb18f615 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -459,7 +459,7 @@ static u8 _ipw_read_reg8(struct ipw_priv *priv, u32 reg) | |||
459 | { | 459 | { |
460 | u32 word; | 460 | u32 word; |
461 | _ipw_write32(priv, IPW_INDIRECT_ADDR, reg & IPW_INDIRECT_ADDR_MASK); | 461 | _ipw_write32(priv, IPW_INDIRECT_ADDR, reg & IPW_INDIRECT_ADDR_MASK); |
462 | IPW_DEBUG_IO(" reg = 0x%8X : \n", reg); | 462 | IPW_DEBUG_IO(" reg = 0x%8X :\n", reg); |
463 | word = _ipw_read32(priv, IPW_INDIRECT_DATA); | 463 | word = _ipw_read32(priv, IPW_INDIRECT_DATA); |
464 | return (word >> ((reg & 0x3) * 8)) & 0xff; | 464 | return (word >> ((reg & 0x3) * 8)) & 0xff; |
465 | } | 465 | } |
@@ -473,7 +473,7 @@ static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg) | |||
473 | 473 | ||
474 | _ipw_write32(priv, IPW_INDIRECT_ADDR, reg); | 474 | _ipw_write32(priv, IPW_INDIRECT_ADDR, reg); |
475 | value = _ipw_read32(priv, IPW_INDIRECT_DATA); | 475 | value = _ipw_read32(priv, IPW_INDIRECT_DATA); |
476 | IPW_DEBUG_IO(" reg = 0x%4X : value = 0x%4x \n", reg, value); | 476 | IPW_DEBUG_IO(" reg = 0x%4X : value = 0x%4x\n", reg, value); |
477 | return value; | 477 | return value; |
478 | } | 478 | } |
479 | 479 | ||
@@ -2349,16 +2349,25 @@ static void ipw_bg_adapter_restart(struct work_struct *work) | |||
2349 | mutex_unlock(&priv->mutex); | 2349 | mutex_unlock(&priv->mutex); |
2350 | } | 2350 | } |
2351 | 2351 | ||
2352 | #define IPW_SCAN_CHECK_WATCHDOG (5 * HZ) | 2352 | static void ipw_abort_scan(struct ipw_priv *priv); |
2353 | |||
2354 | #define IPW_SCAN_CHECK_WATCHDOG (5 * HZ) | ||
2353 | 2355 | ||
2354 | static void ipw_scan_check(void *data) | 2356 | static void ipw_scan_check(void *data) |
2355 | { | 2357 | { |
2356 | struct ipw_priv *priv = data; | 2358 | struct ipw_priv *priv = data; |
2357 | if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) { | 2359 | |
2360 | if (priv->status & STATUS_SCAN_ABORTING) { | ||
2358 | IPW_DEBUG_SCAN("Scan completion watchdog resetting " | 2361 | IPW_DEBUG_SCAN("Scan completion watchdog resetting " |
2359 | "adapter after (%dms).\n", | 2362 | "adapter after (%dms).\n", |
2360 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); | 2363 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); |
2361 | queue_work(priv->workqueue, &priv->adapter_restart); | 2364 | queue_work(priv->workqueue, &priv->adapter_restart); |
2365 | } else if (priv->status & STATUS_SCANNING) { | ||
2366 | IPW_DEBUG_SCAN("Scan completion watchdog aborting scan " | ||
2367 | "after (%dms).\n", | ||
2368 | jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); | ||
2369 | ipw_abort_scan(priv); | ||
2370 | queue_delayed_work(priv->workqueue, &priv->scan_check, HZ); | ||
2362 | } | 2371 | } |
2363 | } | 2372 | } |
2364 | 2373 | ||
@@ -2598,8 +2607,6 @@ static inline void eeprom_write_reg(struct ipw_priv *p, u32 data) | |||
2598 | 2607 | ||
2599 | /* the eeprom requires some time to complete the operation */ | 2608 | /* the eeprom requires some time to complete the operation */ |
2600 | udelay(p->eeprom_delay); | 2609 | udelay(p->eeprom_delay); |
2601 | |||
2602 | return; | ||
2603 | } | 2610 | } |
2604 | 2611 | ||
2605 | /* perform a chip select operation */ | 2612 | /* perform a chip select operation */ |
@@ -2739,7 +2746,7 @@ static inline void ipw_fw_dma_reset_command_blocks(struct ipw_priv *priv) | |||
2739 | static int ipw_fw_dma_enable(struct ipw_priv *priv) | 2746 | static int ipw_fw_dma_enable(struct ipw_priv *priv) |
2740 | { /* start dma engine but no transfers yet */ | 2747 | { /* start dma engine but no transfers yet */ |
2741 | 2748 | ||
2742 | IPW_DEBUG_FW(">> : \n"); | 2749 | IPW_DEBUG_FW(">> :\n"); |
2743 | 2750 | ||
2744 | /* Start the dma */ | 2751 | /* Start the dma */ |
2745 | ipw_fw_dma_reset_command_blocks(priv); | 2752 | ipw_fw_dma_reset_command_blocks(priv); |
@@ -2747,7 +2754,7 @@ static int ipw_fw_dma_enable(struct ipw_priv *priv) | |||
2747 | /* Write CB base address */ | 2754 | /* Write CB base address */ |
2748 | ipw_write_reg32(priv, IPW_DMA_I_CB_BASE, IPW_SHARED_SRAM_DMA_CONTROL); | 2755 | ipw_write_reg32(priv, IPW_DMA_I_CB_BASE, IPW_SHARED_SRAM_DMA_CONTROL); |
2749 | 2756 | ||
2750 | IPW_DEBUG_FW("<< : \n"); | 2757 | IPW_DEBUG_FW("<< :\n"); |
2751 | return 0; | 2758 | return 0; |
2752 | } | 2759 | } |
2753 | 2760 | ||
@@ -2762,7 +2769,7 @@ static void ipw_fw_dma_abort(struct ipw_priv *priv) | |||
2762 | ipw_write_reg32(priv, IPW_DMA_I_DMA_CONTROL, control); | 2769 | ipw_write_reg32(priv, IPW_DMA_I_DMA_CONTROL, control); |
2763 | priv->sram_desc.last_cb_index = 0; | 2770 | priv->sram_desc.last_cb_index = 0; |
2764 | 2771 | ||
2765 | IPW_DEBUG_FW("<< \n"); | 2772 | IPW_DEBUG_FW("<<\n"); |
2766 | } | 2773 | } |
2767 | 2774 | ||
2768 | static int ipw_fw_dma_write_command_block(struct ipw_priv *priv, int index, | 2775 | static int ipw_fw_dma_write_command_block(struct ipw_priv *priv, int index, |
@@ -2813,29 +2820,29 @@ static void ipw_fw_dma_dump_command_block(struct ipw_priv *priv) | |||
2813 | 2820 | ||
2814 | IPW_DEBUG_FW(">> :\n"); | 2821 | IPW_DEBUG_FW(">> :\n"); |
2815 | address = ipw_read_reg32(priv, IPW_DMA_I_CURRENT_CB); | 2822 | address = ipw_read_reg32(priv, IPW_DMA_I_CURRENT_CB); |
2816 | IPW_DEBUG_FW_INFO("Current CB is 0x%x \n", address); | 2823 | IPW_DEBUG_FW_INFO("Current CB is 0x%x\n", address); |
2817 | 2824 | ||
2818 | /* Read the DMA Controlor register */ | 2825 | /* Read the DMA Controlor register */ |
2819 | register_value = ipw_read_reg32(priv, IPW_DMA_I_DMA_CONTROL); | 2826 | register_value = ipw_read_reg32(priv, IPW_DMA_I_DMA_CONTROL); |
2820 | IPW_DEBUG_FW_INFO("IPW_DMA_I_DMA_CONTROL is 0x%x \n", register_value); | 2827 | IPW_DEBUG_FW_INFO("IPW_DMA_I_DMA_CONTROL is 0x%x\n", register_value); |
2821 | 2828 | ||
2822 | /* Print the CB values */ | 2829 | /* Print the CB values */ |
2823 | cb_fields_address = address; | 2830 | cb_fields_address = address; |
2824 | register_value = ipw_read_reg32(priv, cb_fields_address); | 2831 | register_value = ipw_read_reg32(priv, cb_fields_address); |
2825 | IPW_DEBUG_FW_INFO("Current CB ControlField is 0x%x \n", register_value); | 2832 | IPW_DEBUG_FW_INFO("Current CB Control Field is 0x%x\n", register_value); |
2826 | 2833 | ||
2827 | cb_fields_address += sizeof(u32); | 2834 | cb_fields_address += sizeof(u32); |
2828 | register_value = ipw_read_reg32(priv, cb_fields_address); | 2835 | register_value = ipw_read_reg32(priv, cb_fields_address); |
2829 | IPW_DEBUG_FW_INFO("Current CB Source Field is 0x%x \n", register_value); | 2836 | IPW_DEBUG_FW_INFO("Current CB Source Field is 0x%x\n", register_value); |
2830 | 2837 | ||
2831 | cb_fields_address += sizeof(u32); | 2838 | cb_fields_address += sizeof(u32); |
2832 | register_value = ipw_read_reg32(priv, cb_fields_address); | 2839 | register_value = ipw_read_reg32(priv, cb_fields_address); |
2833 | IPW_DEBUG_FW_INFO("Current CB Destination Field is 0x%x \n", | 2840 | IPW_DEBUG_FW_INFO("Current CB Destination Field is 0x%x\n", |
2834 | register_value); | 2841 | register_value); |
2835 | 2842 | ||
2836 | cb_fields_address += sizeof(u32); | 2843 | cb_fields_address += sizeof(u32); |
2837 | register_value = ipw_read_reg32(priv, cb_fields_address); | 2844 | register_value = ipw_read_reg32(priv, cb_fields_address); |
2838 | IPW_DEBUG_FW_INFO("Current CB Status Field is 0x%x \n", register_value); | 2845 | IPW_DEBUG_FW_INFO("Current CB Status Field is 0x%x\n", register_value); |
2839 | 2846 | ||
2840 | IPW_DEBUG_FW(">> :\n"); | 2847 | IPW_DEBUG_FW(">> :\n"); |
2841 | } | 2848 | } |
@@ -2851,7 +2858,7 @@ static int ipw_fw_dma_command_block_index(struct ipw_priv *priv) | |||
2851 | current_cb_index = (current_cb_address - IPW_SHARED_SRAM_DMA_CONTROL) / | 2858 | current_cb_index = (current_cb_address - IPW_SHARED_SRAM_DMA_CONTROL) / |
2852 | sizeof(struct command_block); | 2859 | sizeof(struct command_block); |
2853 | 2860 | ||
2854 | IPW_DEBUG_FW_INFO("Current CB index 0x%x address = 0x%X \n", | 2861 | IPW_DEBUG_FW_INFO("Current CB index 0x%x address = 0x%X\n", |
2855 | current_cb_index, current_cb_address); | 2862 | current_cb_index, current_cb_address); |
2856 | 2863 | ||
2857 | IPW_DEBUG_FW(">> :\n"); | 2864 | IPW_DEBUG_FW(">> :\n"); |
@@ -2910,7 +2917,7 @@ static int ipw_fw_dma_add_buffer(struct ipw_priv *priv, dma_addr_t *src_address, | |||
2910 | int ret, i; | 2917 | int ret, i; |
2911 | u32 size; | 2918 | u32 size; |
2912 | 2919 | ||
2913 | IPW_DEBUG_FW(">> \n"); | 2920 | IPW_DEBUG_FW(">>\n"); |
2914 | IPW_DEBUG_FW_INFO("nr=%d dest_address=0x%x len=0x%x\n", | 2921 | IPW_DEBUG_FW_INFO("nr=%d dest_address=0x%x len=0x%x\n", |
2915 | nr, dest_address, len); | 2922 | nr, dest_address, len); |
2916 | 2923 | ||
@@ -2927,7 +2934,7 @@ static int ipw_fw_dma_add_buffer(struct ipw_priv *priv, dma_addr_t *src_address, | |||
2927 | IPW_DEBUG_FW_INFO(": Added new cb\n"); | 2934 | IPW_DEBUG_FW_INFO(": Added new cb\n"); |
2928 | } | 2935 | } |
2929 | 2936 | ||
2930 | IPW_DEBUG_FW("<< \n"); | 2937 | IPW_DEBUG_FW("<<\n"); |
2931 | return 0; | 2938 | return 0; |
2932 | } | 2939 | } |
2933 | 2940 | ||
@@ -2936,7 +2943,7 @@ static int ipw_fw_dma_wait(struct ipw_priv *priv) | |||
2936 | u32 current_index = 0, previous_index; | 2943 | u32 current_index = 0, previous_index; |
2937 | u32 watchdog = 0; | 2944 | u32 watchdog = 0; |
2938 | 2945 | ||
2939 | IPW_DEBUG_FW(">> : \n"); | 2946 | IPW_DEBUG_FW(">> :\n"); |
2940 | 2947 | ||
2941 | current_index = ipw_fw_dma_command_block_index(priv); | 2948 | current_index = ipw_fw_dma_command_block_index(priv); |
2942 | IPW_DEBUG_FW_INFO("sram_desc.last_cb_index:0x%08X\n", | 2949 | IPW_DEBUG_FW_INFO("sram_desc.last_cb_index:0x%08X\n", |
@@ -2965,7 +2972,7 @@ static int ipw_fw_dma_wait(struct ipw_priv *priv) | |||
2965 | ipw_set_bit(priv, IPW_RESET_REG, | 2972 | ipw_set_bit(priv, IPW_RESET_REG, |
2966 | IPW_RESET_REG_MASTER_DISABLED | IPW_RESET_REG_STOP_MASTER); | 2973 | IPW_RESET_REG_MASTER_DISABLED | IPW_RESET_REG_STOP_MASTER); |
2967 | 2974 | ||
2968 | IPW_DEBUG_FW("<< dmaWaitSync \n"); | 2975 | IPW_DEBUG_FW("<< dmaWaitSync\n"); |
2969 | return 0; | 2976 | return 0; |
2970 | } | 2977 | } |
2971 | 2978 | ||
@@ -3026,7 +3033,7 @@ static int ipw_stop_master(struct ipw_priv *priv) | |||
3026 | { | 3033 | { |
3027 | int rc; | 3034 | int rc; |
3028 | 3035 | ||
3029 | IPW_DEBUG_TRACE(">> \n"); | 3036 | IPW_DEBUG_TRACE(">>\n"); |
3030 | /* stop master. typical delay - 0 */ | 3037 | /* stop master. typical delay - 0 */ |
3031 | ipw_set_bit(priv, IPW_RESET_REG, IPW_RESET_REG_STOP_MASTER); | 3038 | ipw_set_bit(priv, IPW_RESET_REG, IPW_RESET_REG_STOP_MASTER); |
3032 | 3039 | ||
@@ -3045,7 +3052,7 @@ static int ipw_stop_master(struct ipw_priv *priv) | |||
3045 | 3052 | ||
3046 | static void ipw_arc_release(struct ipw_priv *priv) | 3053 | static void ipw_arc_release(struct ipw_priv *priv) |
3047 | { | 3054 | { |
3048 | IPW_DEBUG_TRACE(">> \n"); | 3055 | IPW_DEBUG_TRACE(">>\n"); |
3049 | mdelay(5); | 3056 | mdelay(5); |
3050 | 3057 | ||
3051 | ipw_clear_bit(priv, IPW_RESET_REG, CBD_RESET_REG_PRINCETON_RESET); | 3058 | ipw_clear_bit(priv, IPW_RESET_REG, CBD_RESET_REG_PRINCETON_RESET); |
@@ -3067,7 +3074,7 @@ static int ipw_load_ucode(struct ipw_priv *priv, u8 * data, size_t len) | |||
3067 | 3074 | ||
3068 | image = (__le16 *) data; | 3075 | image = (__le16 *) data; |
3069 | 3076 | ||
3070 | IPW_DEBUG_TRACE(">> \n"); | 3077 | IPW_DEBUG_TRACE(">>\n"); |
3071 | 3078 | ||
3072 | rc = ipw_stop_master(priv); | 3079 | rc = ipw_stop_master(priv); |
3073 | 3080 | ||
@@ -3181,7 +3188,7 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len) | |||
3181 | void **virts; | 3188 | void **virts; |
3182 | dma_addr_t *phys; | 3189 | dma_addr_t *phys; |
3183 | 3190 | ||
3184 | IPW_DEBUG_TRACE("<< : \n"); | 3191 | IPW_DEBUG_TRACE("<< :\n"); |
3185 | 3192 | ||
3186 | virts = kmalloc(sizeof(void *) * CB_NUMBER_OF_ELEMENTS_SMALL, | 3193 | virts = kmalloc(sizeof(void *) * CB_NUMBER_OF_ELEMENTS_SMALL, |
3187 | GFP_KERNEL); | 3194 | GFP_KERNEL); |
@@ -4482,7 +4489,7 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4482 | case CMAS_ASSOCIATED:{ | 4489 | case CMAS_ASSOCIATED:{ |
4483 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | | 4490 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | |
4484 | IPW_DL_ASSOC, | 4491 | IPW_DL_ASSOC, |
4485 | "associated: '%s' %pM \n", | 4492 | "associated: '%s' %pM\n", |
4486 | print_ssid(ssid, priv->essid, | 4493 | print_ssid(ssid, priv->essid, |
4487 | priv->essid_len), | 4494 | priv->essid_len), |
4488 | priv->bssid); | 4495 | priv->bssid); |
@@ -4563,7 +4570,7 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4563 | IPW_DL_ASSOC, | 4570 | IPW_DL_ASSOC, |
4564 | "deauthenticated: '%s' " | 4571 | "deauthenticated: '%s' " |
4565 | "%pM" | 4572 | "%pM" |
4566 | ": (0x%04X) - %s \n", | 4573 | ": (0x%04X) - %s\n", |
4567 | print_ssid(ssid, | 4574 | print_ssid(ssid, |
4568 | priv-> | 4575 | priv-> |
4569 | essid, | 4576 | essid, |
@@ -4614,7 +4621,7 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4614 | 4621 | ||
4615 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | | 4622 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | |
4616 | IPW_DL_ASSOC, | 4623 | IPW_DL_ASSOC, |
4617 | "disassociated: '%s' %pM \n", | 4624 | "disassociated: '%s' %pM\n", |
4618 | print_ssid(ssid, priv->essid, | 4625 | print_ssid(ssid, priv->essid, |
4619 | priv->essid_len), | 4626 | priv->essid_len), |
4620 | priv->bssid); | 4627 | priv->bssid); |
@@ -4652,7 +4659,7 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4652 | switch (auth->state) { | 4659 | switch (auth->state) { |
4653 | case CMAS_AUTHENTICATED: | 4660 | case CMAS_AUTHENTICATED: |
4654 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, | 4661 | IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, |
4655 | "authenticated: '%s' %pM \n", | 4662 | "authenticated: '%s' %pM\n", |
4656 | print_ssid(ssid, priv->essid, | 4663 | print_ssid(ssid, priv->essid, |
4657 | priv->essid_len), | 4664 | priv->essid_len), |
4658 | priv->bssid); | 4665 | priv->bssid); |
@@ -6925,7 +6932,7 @@ static u8 ipw_qos_current_mode(struct ipw_priv * priv) | |||
6925 | } else { | 6932 | } else { |
6926 | mode = priv->ieee->mode; | 6933 | mode = priv->ieee->mode; |
6927 | } | 6934 | } |
6928 | IPW_DEBUG_QOS("QoS network/card mode %d \n", mode); | 6935 | IPW_DEBUG_QOS("QoS network/card mode %d\n", mode); |
6929 | return mode; | 6936 | return mode; |
6930 | } | 6937 | } |
6931 | 6938 | ||
@@ -6965,7 +6972,7 @@ static int ipw_qos_handle_probe_response(struct ipw_priv *priv, | |||
6965 | &def_parameters_OFDM, size); | 6972 | &def_parameters_OFDM, size); |
6966 | 6973 | ||
6967 | if ((network->qos_data.active == 1) && (active_network == 1)) { | 6974 | if ((network->qos_data.active == 1) && (active_network == 1)) { |
6968 | IPW_DEBUG_QOS("QoS was disabled call qos_activate \n"); | 6975 | IPW_DEBUG_QOS("QoS was disabled call qos_activate\n"); |
6969 | schedule_work(&priv->qos_activate); | 6976 | schedule_work(&priv->qos_activate); |
6970 | } | 6977 | } |
6971 | 6978 | ||
@@ -7542,7 +7549,7 @@ static int ipw_associate_network(struct ipw_priv *priv, | |||
7542 | return err; | 7549 | return err; |
7543 | } | 7550 | } |
7544 | 7551 | ||
7545 | IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %pM \n", | 7552 | IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %pM\n", |
7546 | print_ssid(ssid, priv->essid, priv->essid_len), | 7553 | print_ssid(ssid, priv->essid, priv->essid_len), |
7547 | priv->bssid); | 7554 | priv->bssid); |
7548 | 7555 | ||
@@ -8793,7 +8800,7 @@ static int ipw_wx_set_freq(struct net_device *dev, | |||
8793 | } | 8800 | } |
8794 | } | 8801 | } |
8795 | 8802 | ||
8796 | IPW_DEBUG_WX("SET Freq/Channel -> %d \n", fwrq->m); | 8803 | IPW_DEBUG_WX("SET Freq/Channel -> %d\n", fwrq->m); |
8797 | mutex_lock(&priv->mutex); | 8804 | mutex_lock(&priv->mutex); |
8798 | ret = ipw_set_channel(priv, channel); | 8805 | ret = ipw_set_channel(priv, channel); |
8799 | mutex_unlock(&priv->mutex); | 8806 | mutex_unlock(&priv->mutex); |
@@ -8835,7 +8842,7 @@ static int ipw_wx_get_freq(struct net_device *dev, | |||
8835 | wrqu->freq.m = 0; | 8842 | wrqu->freq.m = 0; |
8836 | 8843 | ||
8837 | mutex_unlock(&priv->mutex); | 8844 | mutex_unlock(&priv->mutex); |
8838 | IPW_DEBUG_WX("GET Freq/Channel -> %d \n", priv->channel); | 8845 | IPW_DEBUG_WX("GET Freq/Channel -> %d\n", priv->channel); |
8839 | return 0; | 8846 | return 0; |
8840 | } | 8847 | } |
8841 | 8848 | ||
@@ -9230,7 +9237,7 @@ static int ipw_wx_get_sens(struct net_device *dev, | |||
9230 | wrqu->sens.value = priv->roaming_threshold; | 9237 | wrqu->sens.value = priv->roaming_threshold; |
9231 | mutex_unlock(&priv->mutex); | 9238 | mutex_unlock(&priv->mutex); |
9232 | 9239 | ||
9233 | IPW_DEBUG_WX("GET roaming threshold -> %s %d \n", | 9240 | IPW_DEBUG_WX("GET roaming threshold -> %s %d\n", |
9234 | wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value); | 9241 | wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value); |
9235 | 9242 | ||
9236 | return 0; | 9243 | return 0; |
@@ -9358,7 +9365,7 @@ static int ipw_wx_get_rate(struct net_device *dev, | |||
9358 | wrqu->bitrate.value = priv->last_rate; | 9365 | wrqu->bitrate.value = priv->last_rate; |
9359 | wrqu->bitrate.fixed = (priv->config & CFG_FIXED_RATE) ? 1 : 0; | 9366 | wrqu->bitrate.fixed = (priv->config & CFG_FIXED_RATE) ? 1 : 0; |
9360 | mutex_unlock(&priv->mutex); | 9367 | mutex_unlock(&priv->mutex); |
9361 | IPW_DEBUG_WX("GET Rate -> %d \n", wrqu->bitrate.value); | 9368 | IPW_DEBUG_WX("GET Rate -> %d\n", wrqu->bitrate.value); |
9362 | return 0; | 9369 | return 0; |
9363 | } | 9370 | } |
9364 | 9371 | ||
@@ -9381,7 +9388,7 @@ static int ipw_wx_set_rts(struct net_device *dev, | |||
9381 | 9388 | ||
9382 | ipw_send_rts_threshold(priv, priv->rts_threshold); | 9389 | ipw_send_rts_threshold(priv, priv->rts_threshold); |
9383 | mutex_unlock(&priv->mutex); | 9390 | mutex_unlock(&priv->mutex); |
9384 | IPW_DEBUG_WX("SET RTS Threshold -> %d \n", priv->rts_threshold); | 9391 | IPW_DEBUG_WX("SET RTS Threshold -> %d\n", priv->rts_threshold); |
9385 | return 0; | 9392 | return 0; |
9386 | } | 9393 | } |
9387 | 9394 | ||
@@ -9395,7 +9402,7 @@ static int ipw_wx_get_rts(struct net_device *dev, | |||
9395 | wrqu->rts.fixed = 0; /* no auto select */ | 9402 | wrqu->rts.fixed = 0; /* no auto select */ |
9396 | wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD); | 9403 | wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD); |
9397 | mutex_unlock(&priv->mutex); | 9404 | mutex_unlock(&priv->mutex); |
9398 | IPW_DEBUG_WX("GET RTS Threshold -> %d \n", wrqu->rts.value); | 9405 | IPW_DEBUG_WX("GET RTS Threshold -> %d\n", wrqu->rts.value); |
9399 | return 0; | 9406 | return 0; |
9400 | } | 9407 | } |
9401 | 9408 | ||
@@ -9445,7 +9452,7 @@ static int ipw_wx_get_txpow(struct net_device *dev, | |||
9445 | wrqu->power.disabled = (priv->status & STATUS_RF_KILL_MASK) ? 1 : 0; | 9452 | wrqu->power.disabled = (priv->status & STATUS_RF_KILL_MASK) ? 1 : 0; |
9446 | mutex_unlock(&priv->mutex); | 9453 | mutex_unlock(&priv->mutex); |
9447 | 9454 | ||
9448 | IPW_DEBUG_WX("GET TX Power -> %s %d \n", | 9455 | IPW_DEBUG_WX("GET TX Power -> %s %d\n", |
9449 | wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value); | 9456 | wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value); |
9450 | 9457 | ||
9451 | return 0; | 9458 | return 0; |
@@ -9471,7 +9478,7 @@ static int ipw_wx_set_frag(struct net_device *dev, | |||
9471 | 9478 | ||
9472 | ipw_send_frag_threshold(priv, wrqu->frag.value); | 9479 | ipw_send_frag_threshold(priv, wrqu->frag.value); |
9473 | mutex_unlock(&priv->mutex); | 9480 | mutex_unlock(&priv->mutex); |
9474 | IPW_DEBUG_WX("SET Frag Threshold -> %d \n", wrqu->frag.value); | 9481 | IPW_DEBUG_WX("SET Frag Threshold -> %d\n", wrqu->frag.value); |
9475 | return 0; | 9482 | return 0; |
9476 | } | 9483 | } |
9477 | 9484 | ||
@@ -9485,7 +9492,7 @@ static int ipw_wx_get_frag(struct net_device *dev, | |||
9485 | wrqu->frag.fixed = 0; /* no auto select */ | 9492 | wrqu->frag.fixed = 0; /* no auto select */ |
9486 | wrqu->frag.disabled = (wrqu->frag.value == DEFAULT_FTS); | 9493 | wrqu->frag.disabled = (wrqu->frag.value == DEFAULT_FTS); |
9487 | mutex_unlock(&priv->mutex); | 9494 | mutex_unlock(&priv->mutex); |
9488 | IPW_DEBUG_WX("GET Frag Threshold -> %d \n", wrqu->frag.value); | 9495 | IPW_DEBUG_WX("GET Frag Threshold -> %d\n", wrqu->frag.value); |
9489 | 9496 | ||
9490 | return 0; | 9497 | return 0; |
9491 | } | 9498 | } |
@@ -9549,7 +9556,7 @@ static int ipw_wx_get_retry(struct net_device *dev, | |||
9549 | } | 9556 | } |
9550 | mutex_unlock(&priv->mutex); | 9557 | mutex_unlock(&priv->mutex); |
9551 | 9558 | ||
9552 | IPW_DEBUG_WX("GET retry -> %d \n", wrqu->retry.value); | 9559 | IPW_DEBUG_WX("GET retry -> %d\n", wrqu->retry.value); |
9553 | 9560 | ||
9554 | return 0; | 9561 | return 0; |
9555 | } | 9562 | } |
@@ -9996,49 +10003,48 @@ static int ipw_wx_sw_reset(struct net_device *dev, | |||
9996 | } | 10003 | } |
9997 | 10004 | ||
9998 | /* Rebase the WE IOCTLs to zero for the handler array */ | 10005 | /* Rebase the WE IOCTLs to zero for the handler array */ |
9999 | #define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT] | ||
10000 | static iw_handler ipw_wx_handlers[] = { | 10006 | static iw_handler ipw_wx_handlers[] = { |
10001 | IW_IOCTL(SIOCGIWNAME) = (iw_handler) cfg80211_wext_giwname, | 10007 | IW_HANDLER(SIOCGIWNAME, (iw_handler)cfg80211_wext_giwname), |
10002 | IW_IOCTL(SIOCSIWFREQ) = ipw_wx_set_freq, | 10008 | IW_HANDLER(SIOCSIWFREQ, ipw_wx_set_freq), |
10003 | IW_IOCTL(SIOCGIWFREQ) = ipw_wx_get_freq, | 10009 | IW_HANDLER(SIOCGIWFREQ, ipw_wx_get_freq), |
10004 | IW_IOCTL(SIOCSIWMODE) = ipw_wx_set_mode, | 10010 | IW_HANDLER(SIOCSIWMODE, ipw_wx_set_mode), |
10005 | IW_IOCTL(SIOCGIWMODE) = ipw_wx_get_mode, | 10011 | IW_HANDLER(SIOCGIWMODE, ipw_wx_get_mode), |
10006 | IW_IOCTL(SIOCSIWSENS) = ipw_wx_set_sens, | 10012 | IW_HANDLER(SIOCSIWSENS, ipw_wx_set_sens), |
10007 | IW_IOCTL(SIOCGIWSENS) = ipw_wx_get_sens, | 10013 | IW_HANDLER(SIOCGIWSENS, ipw_wx_get_sens), |
10008 | IW_IOCTL(SIOCGIWRANGE) = ipw_wx_get_range, | 10014 | IW_HANDLER(SIOCGIWRANGE, ipw_wx_get_range), |
10009 | IW_IOCTL(SIOCSIWAP) = ipw_wx_set_wap, | 10015 | IW_HANDLER(SIOCSIWAP, ipw_wx_set_wap), |
10010 | IW_IOCTL(SIOCGIWAP) = ipw_wx_get_wap, | 10016 | IW_HANDLER(SIOCGIWAP, ipw_wx_get_wap), |
10011 | IW_IOCTL(SIOCSIWSCAN) = ipw_wx_set_scan, | 10017 | IW_HANDLER(SIOCSIWSCAN, ipw_wx_set_scan), |
10012 | IW_IOCTL(SIOCGIWSCAN) = ipw_wx_get_scan, | 10018 | IW_HANDLER(SIOCGIWSCAN, ipw_wx_get_scan), |
10013 | IW_IOCTL(SIOCSIWESSID) = ipw_wx_set_essid, | 10019 | IW_HANDLER(SIOCSIWESSID, ipw_wx_set_essid), |
10014 | IW_IOCTL(SIOCGIWESSID) = ipw_wx_get_essid, | 10020 | IW_HANDLER(SIOCGIWESSID, ipw_wx_get_essid), |
10015 | IW_IOCTL(SIOCSIWNICKN) = ipw_wx_set_nick, | 10021 | IW_HANDLER(SIOCSIWNICKN, ipw_wx_set_nick), |
10016 | IW_IOCTL(SIOCGIWNICKN) = ipw_wx_get_nick, | 10022 | IW_HANDLER(SIOCGIWNICKN, ipw_wx_get_nick), |
10017 | IW_IOCTL(SIOCSIWRATE) = ipw_wx_set_rate, | 10023 | IW_HANDLER(SIOCSIWRATE, ipw_wx_set_rate), |
10018 | IW_IOCTL(SIOCGIWRATE) = ipw_wx_get_rate, | 10024 | IW_HANDLER(SIOCGIWRATE, ipw_wx_get_rate), |
10019 | IW_IOCTL(SIOCSIWRTS) = ipw_wx_set_rts, | 10025 | IW_HANDLER(SIOCSIWRTS, ipw_wx_set_rts), |
10020 | IW_IOCTL(SIOCGIWRTS) = ipw_wx_get_rts, | 10026 | IW_HANDLER(SIOCGIWRTS, ipw_wx_get_rts), |
10021 | IW_IOCTL(SIOCSIWFRAG) = ipw_wx_set_frag, | 10027 | IW_HANDLER(SIOCSIWFRAG, ipw_wx_set_frag), |
10022 | IW_IOCTL(SIOCGIWFRAG) = ipw_wx_get_frag, | 10028 | IW_HANDLER(SIOCGIWFRAG, ipw_wx_get_frag), |
10023 | IW_IOCTL(SIOCSIWTXPOW) = ipw_wx_set_txpow, | 10029 | IW_HANDLER(SIOCSIWTXPOW, ipw_wx_set_txpow), |
10024 | IW_IOCTL(SIOCGIWTXPOW) = ipw_wx_get_txpow, | 10030 | IW_HANDLER(SIOCGIWTXPOW, ipw_wx_get_txpow), |
10025 | IW_IOCTL(SIOCSIWRETRY) = ipw_wx_set_retry, | 10031 | IW_HANDLER(SIOCSIWRETRY, ipw_wx_set_retry), |
10026 | IW_IOCTL(SIOCGIWRETRY) = ipw_wx_get_retry, | 10032 | IW_HANDLER(SIOCGIWRETRY, ipw_wx_get_retry), |
10027 | IW_IOCTL(SIOCSIWENCODE) = ipw_wx_set_encode, | 10033 | IW_HANDLER(SIOCSIWENCODE, ipw_wx_set_encode), |
10028 | IW_IOCTL(SIOCGIWENCODE) = ipw_wx_get_encode, | 10034 | IW_HANDLER(SIOCGIWENCODE, ipw_wx_get_encode), |
10029 | IW_IOCTL(SIOCSIWPOWER) = ipw_wx_set_power, | 10035 | IW_HANDLER(SIOCSIWPOWER, ipw_wx_set_power), |
10030 | IW_IOCTL(SIOCGIWPOWER) = ipw_wx_get_power, | 10036 | IW_HANDLER(SIOCGIWPOWER, ipw_wx_get_power), |
10031 | IW_IOCTL(SIOCSIWSPY) = iw_handler_set_spy, | 10037 | IW_HANDLER(SIOCSIWSPY, iw_handler_set_spy), |
10032 | IW_IOCTL(SIOCGIWSPY) = iw_handler_get_spy, | 10038 | IW_HANDLER(SIOCGIWSPY, iw_handler_get_spy), |
10033 | IW_IOCTL(SIOCSIWTHRSPY) = iw_handler_set_thrspy, | 10039 | IW_HANDLER(SIOCSIWTHRSPY, iw_handler_set_thrspy), |
10034 | IW_IOCTL(SIOCGIWTHRSPY) = iw_handler_get_thrspy, | 10040 | IW_HANDLER(SIOCGIWTHRSPY, iw_handler_get_thrspy), |
10035 | IW_IOCTL(SIOCSIWGENIE) = ipw_wx_set_genie, | 10041 | IW_HANDLER(SIOCSIWGENIE, ipw_wx_set_genie), |
10036 | IW_IOCTL(SIOCGIWGENIE) = ipw_wx_get_genie, | 10042 | IW_HANDLER(SIOCGIWGENIE, ipw_wx_get_genie), |
10037 | IW_IOCTL(SIOCSIWMLME) = ipw_wx_set_mlme, | 10043 | IW_HANDLER(SIOCSIWMLME, ipw_wx_set_mlme), |
10038 | IW_IOCTL(SIOCSIWAUTH) = ipw_wx_set_auth, | 10044 | IW_HANDLER(SIOCSIWAUTH, ipw_wx_set_auth), |
10039 | IW_IOCTL(SIOCGIWAUTH) = ipw_wx_get_auth, | 10045 | IW_HANDLER(SIOCGIWAUTH, ipw_wx_get_auth), |
10040 | IW_IOCTL(SIOCSIWENCODEEXT) = ipw_wx_set_encodeext, | 10046 | IW_HANDLER(SIOCSIWENCODEEXT, ipw_wx_set_encodeext), |
10041 | IW_IOCTL(SIOCGIWENCODEEXT) = ipw_wx_get_encodeext, | 10047 | IW_HANDLER(SIOCGIWENCODEEXT, ipw_wx_get_encodeext), |
10042 | }; | 10048 | }; |
10043 | 10049 | ||
10044 | enum { | 10050 | enum { |
@@ -11667,7 +11673,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11667 | if (priv->prom_net_dev) | 11673 | if (priv->prom_net_dev) |
11668 | return -EPERM; | 11674 | return -EPERM; |
11669 | 11675 | ||
11670 | priv->prom_net_dev = alloc_ieee80211(sizeof(struct ipw_prom_priv), 1); | 11676 | priv->prom_net_dev = alloc_libipw(sizeof(struct ipw_prom_priv), 1); |
11671 | if (priv->prom_net_dev == NULL) | 11677 | if (priv->prom_net_dev == NULL) |
11672 | return -ENOMEM; | 11678 | return -ENOMEM; |
11673 | 11679 | ||
@@ -11686,7 +11692,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11686 | 11692 | ||
11687 | rc = register_netdev(priv->prom_net_dev); | 11693 | rc = register_netdev(priv->prom_net_dev); |
11688 | if (rc) { | 11694 | if (rc) { |
11689 | free_ieee80211(priv->prom_net_dev, 1); | 11695 | free_libipw(priv->prom_net_dev, 1); |
11690 | priv->prom_net_dev = NULL; | 11696 | priv->prom_net_dev = NULL; |
11691 | return rc; | 11697 | return rc; |
11692 | } | 11698 | } |
@@ -11700,7 +11706,7 @@ static void ipw_prom_free(struct ipw_priv *priv) | |||
11700 | return; | 11706 | return; |
11701 | 11707 | ||
11702 | unregister_netdev(priv->prom_net_dev); | 11708 | unregister_netdev(priv->prom_net_dev); |
11703 | free_ieee80211(priv->prom_net_dev, 1); | 11709 | free_libipw(priv->prom_net_dev, 1); |
11704 | 11710 | ||
11705 | priv->prom_net_dev = NULL; | 11711 | priv->prom_net_dev = NULL; |
11706 | } | 11712 | } |
@@ -11728,7 +11734,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11728 | struct ipw_priv *priv; | 11734 | struct ipw_priv *priv; |
11729 | int i; | 11735 | int i; |
11730 | 11736 | ||
11731 | net_dev = alloc_ieee80211(sizeof(struct ipw_priv), 0); | 11737 | net_dev = alloc_libipw(sizeof(struct ipw_priv), 0); |
11732 | if (net_dev == NULL) { | 11738 | if (net_dev == NULL) { |
11733 | err = -ENOMEM; | 11739 | err = -ENOMEM; |
11734 | goto out; | 11740 | goto out; |
@@ -11748,7 +11754,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11748 | mutex_init(&priv->mutex); | 11754 | mutex_init(&priv->mutex); |
11749 | if (pci_enable_device(pdev)) { | 11755 | if (pci_enable_device(pdev)) { |
11750 | err = -ENODEV; | 11756 | err = -ENODEV; |
11751 | goto out_free_ieee80211; | 11757 | goto out_free_libipw; |
11752 | } | 11758 | } |
11753 | 11759 | ||
11754 | pci_set_master(pdev); | 11760 | pci_set_master(pdev); |
@@ -11875,8 +11881,8 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11875 | out_pci_disable_device: | 11881 | out_pci_disable_device: |
11876 | pci_disable_device(pdev); | 11882 | pci_disable_device(pdev); |
11877 | pci_set_drvdata(pdev, NULL); | 11883 | pci_set_drvdata(pdev, NULL); |
11878 | out_free_ieee80211: | 11884 | out_free_libipw: |
11879 | free_ieee80211(priv->net_dev, 0); | 11885 | free_libipw(priv->net_dev, 0); |
11880 | out: | 11886 | out: |
11881 | return err; | 11887 | return err; |
11882 | } | 11888 | } |
@@ -11943,11 +11949,11 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev) | |||
11943 | pci_release_regions(pdev); | 11949 | pci_release_regions(pdev); |
11944 | pci_disable_device(pdev); | 11950 | pci_disable_device(pdev); |
11945 | pci_set_drvdata(pdev, NULL); | 11951 | pci_set_drvdata(pdev, NULL); |
11946 | /* wiphy_unregister needs to be here, before free_ieee80211 */ | 11952 | /* wiphy_unregister needs to be here, before free_libipw */ |
11947 | wiphy_unregister(priv->ieee->wdev.wiphy); | 11953 | wiphy_unregister(priv->ieee->wdev.wiphy); |
11948 | kfree(priv->ieee->a_band.channels); | 11954 | kfree(priv->ieee->a_band.channels); |
11949 | kfree(priv->ieee->bg_band.channels); | 11955 | kfree(priv->ieee->bg_band.channels); |
11950 | free_ieee80211(priv->net_dev, 0); | 11956 | free_libipw(priv->net_dev, 0); |
11951 | free_firmware(); | 11957 | free_firmware(); |
11952 | } | 11958 | } |
11953 | 11959 | ||
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h index a6d5e42647e4..284b0e4cb815 100644 --- a/drivers/net/wireless/ipw2x00/libipw.h +++ b/drivers/net/wireless/ipw2x00/libipw.h | |||
@@ -64,7 +64,7 @@ | |||
64 | extern u32 libipw_debug_level; | 64 | extern u32 libipw_debug_level; |
65 | #define LIBIPW_DEBUG(level, fmt, args...) \ | 65 | #define LIBIPW_DEBUG(level, fmt, args...) \ |
66 | do { if (libipw_debug_level & (level)) \ | 66 | do { if (libipw_debug_level & (level)) \ |
67 | printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ | 67 | printk(KERN_DEBUG "libipw: %c %s " fmt, \ |
68 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) | 68 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) |
69 | static inline bool libipw_ratelimit_debug(u32 level) | 69 | static inline bool libipw_ratelimit_debug(u32 level) |
70 | { | 70 | { |
@@ -116,8 +116,8 @@ static inline bool libipw_ratelimit_debug(u32 level) | |||
116 | #define LIBIPW_DL_RX (1<<9) | 116 | #define LIBIPW_DL_RX (1<<9) |
117 | #define LIBIPW_DL_QOS (1<<31) | 117 | #define LIBIPW_DL_QOS (1<<31) |
118 | 118 | ||
119 | #define LIBIPW_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a) | 119 | #define LIBIPW_ERROR(f, a...) printk(KERN_ERR "libipw: " f, ## a) |
120 | #define LIBIPW_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a) | 120 | #define LIBIPW_WARNING(f, a...) printk(KERN_WARNING "libipw: " f, ## a) |
121 | #define LIBIPW_DEBUG_INFO(f, a...) LIBIPW_DEBUG(LIBIPW_DL_INFO, f, ## a) | 121 | #define LIBIPW_DEBUG_INFO(f, a...) LIBIPW_DEBUG(LIBIPW_DL_INFO, f, ## a) |
122 | 122 | ||
123 | #define LIBIPW_DEBUG_WX(f, a...) LIBIPW_DEBUG(LIBIPW_DL_WX, f, ## a) | 123 | #define LIBIPW_DEBUG_WX(f, a...) LIBIPW_DEBUG(LIBIPW_DL_WX, f, ## a) |
@@ -905,7 +905,7 @@ struct libipw_device { | |||
905 | struct libipw_reassoc_request * req); | 905 | struct libipw_reassoc_request * req); |
906 | 906 | ||
907 | /* This must be the last item so that it points to the data | 907 | /* This must be the last item so that it points to the data |
908 | * allocated beyond this structure by alloc_ieee80211 */ | 908 | * allocated beyond this structure by alloc_libipw */ |
909 | u8 priv[0]; | 909 | u8 priv[0]; |
910 | }; | 910 | }; |
911 | 911 | ||
@@ -1017,9 +1017,9 @@ static inline int libipw_is_cck_rate(u8 rate) | |||
1017 | return 0; | 1017 | return 0; |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | /* ieee80211.c */ | 1020 | /* libipw.c */ |
1021 | extern void free_ieee80211(struct net_device *dev, int monitor); | 1021 | extern void free_libipw(struct net_device *dev, int monitor); |
1022 | extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor); | 1022 | extern struct net_device *alloc_libipw(int sizeof_priv, int monitor); |
1023 | extern int libipw_change_mtu(struct net_device *dev, int new_mtu); | 1023 | extern int libipw_change_mtu(struct net_device *dev, int new_mtu); |
1024 | 1024 | ||
1025 | extern void libipw_networks_age(struct libipw_device *ieee, | 1025 | extern void libipw_networks_age(struct libipw_device *ieee, |
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c index 2fa55867bd8b..55965408ff3f 100644 --- a/drivers/net/wireless/ipw2x00/libipw_module.c +++ b/drivers/net/wireless/ipw2x00/libipw_module.c | |||
@@ -53,7 +53,7 @@ | |||
53 | #include "libipw.h" | 53 | #include "libipw.h" |
54 | 54 | ||
55 | #define DRV_DESCRIPTION "802.11 data/management/control stack" | 55 | #define DRV_DESCRIPTION "802.11 data/management/control stack" |
56 | #define DRV_NAME "ieee80211" | 56 | #define DRV_NAME "libipw" |
57 | #define DRV_VERSION LIBIPW_VERSION | 57 | #define DRV_VERSION LIBIPW_VERSION |
58 | #define DRV_COPYRIGHT "Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>" | 58 | #define DRV_COPYRIGHT "Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>" |
59 | 59 | ||
@@ -140,7 +140,7 @@ int libipw_change_mtu(struct net_device *dev, int new_mtu) | |||
140 | } | 140 | } |
141 | EXPORT_SYMBOL(libipw_change_mtu); | 141 | EXPORT_SYMBOL(libipw_change_mtu); |
142 | 142 | ||
143 | struct net_device *alloc_ieee80211(int sizeof_priv, int monitor) | 143 | struct net_device *alloc_libipw(int sizeof_priv, int monitor) |
144 | { | 144 | { |
145 | struct libipw_device *ieee; | 145 | struct libipw_device *ieee; |
146 | struct net_device *dev; | 146 | struct net_device *dev; |
@@ -222,8 +222,9 @@ failed_free_netdev: | |||
222 | failed: | 222 | failed: |
223 | return NULL; | 223 | return NULL; |
224 | } | 224 | } |
225 | EXPORT_SYMBOL(alloc_libipw); | ||
225 | 226 | ||
226 | void free_ieee80211(struct net_device *dev, int monitor) | 227 | void free_libipw(struct net_device *dev, int monitor) |
227 | { | 228 | { |
228 | struct libipw_device *ieee = netdev_priv(dev); | 229 | struct libipw_device *ieee = netdev_priv(dev); |
229 | 230 | ||
@@ -237,6 +238,7 @@ void free_ieee80211(struct net_device *dev, int monitor) | |||
237 | 238 | ||
238 | free_netdev(dev); | 239 | free_netdev(dev); |
239 | } | 240 | } |
241 | EXPORT_SYMBOL(free_libipw); | ||
240 | 242 | ||
241 | #ifdef CONFIG_LIBIPW_DEBUG | 243 | #ifdef CONFIG_LIBIPW_DEBUG |
242 | 244 | ||
@@ -291,7 +293,7 @@ static int __init libipw_init(void) | |||
291 | struct proc_dir_entry *e; | 293 | struct proc_dir_entry *e; |
292 | 294 | ||
293 | libipw_debug_level = debug; | 295 | libipw_debug_level = debug; |
294 | libipw_proc = proc_mkdir(DRV_NAME, init_net.proc_net); | 296 | libipw_proc = proc_mkdir("ieee80211", init_net.proc_net); |
295 | if (libipw_proc == NULL) { | 297 | if (libipw_proc == NULL) { |
296 | LIBIPW_ERROR("Unable to create " DRV_NAME | 298 | LIBIPW_ERROR("Unable to create " DRV_NAME |
297 | " proc directory\n"); | 299 | " proc directory\n"); |
@@ -331,6 +333,3 @@ MODULE_PARM_DESC(debug, "debug output mask"); | |||
331 | 333 | ||
332 | module_exit(libipw_exit); | 334 | module_exit(libipw_exit); |
333 | module_init(libipw_init); | 335 | module_init(libipw_init); |
334 | |||
335 | EXPORT_SYMBOL(alloc_ieee80211); | ||
336 | EXPORT_SYMBOL(free_ieee80211); | ||
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c index 39a34da52d52..0de1b1893220 100644 --- a/drivers/net/wireless/ipw2x00/libipw_rx.c +++ b/drivers/net/wireless/ipw2x00/libipw_rx.c | |||
@@ -918,7 +918,6 @@ void libipw_rx_any(struct libipw_device *ieee, | |||
918 | drop_free: | 918 | drop_free: |
919 | dev_kfree_skb_irq(skb); | 919 | dev_kfree_skb_irq(skb); |
920 | ieee->dev->stats.rx_dropped++; | 920 | ieee->dev->stats.rx_dropped++; |
921 | return; | ||
922 | } | 921 | } |
923 | 922 | ||
924 | #define MGMT_FRAME_FIXED_PART_LENGTH 0x24 | 923 | #define MGMT_FRAME_FIXED_PART_LENGTH 0x24 |