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/ipw2200.c | |
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/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 190 |
1 files changed, 98 insertions, 92 deletions
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 | ||