diff options
| author | David S. Miller <davem@davemloft.net> | 2012-06-25 18:50:32 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-06-25 18:50:32 -0400 |
| commit | e486463e82e4dca9e8f4413649088b21c9ff87e5 (patch) | |
| tree | 3fb17b54454a101416c2b22e6b4ea5a027b3c02b /drivers/net | |
| parent | ed3b856b69a7f3748d6917e42d462c962aaa39b8 (diff) | |
| parent | fa809e2fd6e317226c046202a88520962672eac0 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
net/batman-adv/translation-table.c
net/ipv6/route.c
qmi_wwan.c resolution provided by Bjørn Mork.
batman-adv conflict is dealing merely with the changes
of global function names to have a proper subsystem
prefix.
ipv6's route.c conflict is merely two side-by-side additions
of network namespace methods.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
26 files changed, 219 insertions, 159 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c index ad284baafe87..3cea38d37344 100644 --- a/drivers/net/bonding/bond_procfs.c +++ b/drivers/net/bonding/bond_procfs.c | |||
| @@ -150,14 +150,25 @@ static void bond_info_show_master(struct seq_file *seq) | |||
| 150 | } | 150 | } |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | static const char *bond_slave_link_status(s8 link) | ||
| 154 | { | ||
| 155 | static const char * const status[] = { | ||
| 156 | [BOND_LINK_UP] = "up", | ||
| 157 | [BOND_LINK_FAIL] = "going down", | ||
| 158 | [BOND_LINK_DOWN] = "down", | ||
| 159 | [BOND_LINK_BACK] = "going back", | ||
| 160 | }; | ||
| 161 | |||
| 162 | return status[link]; | ||
| 163 | } | ||
| 164 | |||
| 153 | static void bond_info_show_slave(struct seq_file *seq, | 165 | static void bond_info_show_slave(struct seq_file *seq, |
| 154 | const struct slave *slave) | 166 | const struct slave *slave) |
| 155 | { | 167 | { |
| 156 | struct bonding *bond = seq->private; | 168 | struct bonding *bond = seq->private; |
| 157 | 169 | ||
| 158 | seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); | 170 | seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); |
| 159 | seq_printf(seq, "MII Status: %s\n", | 171 | seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link)); |
| 160 | (slave->link == BOND_LINK_UP) ? "up" : "down"); | ||
| 161 | if (slave->speed == SPEED_UNKNOWN) | 172 | if (slave->speed == SPEED_UNKNOWN) |
| 162 | seq_printf(seq, "Speed: %s\n", "Unknown"); | 173 | seq_printf(seq, "Speed: %s\n", "Unknown"); |
| 163 | else | 174 | else |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 3e662bf7e5d8..e04b282c039d 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #define I2C_BSC0 0 | 40 | #define I2C_BSC0 0 |
| 41 | #define I2C_BSC1 1 | 41 | #define I2C_BSC1 1 |
| 42 | #define I2C_WA_RETRY_CNT 3 | 42 | #define I2C_WA_RETRY_CNT 3 |
| 43 | #define I2C_WA_PWR_ITER (I2C_WA_RETRY_CNT - 1) | ||
| 43 | #define MCPR_IMC_COMMAND_READ_OP 1 | 44 | #define MCPR_IMC_COMMAND_READ_OP 1 |
| 44 | #define MCPR_IMC_COMMAND_WRITE_OP 2 | 45 | #define MCPR_IMC_COMMAND_WRITE_OP 2 |
| 45 | 46 | ||
| @@ -7754,6 +7755,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy, | |||
| 7754 | return -EINVAL; | 7755 | return -EINVAL; |
| 7755 | } | 7756 | } |
| 7756 | 7757 | ||
| 7758 | static void bnx2x_warpcore_power_module(struct link_params *params, | ||
| 7759 | struct bnx2x_phy *phy, | ||
| 7760 | u8 power) | ||
| 7761 | { | ||
| 7762 | u32 pin_cfg; | ||
| 7763 | struct bnx2x *bp = params->bp; | ||
| 7764 | |||
| 7765 | pin_cfg = (REG_RD(bp, params->shmem_base + | ||
| 7766 | offsetof(struct shmem_region, | ||
| 7767 | dev_info.port_hw_config[params->port].e3_sfp_ctrl)) & | ||
| 7768 | PORT_HW_CFG_E3_PWR_DIS_MASK) >> | ||
| 7769 | PORT_HW_CFG_E3_PWR_DIS_SHIFT; | ||
| 7770 | |||
| 7771 | if (pin_cfg == PIN_CFG_NA) | ||
| 7772 | return; | ||
| 7773 | DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n", | ||
| 7774 | power, pin_cfg); | ||
| 7775 | /* Low ==> corresponding SFP+ module is powered | ||
| 7776 | * high ==> the SFP+ module is powered down | ||
| 7777 | */ | ||
| 7778 | bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1); | ||
| 7779 | } | ||
| 7757 | static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, | 7780 | static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, |
| 7758 | struct link_params *params, | 7781 | struct link_params *params, |
| 7759 | u16 addr, u8 byte_cnt, | 7782 | u16 addr, u8 byte_cnt, |
| @@ -7774,6 +7797,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, | |||
| 7774 | /* 4 byte aligned address */ | 7797 | /* 4 byte aligned address */ |
| 7775 | addr32 = addr & (~0x3); | 7798 | addr32 = addr & (~0x3); |
| 7776 | do { | 7799 | do { |
| 7800 | if (cnt == I2C_WA_PWR_ITER) { | ||
| 7801 | bnx2x_warpcore_power_module(params, phy, 0); | ||
| 7802 | /* Note that 100us are not enough here */ | ||
| 7803 | usleep_range(1000,1000); | ||
| 7804 | bnx2x_warpcore_power_module(params, phy, 1); | ||
| 7805 | } | ||
| 7777 | rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt, | 7806 | rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt, |
| 7778 | data_array); | 7807 | data_array); |
| 7779 | } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT)); | 7808 | } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT)); |
| @@ -8312,29 +8341,6 @@ static void bnx2x_set_sfp_module_fault_led(struct link_params *params, | |||
| 8312 | bnx2x_set_e1e2_module_fault_led(params, gpio_mode); | 8341 | bnx2x_set_e1e2_module_fault_led(params, gpio_mode); |
| 8313 | } | 8342 | } |
| 8314 | 8343 | ||
| 8315 | static void bnx2x_warpcore_power_module(struct link_params *params, | ||
| 8316 | struct bnx2x_phy *phy, | ||
| 8317 | u8 power) | ||
| 8318 | { | ||
| 8319 | u32 pin_cfg; | ||
| 8320 | struct bnx2x *bp = params->bp; | ||
| 8321 | |||
| 8322 | pin_cfg = (REG_RD(bp, params->shmem_base + | ||
| 8323 | offsetof(struct shmem_region, | ||
| 8324 | dev_info.port_hw_config[params->port].e3_sfp_ctrl)) & | ||
| 8325 | PORT_HW_CFG_E3_PWR_DIS_MASK) >> | ||
| 8326 | PORT_HW_CFG_E3_PWR_DIS_SHIFT; | ||
| 8327 | |||
| 8328 | if (pin_cfg == PIN_CFG_NA) | ||
| 8329 | return; | ||
| 8330 | DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n", | ||
| 8331 | power, pin_cfg); | ||
| 8332 | /* Low ==> corresponding SFP+ module is powered | ||
| 8333 | * high ==> the SFP+ module is powered down | ||
| 8334 | */ | ||
| 8335 | bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1); | ||
| 8336 | } | ||
| 8337 | |||
| 8338 | static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, | 8344 | static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, |
| 8339 | struct link_params *params) | 8345 | struct link_params *params) |
| 8340 | { | 8346 | { |
| @@ -9980,7 +9986,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy, | |||
| 9980 | 9986 | ||
| 9981 | usleep_range(1000, 2000); | 9987 | usleep_range(1000, 2000); |
| 9982 | 9988 | ||
| 9983 | if (!(CHIP_IS_E1(bp))) | 9989 | if (!(CHIP_IS_E1x(bp))) |
| 9984 | port = BP_PATH(bp); | 9990 | port = BP_PATH(bp); |
| 9985 | else | 9991 | else |
| 9986 | port = params->port; | 9992 | port = params->port; |
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index f8997521b147..5eab791b7162 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
| @@ -122,15 +122,15 @@ static int be_mcc_compl_process(struct be_adapter *adapter, | |||
| 122 | goto done; | 122 | goto done; |
| 123 | 123 | ||
| 124 | if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) { | 124 | if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) { |
| 125 | dev_warn(&adapter->pdev->dev, "This domain(VM) is not " | 125 | dev_warn(&adapter->pdev->dev, |
| 126 | "permitted to execute this cmd (opcode %d)\n", | 126 | "opcode %d-%d is not permitted\n", |
| 127 | opcode); | 127 | opcode, subsystem); |
| 128 | } else { | 128 | } else { |
| 129 | extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & | 129 | extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & |
| 130 | CQE_STATUS_EXTD_MASK; | 130 | CQE_STATUS_EXTD_MASK; |
| 131 | dev_err(&adapter->pdev->dev, "Cmd (opcode %d) failed:" | 131 | dev_err(&adapter->pdev->dev, |
| 132 | "status %d, extd-status %d\n", | 132 | "opcode %d-%d failed:status %d-%d\n", |
| 133 | opcode, compl_status, extd_status); | 133 | opcode, subsystem, compl_status, extd_status); |
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | done: | 136 | done: |
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h index 2f6bb06df9c6..3c938f55c00b 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.h +++ b/drivers/net/ethernet/emulex/benet/be_cmds.h | |||
| @@ -1566,7 +1566,7 @@ struct be_hw_stats_v1 { | |||
| 1566 | u32 rsvd0[BE_TXP_SW_SZ]; | 1566 | u32 rsvd0[BE_TXP_SW_SZ]; |
| 1567 | struct be_erx_stats_v1 erx; | 1567 | struct be_erx_stats_v1 erx; |
| 1568 | struct be_pmem_stats pmem; | 1568 | struct be_pmem_stats pmem; |
| 1569 | u32 rsvd1[3]; | 1569 | u32 rsvd1[18]; |
| 1570 | }; | 1570 | }; |
| 1571 | 1571 | ||
| 1572 | struct be_cmd_req_get_stats_v1 { | 1572 | struct be_cmd_req_get_stats_v1 { |
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 5a34503b6a14..cbd245afd8ab 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
| @@ -3242,7 +3242,7 @@ static void be_netdev_init(struct net_device *netdev) | |||
| 3242 | 3242 | ||
| 3243 | netdev->flags |= IFF_MULTICAST; | 3243 | netdev->flags |= IFF_MULTICAST; |
| 3244 | 3244 | ||
| 3245 | netif_set_gso_max_size(netdev, 65535); | 3245 | netif_set_gso_max_size(netdev, 65535 - ETH_HLEN); |
| 3246 | 3246 | ||
| 3247 | netdev->netdev_ops = &be_netdev_ops; | 3247 | netdev->netdev_ops = &be_netdev_ops; |
| 3248 | 3248 | ||
diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 79b07ec6726f..0cafe4fe9406 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig | |||
| @@ -122,8 +122,10 @@ config IGB_DCA | |||
| 122 | 122 | ||
| 123 | config IGB_PTP | 123 | config IGB_PTP |
| 124 | bool "PTP Hardware Clock (PHC)" | 124 | bool "PTP Hardware Clock (PHC)" |
| 125 | default y | 125 | default n |
| 126 | depends on IGB && PTP_1588_CLOCK | 126 | depends on IGB && EXPERIMENTAL |
| 127 | select PPS | ||
| 128 | select PTP_1588_CLOCK | ||
| 127 | ---help--- | 129 | ---help--- |
| 128 | Say Y here if you want to use PTP Hardware Clock (PHC) in the | 130 | Say Y here if you want to use PTP Hardware Clock (PHC) in the |
| 129 | driver. Only the basic clock operations have been implemented. | 131 | driver. Only the basic clock operations have been implemented. |
| @@ -223,7 +225,9 @@ config IXGBE_DCB | |||
| 223 | config IXGBE_PTP | 225 | config IXGBE_PTP |
| 224 | bool "PTP Clock Support" | 226 | bool "PTP Clock Support" |
| 225 | default n | 227 | default n |
| 226 | depends on IXGBE && PTP_1588_CLOCK | 228 | depends on IXGBE && EXPERIMENTAL |
| 229 | select PPS | ||
| 230 | select PTP_1588_CLOCK | ||
| 227 | ---help--- | 231 | ---help--- |
| 228 | Say Y here if you want support for 1588 Timestamping with a | 232 | Say Y here if you want support for 1588 Timestamping with a |
| 229 | PHC device, using the PTP 1588 Clock support. This is | 233 | PHC device, using the PTP 1588 Clock support. This is |
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index e65083958421..5e84eaac48c1 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c | |||
| @@ -206,8 +206,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) | |||
| 206 | mac->rar_entry_count = E1000_RAR_ENTRIES_82580; | 206 | mac->rar_entry_count = E1000_RAR_ENTRIES_82580; |
| 207 | break; | 207 | break; |
| 208 | case e1000_i350: | 208 | case e1000_i350: |
| 209 | case e1000_i210: | ||
| 210 | case e1000_i211: | ||
| 211 | mac->rar_entry_count = E1000_RAR_ENTRIES_I350; | 209 | mac->rar_entry_count = E1000_RAR_ENTRIES_I350; |
| 212 | break; | 210 | break; |
| 213 | default: | 211 | default: |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 69a660b5621a..21e083c3fe35 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
| @@ -1146,7 +1146,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring, | |||
| 1146 | 1146 | ||
| 1147 | /* alloc new page for storage */ | 1147 | /* alloc new page for storage */ |
| 1148 | if (likely(!page)) { | 1148 | if (likely(!page)) { |
| 1149 | page = alloc_pages(GFP_ATOMIC | __GFP_COLD, | 1149 | page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP, |
| 1150 | ixgbe_rx_pg_order(rx_ring)); | 1150 | ixgbe_rx_pg_order(rx_ring)); |
| 1151 | if (unlikely(!page)) { | 1151 | if (unlikely(!page)) { |
| 1152 | rx_ring->rx_stats.alloc_rx_page_failed++; | 1152 | rx_ring->rx_stats.alloc_rx_page_failed++; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c index cb7d1b2982c5..daddd844691f 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | |||
| @@ -787,6 +787,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) | |||
| 787 | { | 787 | { |
| 788 | struct ixgbe_hw *hw = &adapter->hw; | 788 | struct ixgbe_hw *hw = &adapter->hw; |
| 789 | u32 incval = 0; | 789 | u32 incval = 0; |
| 790 | u32 timinca = 0; | ||
| 790 | u32 shift = 0; | 791 | u32 shift = 0; |
| 791 | u32 cycle_speed; | 792 | u32 cycle_speed; |
| 792 | unsigned long flags; | 793 | unsigned long flags; |
| @@ -809,8 +810,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) | |||
| 809 | break; | 810 | break; |
| 810 | } | 811 | } |
| 811 | 812 | ||
| 812 | /* Bail if the cycle speed didn't change */ | 813 | /* |
| 813 | if (adapter->cycle_speed == cycle_speed) | 814 | * grab the current TIMINCA value from the register so that it can be |
| 815 | * double checked. If the register value has been cleared, it must be | ||
| 816 | * reset to the correct value for generating a cyclecounter. If | ||
| 817 | * TIMINCA is zero, the SYSTIME registers do not increment at all. | ||
| 818 | */ | ||
| 819 | timinca = IXGBE_READ_REG(hw, IXGBE_TIMINCA); | ||
| 820 | |||
| 821 | /* Bail if the cycle speed didn't change and TIMINCA is non-zero */ | ||
| 822 | if (adapter->cycle_speed == cycle_speed && timinca) | ||
| 814 | return; | 823 | return; |
| 815 | 824 | ||
| 816 | /* disable the SDP clock out */ | 825 | /* disable the SDP clock out */ |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 7260aa79466a..d7a04e091101 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
| @@ -3894,6 +3894,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp) | |||
| 3894 | case RTL_GIGA_MAC_VER_22: | 3894 | case RTL_GIGA_MAC_VER_22: |
| 3895 | case RTL_GIGA_MAC_VER_23: | 3895 | case RTL_GIGA_MAC_VER_23: |
| 3896 | case RTL_GIGA_MAC_VER_24: | 3896 | case RTL_GIGA_MAC_VER_24: |
| 3897 | case RTL_GIGA_MAC_VER_34: | ||
| 3897 | RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); | 3898 | RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); |
| 3898 | break; | 3899 | break; |
| 3899 | default: | 3900 | default: |
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 667169b82526..79bf09b41971 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
| @@ -1011,7 +1011,7 @@ static int sh_eth_txfree(struct net_device *ndev) | |||
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | /* Packet receive function */ | 1013 | /* Packet receive function */ |
| 1014 | static int sh_eth_rx(struct net_device *ndev) | 1014 | static int sh_eth_rx(struct net_device *ndev, u32 intr_status) |
| 1015 | { | 1015 | { |
| 1016 | struct sh_eth_private *mdp = netdev_priv(ndev); | 1016 | struct sh_eth_private *mdp = netdev_priv(ndev); |
| 1017 | struct sh_eth_rxdesc *rxdesc; | 1017 | struct sh_eth_rxdesc *rxdesc; |
| @@ -1102,9 +1102,11 @@ static int sh_eth_rx(struct net_device *ndev) | |||
| 1102 | /* Restart Rx engine if stopped. */ | 1102 | /* Restart Rx engine if stopped. */ |
| 1103 | /* If we don't need to check status, don't. -KDU */ | 1103 | /* If we don't need to check status, don't. -KDU */ |
| 1104 | if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) { | 1104 | if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) { |
| 1105 | /* fix the values for the next receiving */ | 1105 | /* fix the values for the next receiving if RDE is set */ |
| 1106 | mdp->cur_rx = mdp->dirty_rx = (sh_eth_read(ndev, RDFAR) - | 1106 | if (intr_status & EESR_RDE) |
| 1107 | sh_eth_read(ndev, RDLAR)) >> 4; | 1107 | mdp->cur_rx = mdp->dirty_rx = |
| 1108 | (sh_eth_read(ndev, RDFAR) - | ||
| 1109 | sh_eth_read(ndev, RDLAR)) >> 4; | ||
| 1108 | sh_eth_write(ndev, EDRRR_R, EDRRR); | 1110 | sh_eth_write(ndev, EDRRR_R, EDRRR); |
| 1109 | } | 1111 | } |
| 1110 | 1112 | ||
| @@ -1273,7 +1275,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
| 1273 | EESR_RTSF | /* short frame recv */ | 1275 | EESR_RTSF | /* short frame recv */ |
| 1274 | EESR_PRE | /* PHY-LSI recv error */ | 1276 | EESR_PRE | /* PHY-LSI recv error */ |
| 1275 | EESR_CERF)){ /* recv frame CRC error */ | 1277 | EESR_CERF)){ /* recv frame CRC error */ |
| 1276 | sh_eth_rx(ndev); | 1278 | sh_eth_rx(ndev, intr_status); |
| 1277 | } | 1279 | } |
| 1278 | 1280 | ||
| 1279 | /* Tx Check */ | 1281 | /* Tx Check */ |
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 590f902deb6b..9d6c80c8a0cf 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c | |||
| @@ -161,7 +161,7 @@ static struct phy_driver ks8051_driver = { | |||
| 161 | static struct phy_driver ks8001_driver = { | 161 | static struct phy_driver ks8001_driver = { |
| 162 | .phy_id = PHY_ID_KS8001, | 162 | .phy_id = PHY_ID_KS8001, |
| 163 | .name = "Micrel KS8001 or KS8721", | 163 | .name = "Micrel KS8001 or KS8721", |
| 164 | .phy_id_mask = 0x00fffff0, | 164 | .phy_id_mask = 0x00ffffff, |
| 165 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), | 165 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), |
| 166 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, | 166 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, |
| 167 | .config_init = kszphy_config_init, | 167 | .config_init = kszphy_config_init, |
| @@ -174,7 +174,7 @@ static struct phy_driver ks8001_driver = { | |||
| 174 | 174 | ||
| 175 | static struct phy_driver ksz9021_driver = { | 175 | static struct phy_driver ksz9021_driver = { |
| 176 | .phy_id = PHY_ID_KSZ9021, | 176 | .phy_id = PHY_ID_KSZ9021, |
| 177 | .phy_id_mask = 0x000fff10, | 177 | .phy_id_mask = 0x000ffffe, |
| 178 | .name = "Micrel KSZ9021 Gigabit PHY", | 178 | .name = "Micrel KSZ9021 Gigabit PHY", |
| 179 | .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause | 179 | .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause |
| 180 | | SUPPORTED_Asym_Pause), | 180 | | SUPPORTED_Asym_Pause), |
| @@ -240,8 +240,8 @@ MODULE_AUTHOR("David J. Choi"); | |||
| 240 | MODULE_LICENSE("GPL"); | 240 | MODULE_LICENSE("GPL"); |
| 241 | 241 | ||
| 242 | static struct mdio_device_id __maybe_unused micrel_tbl[] = { | 242 | static struct mdio_device_id __maybe_unused micrel_tbl[] = { |
| 243 | { PHY_ID_KSZ9021, 0x000fff10 }, | 243 | { PHY_ID_KSZ9021, 0x000ffffe }, |
| 244 | { PHY_ID_KS8001, 0x00fffff0 }, | 244 | { PHY_ID_KS8001, 0x00ffffff }, |
| 245 | { PHY_ID_KS8737, 0x00fffff0 }, | 245 | { PHY_ID_KS8737, 0x00fffff0 }, |
| 246 | { PHY_ID_KS8041, 0x00fffff0 }, | 246 | { PHY_ID_KS8041, 0x00fffff0 }, |
| 247 | { PHY_ID_KS8051, 0x00fffff0 }, | 247 | { PHY_ID_KS8051, 0x00fffff0 }, |
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index f1e779135899..68ca6769210f 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
| @@ -269,29 +269,6 @@ err: | |||
| 269 | return rv; | 269 | return rv; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | /* Gobi devices uses identical class/protocol codes for all interfaces regardless | ||
| 273 | * of function. Some of these are CDC ACM like and have the exact same endpoints | ||
| 274 | * we are looking for. This leaves two possible strategies for identifying the | ||
| 275 | * correct interface: | ||
| 276 | * a) hardcoding interface number, or | ||
| 277 | * b) use the fact that the wwan interface is the only one lacking additional | ||
| 278 | * (CDC functional) descriptors | ||
| 279 | * | ||
| 280 | * Let's see if we can get away with the generic b) solution. | ||
| 281 | */ | ||
| 282 | static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf) | ||
| 283 | { | ||
| 284 | int rv = -EINVAL; | ||
| 285 | |||
| 286 | /* ignore any interface with additional descriptors */ | ||
| 287 | if (intf->cur_altsetting->extralen) | ||
| 288 | goto err; | ||
| 289 | |||
| 290 | rv = qmi_wwan_bind_shared(dev, intf); | ||
| 291 | err: | ||
| 292 | return rv; | ||
| 293 | } | ||
| 294 | |||
| 295 | static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf) | 272 | static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf) |
| 296 | { | 273 | { |
| 297 | struct qmi_wwan_state *info = (void *)&dev->data; | 274 | struct qmi_wwan_state *info = (void *)&dev->data; |
| @@ -375,15 +352,15 @@ static const struct driver_info qmi_wwan_shared = { | |||
| 375 | .manage_power = qmi_wwan_manage_power, | 352 | .manage_power = qmi_wwan_manage_power, |
| 376 | }; | 353 | }; |
| 377 | 354 | ||
| 378 | static const struct driver_info qmi_wwan_gobi = { | 355 | static const struct driver_info qmi_wwan_force_int0 = { |
| 379 | .description = "Qualcomm Gobi wwan/QMI device", | 356 | .description = "Qualcomm WWAN/QMI device", |
| 380 | .flags = FLAG_WWAN, | 357 | .flags = FLAG_WWAN, |
| 381 | .bind = qmi_wwan_bind_gobi, | 358 | .bind = qmi_wwan_bind_shared, |
| 382 | .unbind = qmi_wwan_unbind, | 359 | .unbind = qmi_wwan_unbind, |
| 383 | .manage_power = qmi_wwan_manage_power, | 360 | .manage_power = qmi_wwan_manage_power, |
| 361 | .data = BIT(0), /* interface whitelist bitmap */ | ||
| 384 | }; | 362 | }; |
| 385 | 363 | ||
| 386 | /* ZTE suck at making USB descriptors */ | ||
| 387 | static const struct driver_info qmi_wwan_force_int1 = { | 364 | static const struct driver_info qmi_wwan_force_int1 = { |
| 388 | .description = "Qualcomm WWAN/QMI device", | 365 | .description = "Qualcomm WWAN/QMI device", |
| 389 | .flags = FLAG_WWAN, | 366 | .flags = FLAG_WWAN, |
| @@ -393,6 +370,15 @@ static const struct driver_info qmi_wwan_force_int1 = { | |||
| 393 | .data = BIT(1), /* interface whitelist bitmap */ | 370 | .data = BIT(1), /* interface whitelist bitmap */ |
| 394 | }; | 371 | }; |
| 395 | 372 | ||
| 373 | static const struct driver_info qmi_wwan_force_int3 = { | ||
| 374 | .description = "Qualcomm WWAN/QMI device", | ||
| 375 | .flags = FLAG_WWAN, | ||
| 376 | .bind = qmi_wwan_bind_shared, | ||
| 377 | .unbind = qmi_wwan_unbind, | ||
| 378 | .manage_power = qmi_wwan_manage_power, | ||
| 379 | .data = BIT(3), /* interface whitelist bitmap */ | ||
| 380 | }; | ||
| 381 | |||
| 396 | static const struct driver_info qmi_wwan_force_int4 = { | 382 | static const struct driver_info qmi_wwan_force_int4 = { |
| 397 | .description = "Qualcomm WWAN/QMI device", | 383 | .description = "Qualcomm WWAN/QMI device", |
| 398 | .flags = FLAG_WWAN, | 384 | .flags = FLAG_WWAN, |
| @@ -418,16 +404,23 @@ static const struct driver_info qmi_wwan_force_int4 = { | |||
| 418 | static const struct driver_info qmi_wwan_sierra = { | 404 | static const struct driver_info qmi_wwan_sierra = { |
| 419 | .description = "Sierra Wireless wwan/QMI device", | 405 | .description = "Sierra Wireless wwan/QMI device", |
| 420 | .flags = FLAG_WWAN, | 406 | .flags = FLAG_WWAN, |
| 421 | .bind = qmi_wwan_bind_gobi, | 407 | .bind = qmi_wwan_bind_shared, |
| 422 | .unbind = qmi_wwan_unbind, | 408 | .unbind = qmi_wwan_unbind, |
| 423 | .manage_power = qmi_wwan_manage_power, | 409 | .manage_power = qmi_wwan_manage_power, |
| 424 | .data = BIT(8) | BIT(19), /* interface whitelist bitmap */ | 410 | .data = BIT(8) | BIT(19), /* interface whitelist bitmap */ |
| 425 | }; | 411 | }; |
| 426 | 412 | ||
| 427 | #define HUAWEI_VENDOR_ID 0x12D1 | 413 | #define HUAWEI_VENDOR_ID 0x12D1 |
| 414 | |||
| 415 | /* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */ | ||
| 416 | #define QMI_GOBI1K_DEVICE(vend, prod) \ | ||
| 417 | USB_DEVICE(vend, prod), \ | ||
| 418 | .driver_info = (unsigned long)&qmi_wwan_force_int3 | ||
| 419 | |||
| 420 | /* Gobi 2000 and Gobi 3000 QMI/wwan interface number is 0 according to qcserial */ | ||
| 428 | #define QMI_GOBI_DEVICE(vend, prod) \ | 421 | #define QMI_GOBI_DEVICE(vend, prod) \ |
| 429 | USB_DEVICE(vend, prod), \ | 422 | USB_DEVICE(vend, prod), \ |
| 430 | .driver_info = (unsigned long)&qmi_wwan_gobi | 423 | .driver_info = (unsigned long)&qmi_wwan_force_int0 |
| 431 | 424 | ||
| 432 | static const struct usb_device_id products[] = { | 425 | static const struct usb_device_id products[] = { |
| 433 | { /* Huawei E392, E398 and possibly others sharing both device id and more... */ | 426 | { /* Huawei E392, E398 and possibly others sharing both device id and more... */ |
| @@ -538,20 +531,24 @@ static const struct usb_device_id products[] = { | |||
| 538 | .bInterfaceProtocol = 0xff, | 531 | .bInterfaceProtocol = 0xff, |
| 539 | .driver_info = (unsigned long)&qmi_wwan_sierra, | 532 | .driver_info = (unsigned long)&qmi_wwan_sierra, |
| 540 | }, | 533 | }, |
| 541 | {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ | 534 | |
| 542 | {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ | 535 | /* Gobi 1000 devices */ |
| 543 | {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ | 536 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ |
| 544 | {QMI_GOBI_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ | 537 | {QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ |
| 545 | {QMI_GOBI_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ | 538 | {QMI_GOBI1K_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ |
| 546 | {QMI_GOBI_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ | 539 | {QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ |
| 547 | {QMI_GOBI_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ | 540 | {QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ |
| 548 | {QMI_GOBI_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ | 541 | {QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ |
| 549 | {QMI_GOBI_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ | 542 | {QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ |
| 550 | {QMI_GOBI_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ | 543 | {QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ |
| 551 | {QMI_GOBI_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ | 544 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ |
| 552 | {QMI_GOBI_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ | 545 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ |
| 553 | {QMI_GOBI_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ | 546 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ |
| 554 | {QMI_GOBI_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */ | 547 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ |
| 548 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ | ||
| 549 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */ | ||
| 550 | |||
| 551 | /* Gobi 2000 and 3000 devices */ | ||
| 555 | {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ | 552 | {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ |
| 556 | {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ | 553 | {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ |
| 557 | {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ | 554 | {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index ac2e4936b421..e92c057f794a 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
| @@ -793,11 +793,13 @@ int usbnet_open (struct net_device *net) | |||
| 793 | if (info->manage_power) { | 793 | if (info->manage_power) { |
| 794 | retval = info->manage_power(dev, 1); | 794 | retval = info->manage_power(dev, 1); |
| 795 | if (retval < 0) | 795 | if (retval < 0) |
| 796 | goto done; | 796 | goto done_manage_power_error; |
| 797 | usb_autopm_put_interface(dev->intf); | 797 | usb_autopm_put_interface(dev->intf); |
| 798 | } | 798 | } |
| 799 | return retval; | 799 | return retval; |
| 800 | 800 | ||
| 801 | done_manage_power_error: | ||
| 802 | clear_bit(EVENT_DEV_OPEN, &dev->flags); | ||
| 801 | done: | 803 | done: |
| 802 | usb_autopm_put_interface(dev->intf); | 804 | usb_autopm_put_interface(dev->intf); |
| 803 | done_nopm: | 805 | done_nopm: |
| @@ -873,9 +875,9 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) | |||
| 873 | { | 875 | { |
| 874 | struct usbnet *dev = netdev_priv(net); | 876 | struct usbnet *dev = netdev_priv(net); |
| 875 | 877 | ||
| 876 | strncpy (info->driver, dev->driver_name, sizeof info->driver); | 878 | strlcpy (info->driver, dev->driver_name, sizeof info->driver); |
| 877 | strncpy (info->version, DRIVER_VERSION, sizeof info->version); | 879 | strlcpy (info->version, DRIVER_VERSION, sizeof info->version); |
| 878 | strncpy (info->fw_version, dev->driver_info->description, | 880 | strlcpy (info->fw_version, dev->driver_info->description, |
| 879 | sizeof info->fw_version); | 881 | sizeof info->fw_version); |
| 880 | usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info); | 882 | usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info); |
| 881 | } | 883 | } |
| @@ -1199,6 +1201,21 @@ deferred: | |||
| 1199 | } | 1201 | } |
| 1200 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); | 1202 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); |
| 1201 | 1203 | ||
| 1204 | static void rx_alloc_submit(struct usbnet *dev, gfp_t flags) | ||
| 1205 | { | ||
| 1206 | struct urb *urb; | ||
| 1207 | int i; | ||
| 1208 | |||
| 1209 | /* don't refill the queue all at once */ | ||
| 1210 | for (i = 0; i < 10 && dev->rxq.qlen < RX_QLEN(dev); i++) { | ||
| 1211 | urb = usb_alloc_urb(0, flags); | ||
| 1212 | if (urb != NULL) { | ||
| 1213 | if (rx_submit(dev, urb, flags) == -ENOLINK) | ||
| 1214 | return; | ||
| 1215 | } | ||
| 1216 | } | ||
| 1217 | } | ||
| 1218 | |||
| 1202 | /*-------------------------------------------------------------------------*/ | 1219 | /*-------------------------------------------------------------------------*/ |
| 1203 | 1220 | ||
| 1204 | // tasklet (work deferred from completions, in_irq) or timer | 1221 | // tasklet (work deferred from completions, in_irq) or timer |
| @@ -1238,26 +1255,14 @@ static void usbnet_bh (unsigned long param) | |||
| 1238 | !timer_pending (&dev->delay) && | 1255 | !timer_pending (&dev->delay) && |
| 1239 | !test_bit (EVENT_RX_HALT, &dev->flags)) { | 1256 | !test_bit (EVENT_RX_HALT, &dev->flags)) { |
| 1240 | int temp = dev->rxq.qlen; | 1257 | int temp = dev->rxq.qlen; |
| 1241 | int qlen = RX_QLEN (dev); | 1258 | |
| 1242 | 1259 | if (temp < RX_QLEN(dev)) { | |
| 1243 | if (temp < qlen) { | 1260 | rx_alloc_submit(dev, GFP_ATOMIC); |
| 1244 | struct urb *urb; | ||
| 1245 | int i; | ||
| 1246 | |||
| 1247 | // don't refill the queue all at once | ||
| 1248 | for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) { | ||
| 1249 | urb = usb_alloc_urb (0, GFP_ATOMIC); | ||
| 1250 | if (urb != NULL) { | ||
| 1251 | if (rx_submit (dev, urb, GFP_ATOMIC) == | ||
| 1252 | -ENOLINK) | ||
| 1253 | return; | ||
| 1254 | } | ||
| 1255 | } | ||
| 1256 | if (temp != dev->rxq.qlen) | 1261 | if (temp != dev->rxq.qlen) |
| 1257 | netif_dbg(dev, link, dev->net, | 1262 | netif_dbg(dev, link, dev->net, |
| 1258 | "rxqlen %d --> %d\n", | 1263 | "rxqlen %d --> %d\n", |
| 1259 | temp, dev->rxq.qlen); | 1264 | temp, dev->rxq.qlen); |
| 1260 | if (dev->rxq.qlen < qlen) | 1265 | if (dev->rxq.qlen < RX_QLEN(dev)) |
| 1261 | tasklet_schedule (&dev->bh); | 1266 | tasklet_schedule (&dev->bh); |
| 1262 | } | 1267 | } |
| 1263 | if (dev->txq.qlen < TX_QLEN (dev)) | 1268 | if (dev->txq.qlen < TX_QLEN (dev)) |
| @@ -1506,6 +1511,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message) | |||
| 1506 | spin_lock_irq(&dev->txq.lock); | 1511 | spin_lock_irq(&dev->txq.lock); |
| 1507 | /* don't autosuspend while transmitting */ | 1512 | /* don't autosuspend while transmitting */ |
| 1508 | if (dev->txq.qlen && PMSG_IS_AUTO(message)) { | 1513 | if (dev->txq.qlen && PMSG_IS_AUTO(message)) { |
| 1514 | dev->suspend_count--; | ||
| 1509 | spin_unlock_irq(&dev->txq.lock); | 1515 | spin_unlock_irq(&dev->txq.lock); |
| 1510 | return -EBUSY; | 1516 | return -EBUSY; |
| 1511 | } else { | 1517 | } else { |
| @@ -1562,6 +1568,13 @@ int usbnet_resume (struct usb_interface *intf) | |||
| 1562 | spin_unlock_irq(&dev->txq.lock); | 1568 | spin_unlock_irq(&dev->txq.lock); |
| 1563 | 1569 | ||
| 1564 | if (test_bit(EVENT_DEV_OPEN, &dev->flags)) { | 1570 | if (test_bit(EVENT_DEV_OPEN, &dev->flags)) { |
| 1571 | /* handle remote wakeup ASAP */ | ||
| 1572 | if (!dev->wait && | ||
| 1573 | netif_device_present(dev->net) && | ||
| 1574 | !timer_pending(&dev->delay) && | ||
| 1575 | !test_bit(EVENT_RX_HALT, &dev->flags)) | ||
| 1576 | rx_alloc_submit(dev, GFP_KERNEL); | ||
| 1577 | |||
| 1565 | if (!(dev->txq.qlen >= TX_QLEN(dev))) | 1578 | if (!(dev->txq.qlen >= TX_QLEN(dev))) |
| 1566 | netif_tx_wake_all_queues(dev->net); | 1579 | netif_tx_wake_all_queues(dev->net); |
| 1567 | tasklet_schedule (&dev->bh); | 1580 | tasklet_schedule (&dev->bh); |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 252c2c2d76c1..f9f15bb3f03a 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -7233,8 +7233,8 @@ static int airo_get_aplist(struct net_device *dev, | |||
| 7233 | } | 7233 | } |
| 7234 | } else { | 7234 | } else { |
| 7235 | dwrq->flags = 1; /* Should be define'd */ | 7235 | dwrq->flags = 1; /* Should be define'd */ |
| 7236 | memcpy(extra + sizeof(struct sockaddr)*i, | 7236 | memcpy(extra + sizeof(struct sockaddr) * i, qual, |
| 7237 | &qual, sizeof(struct iw_quality)*i); | 7237 | sizeof(struct iw_quality) * i); |
| 7238 | } | 7238 | } |
| 7239 | dwrq->length = i; | 7239 | dwrq->length = i; |
| 7240 | 7240 | ||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index fbaa30930076..44ad6fe0278f 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
| @@ -1045,11 +1045,11 @@ ath5k_drain_tx_buffs(struct ath5k_hw *ah) | |||
| 1045 | 1045 | ||
| 1046 | ath5k_txbuf_free_skb(ah, bf); | 1046 | ath5k_txbuf_free_skb(ah, bf); |
| 1047 | 1047 | ||
| 1048 | spin_lock_bh(&ah->txbuflock); | 1048 | spin_lock(&ah->txbuflock); |
| 1049 | list_move_tail(&bf->list, &ah->txbuf); | 1049 | list_move_tail(&bf->list, &ah->txbuf); |
| 1050 | ah->txbuf_len++; | 1050 | ah->txbuf_len++; |
| 1051 | txq->txq_len--; | 1051 | txq->txq_len--; |
| 1052 | spin_unlock_bh(&ah->txbuflock); | 1052 | spin_unlock(&ah->txbuflock); |
| 1053 | } | 1053 | } |
| 1054 | txq->link = NULL; | 1054 | txq->link = NULL; |
| 1055 | txq->txq_poll_mark = false; | 1055 | txq->txq_poll_mark = false; |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index a8c050085648..f72c4a36d01b 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
| @@ -214,6 +214,7 @@ struct ath_frame_info { | |||
| 214 | enum ath9k_key_type keytype; | 214 | enum ath9k_key_type keytype; |
| 215 | u8 keyix; | 215 | u8 keyix; |
| 216 | u8 retries; | 216 | u8 retries; |
| 217 | u8 rtscts_rate; | ||
| 217 | }; | 218 | }; |
| 218 | 219 | ||
| 219 | struct ath_buf_state { | 220 | struct ath_buf_state { |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 2b8f61c210e1..abbd6effd60d 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
| @@ -1496,6 +1496,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1496 | priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; | 1496 | priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; |
| 1497 | 1497 | ||
| 1498 | if (priv->ah->opmode == NL80211_IFTYPE_STATION) { | 1498 | if (priv->ah->opmode == NL80211_IFTYPE_STATION) { |
| 1499 | ath9k_htc_choose_set_bssid(priv); | ||
| 1499 | if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) | 1500 | if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) |
| 1500 | ath9k_htc_start_ani(priv); | 1501 | ath9k_htc_start_ani(priv); |
| 1501 | else if (priv->num_sta_assoc_vif == 0) | 1502 | else if (priv->num_sta_assoc_vif == 0) |
| @@ -1503,13 +1504,11 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1503 | } | 1504 | } |
| 1504 | } | 1505 | } |
| 1505 | 1506 | ||
| 1506 | if (changed & BSS_CHANGED_BSSID) { | 1507 | if (changed & BSS_CHANGED_IBSS) { |
| 1507 | if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { | 1508 | if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { |
| 1508 | common->curaid = bss_conf->aid; | 1509 | common->curaid = bss_conf->aid; |
| 1509 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); | 1510 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); |
| 1510 | ath9k_htc_set_bssid(priv); | 1511 | ath9k_htc_set_bssid(priv); |
| 1511 | } else if (priv->ah->opmode == NL80211_IFTYPE_STATION) { | ||
| 1512 | ath9k_htc_choose_set_bssid(priv); | ||
| 1513 | } | 1512 | } |
| 1514 | } | 1513 | } |
| 1515 | 1514 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 784baee5db84..a42c26f3b998 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
| @@ -773,13 +773,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah) | |||
| 773 | 773 | ||
| 774 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) | 774 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) |
| 775 | { | 775 | { |
| 776 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 777 | int i = 0; | ||
| 778 | |||
| 776 | REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); | 779 | REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); |
| 777 | udelay(100); | 780 | udelay(100); |
| 778 | REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); | 781 | REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); |
| 779 | 782 | ||
| 780 | while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) | 783 | while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) { |
| 784 | |||
| 781 | udelay(100); | 785 | udelay(100); |
| 782 | 786 | ||
| 787 | if (WARN_ON_ONCE(i >= 100)) { | ||
| 788 | ath_err(common, "PLL4 meaurement not done\n"); | ||
| 789 | break; | ||
| 790 | } | ||
| 791 | |||
| 792 | i++; | ||
| 793 | } | ||
| 794 | |||
| 783 | return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; | 795 | return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; |
| 784 | } | 796 | } |
| 785 | EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); | 797 | EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index f777ddcd1172..8d8306039edb 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
| 938 | struct ieee80211_tx_rate *rates; | 938 | struct ieee80211_tx_rate *rates; |
| 939 | const struct ieee80211_rate *rate; | 939 | const struct ieee80211_rate *rate; |
| 940 | struct ieee80211_hdr *hdr; | 940 | struct ieee80211_hdr *hdr; |
| 941 | struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); | ||
| 941 | int i; | 942 | int i; |
| 942 | u8 rix = 0; | 943 | u8 rix = 0; |
| 943 | 944 | ||
| @@ -948,18 +949,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
| 948 | 949 | ||
| 949 | /* set dur_update_en for l-sig computation except for PS-Poll frames */ | 950 | /* set dur_update_en for l-sig computation except for PS-Poll frames */ |
| 950 | info->dur_update = !ieee80211_is_pspoll(hdr->frame_control); | 951 | info->dur_update = !ieee80211_is_pspoll(hdr->frame_control); |
| 951 | 952 | info->rtscts_rate = fi->rtscts_rate; | |
| 952 | /* | ||
| 953 | * We check if Short Preamble is needed for the CTS rate by | ||
| 954 | * checking the BSS's global flag. | ||
| 955 | * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used. | ||
| 956 | */ | ||
| 957 | rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info); | ||
| 958 | info->rtscts_rate = rate->hw_value; | ||
| 959 | |||
| 960 | if (tx_info->control.vif && | ||
| 961 | tx_info->control.vif->bss_conf.use_short_preamble) | ||
| 962 | info->rtscts_rate |= rate->hw_value_short; | ||
| 963 | 953 | ||
| 964 | for (i = 0; i < 4; i++) { | 954 | for (i = 0; i < 4; i++) { |
| 965 | bool is_40, is_sgi, is_sp; | 955 | bool is_40, is_sgi, is_sp; |
| @@ -1001,13 +991,13 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1001 | } | 991 | } |
| 1002 | 992 | ||
| 1003 | /* legacy rates */ | 993 | /* legacy rates */ |
| 994 | rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; | ||
| 1004 | if ((tx_info->band == IEEE80211_BAND_2GHZ) && | 995 | if ((tx_info->band == IEEE80211_BAND_2GHZ) && |
| 1005 | !(rate->flags & IEEE80211_RATE_ERP_G)) | 996 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
| 1006 | phy = WLAN_RC_PHY_CCK; | 997 | phy = WLAN_RC_PHY_CCK; |
| 1007 | else | 998 | else |
| 1008 | phy = WLAN_RC_PHY_OFDM; | 999 | phy = WLAN_RC_PHY_OFDM; |
| 1009 | 1000 | ||
| 1010 | rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; | ||
| 1011 | info->rates[i].Rate = rate->hw_value; | 1001 | info->rates[i].Rate = rate->hw_value; |
| 1012 | if (rate->hw_value_short) { | 1002 | if (rate->hw_value_short) { |
| 1013 | if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) | 1003 | if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) |
| @@ -1776,10 +1766,22 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
| 1776 | struct ieee80211_sta *sta = tx_info->control.sta; | 1766 | struct ieee80211_sta *sta = tx_info->control.sta; |
| 1777 | struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; | 1767 | struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; |
| 1778 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 1768 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
| 1769 | const struct ieee80211_rate *rate; | ||
| 1779 | struct ath_frame_info *fi = get_frame_info(skb); | 1770 | struct ath_frame_info *fi = get_frame_info(skb); |
| 1780 | struct ath_node *an = NULL; | 1771 | struct ath_node *an = NULL; |
| 1781 | enum ath9k_key_type keytype; | 1772 | enum ath9k_key_type keytype; |
| 1773 | bool short_preamble = false; | ||
| 1774 | |||
| 1775 | /* | ||
| 1776 | * We check if Short Preamble is needed for the CTS rate by | ||
| 1777 | * checking the BSS's global flag. | ||
| 1778 | * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used. | ||
| 1779 | */ | ||
| 1780 | if (tx_info->control.vif && | ||
| 1781 | tx_info->control.vif->bss_conf.use_short_preamble) | ||
| 1782 | short_preamble = true; | ||
| 1782 | 1783 | ||
| 1784 | rate = ieee80211_get_rts_cts_rate(hw, tx_info); | ||
| 1783 | keytype = ath9k_cmn_get_hw_crypto_keytype(skb); | 1785 | keytype = ath9k_cmn_get_hw_crypto_keytype(skb); |
| 1784 | 1786 | ||
| 1785 | if (sta) | 1787 | if (sta) |
| @@ -1794,6 +1796,9 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
| 1794 | fi->keyix = ATH9K_TXKEYIX_INVALID; | 1796 | fi->keyix = ATH9K_TXKEYIX_INVALID; |
| 1795 | fi->keytype = keytype; | 1797 | fi->keytype = keytype; |
| 1796 | fi->framelen = framelen; | 1798 | fi->framelen = framelen; |
| 1799 | fi->rtscts_rate = rate->hw_value; | ||
| 1800 | if (short_preamble) | ||
| 1801 | fi->rtscts_rate |= rate->hw_value_short; | ||
| 1797 | } | 1802 | } |
| 1798 | 1803 | ||
| 1799 | u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) | 1804 | u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) |
diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c index 8a2d9e643b14..b0eff1c340c7 100644 --- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c | |||
| @@ -2228,6 +2228,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file, | |||
| 2228 | return count; | 2228 | return count; |
| 2229 | } | 2229 | } |
| 2230 | 2230 | ||
| 2231 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
| 2231 | static ssize_t iwl_dbgfs_log_event_read(struct file *file, | 2232 | static ssize_t iwl_dbgfs_log_event_read(struct file *file, |
| 2232 | char __user *user_buf, | 2233 | char __user *user_buf, |
| 2233 | size_t count, loff_t *ppos) | 2234 | size_t count, loff_t *ppos) |
| @@ -2265,6 +2266,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file, | |||
| 2265 | 2266 | ||
| 2266 | return count; | 2267 | return count; |
| 2267 | } | 2268 | } |
| 2269 | #endif | ||
| 2268 | 2270 | ||
| 2269 | static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file, | 2271 | static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file, |
| 2270 | char __user *user_buf, | 2272 | char __user *user_buf, |
| @@ -2334,7 +2336,9 @@ DEBUGFS_READ_FILE_OPS(bt_traffic); | |||
| 2334 | DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); | 2336 | DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); |
| 2335 | DEBUGFS_READ_FILE_OPS(reply_tx_error); | 2337 | DEBUGFS_READ_FILE_OPS(reply_tx_error); |
| 2336 | DEBUGFS_WRITE_FILE_OPS(echo_test); | 2338 | DEBUGFS_WRITE_FILE_OPS(echo_test); |
| 2339 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
| 2337 | DEBUGFS_READ_WRITE_FILE_OPS(log_event); | 2340 | DEBUGFS_READ_WRITE_FILE_OPS(log_event); |
| 2341 | #endif | ||
| 2338 | DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled); | 2342 | DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled); |
| 2339 | 2343 | ||
| 2340 | /* | 2344 | /* |
| @@ -2394,7 +2398,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
| 2394 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); | 2398 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); |
| 2395 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); | 2399 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); |
| 2396 | DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR); | 2400 | DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR); |
| 2401 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
| 2397 | DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR); | 2402 | DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR); |
| 2403 | #endif | ||
| 2398 | 2404 | ||
| 2399 | if (iwl_advanced_bt_coexist(priv)) | 2405 | if (iwl_advanced_bt_coexist(priv)) |
| 2400 | DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); | 2406 | DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 510397b3d4a8..80e9b2a39058 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
| @@ -1484,7 +1484,7 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 1484 | struct wireless_dev *wdev; | 1484 | struct wireless_dev *wdev; |
| 1485 | 1485 | ||
| 1486 | if (!adapter) | 1486 | if (!adapter) |
| 1487 | return NULL; | 1487 | return ERR_PTR(-EFAULT); |
| 1488 | 1488 | ||
| 1489 | switch (type) { | 1489 | switch (type) { |
| 1490 | case NL80211_IFTYPE_UNSPECIFIED: | 1490 | case NL80211_IFTYPE_UNSPECIFIED: |
| @@ -1494,12 +1494,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 1494 | if (priv->bss_mode) { | 1494 | if (priv->bss_mode) { |
| 1495 | wiphy_err(wiphy, | 1495 | wiphy_err(wiphy, |
| 1496 | "cannot create multiple sta/adhoc ifaces\n"); | 1496 | "cannot create multiple sta/adhoc ifaces\n"); |
| 1497 | return NULL; | 1497 | return ERR_PTR(-EINVAL); |
| 1498 | } | 1498 | } |
| 1499 | 1499 | ||
| 1500 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); | 1500 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
| 1501 | if (!wdev) | 1501 | if (!wdev) |
| 1502 | return NULL; | 1502 | return ERR_PTR(-ENOMEM); |
| 1503 | 1503 | ||
| 1504 | wdev->wiphy = wiphy; | 1504 | wdev->wiphy = wiphy; |
| 1505 | priv->wdev = wdev; | 1505 | priv->wdev = wdev; |
| @@ -1522,12 +1522,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 1522 | 1522 | ||
| 1523 | if (priv->bss_mode) { | 1523 | if (priv->bss_mode) { |
| 1524 | wiphy_err(wiphy, "Can't create multiple AP interfaces"); | 1524 | wiphy_err(wiphy, "Can't create multiple AP interfaces"); |
| 1525 | return NULL; | 1525 | return ERR_PTR(-EINVAL); |
| 1526 | } | 1526 | } |
| 1527 | 1527 | ||
| 1528 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); | 1528 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
| 1529 | if (!wdev) | 1529 | if (!wdev) |
| 1530 | return NULL; | 1530 | return ERR_PTR(-ENOMEM); |
| 1531 | 1531 | ||
| 1532 | priv->wdev = wdev; | 1532 | priv->wdev = wdev; |
| 1533 | wdev->wiphy = wiphy; | 1533 | wdev->wiphy = wiphy; |
| @@ -1544,14 +1544,15 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 1544 | break; | 1544 | break; |
| 1545 | default: | 1545 | default: |
| 1546 | wiphy_err(wiphy, "type not supported\n"); | 1546 | wiphy_err(wiphy, "type not supported\n"); |
| 1547 | return NULL; | 1547 | return ERR_PTR(-EINVAL); |
| 1548 | } | 1548 | } |
| 1549 | 1549 | ||
| 1550 | dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name, | 1550 | dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name, |
| 1551 | ether_setup, 1); | 1551 | ether_setup, 1); |
| 1552 | if (!dev) { | 1552 | if (!dev) { |
| 1553 | wiphy_err(wiphy, "no memory available for netdevice\n"); | 1553 | wiphy_err(wiphy, "no memory available for netdevice\n"); |
| 1554 | goto error; | 1554 | priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; |
| 1555 | return ERR_PTR(-ENOMEM); | ||
| 1555 | } | 1556 | } |
| 1556 | 1557 | ||
| 1557 | mwifiex_init_priv_params(priv, dev); | 1558 | mwifiex_init_priv_params(priv, dev); |
| @@ -1582,7 +1583,9 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 1582 | /* Register network device */ | 1583 | /* Register network device */ |
| 1583 | if (register_netdevice(dev)) { | 1584 | if (register_netdevice(dev)) { |
| 1584 | wiphy_err(wiphy, "cannot register virtual network device\n"); | 1585 | wiphy_err(wiphy, "cannot register virtual network device\n"); |
| 1585 | goto error; | 1586 | free_netdev(dev); |
| 1587 | priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; | ||
| 1588 | return ERR_PTR(-EFAULT); | ||
| 1586 | } | 1589 | } |
| 1587 | 1590 | ||
| 1588 | sema_init(&priv->async_sem, 1); | 1591 | sema_init(&priv->async_sem, 1); |
| @@ -1594,12 +1597,6 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 1594 | mwifiex_dev_debugfs_init(priv); | 1597 | mwifiex_dev_debugfs_init(priv); |
| 1595 | #endif | 1598 | #endif |
| 1596 | return dev; | 1599 | return dev; |
| 1597 | error: | ||
| 1598 | if (dev && (dev->reg_state == NETREG_UNREGISTERED)) | ||
| 1599 | free_netdev(dev); | ||
| 1600 | priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; | ||
| 1601 | |||
| 1602 | return NULL; | ||
| 1603 | } | 1600 | } |
| 1604 | EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); | 1601 | EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); |
| 1605 | 1602 | ||
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index e2faec4db108..cecb27283196 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c | |||
| @@ -161,15 +161,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, | |||
| 161 | goto done; | 161 | goto done; |
| 162 | 162 | ||
| 163 | for (i = 0; i < adapter->priv_num; i++) { | 163 | for (i = 0; i < adapter->priv_num; i++) { |
| 164 | |||
| 165 | tpriv = adapter->priv[i]; | 164 | tpriv = adapter->priv[i]; |
| 166 | 165 | ||
| 167 | if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA) && | 166 | if (tpriv->media_connected && |
| 168 | (tpriv->media_connected)) { | 167 | netif_queue_stopped(tpriv->netdev)) |
| 169 | if (netif_queue_stopped(tpriv->netdev)) | 168 | mwifiex_wake_up_net_dev_queue(tpriv->netdev, adapter); |
| 170 | mwifiex_wake_up_net_dev_queue(tpriv->netdev, | ||
| 171 | adapter); | ||
| 172 | } | ||
| 173 | } | 169 | } |
| 174 | done: | 170 | done: |
| 175 | dev_kfree_skb_any(skb); | 171 | dev_kfree_skb_any(skb); |
diff --git a/drivers/net/wireless/ti/wl1251/acx.c b/drivers/net/wireless/ti/wl1251/acx.c index ad87a1ac6462..db6430c1a084 100644 --- a/drivers/net/wireless/ti/wl1251/acx.c +++ b/drivers/net/wireless/ti/wl1251/acx.c | |||
| @@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime) | |||
| 869 | } | 869 | } |
| 870 | 870 | ||
| 871 | *mactime = tsf_info->current_tsf_lsb | | 871 | *mactime = tsf_info->current_tsf_lsb | |
| 872 | (tsf_info->current_tsf_msb << 31); | 872 | ((u64)tsf_info->current_tsf_msb << 32); |
| 873 | 873 | ||
| 874 | out: | 874 | out: |
| 875 | kfree(tsf_info); | 875 | kfree(tsf_info); |
diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index 9f15ccaf8f05..5ec50a476a69 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c | |||
| @@ -76,8 +76,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) | |||
| 76 | } | 76 | } |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && | 79 | if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { |
| 80 | wl->station_mode != STATION_ACTIVE_MODE) { | ||
| 81 | wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); | 80 | wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); |
| 82 | 81 | ||
| 83 | /* indicate to the stack, that beacons have been lost */ | 82 | /* indicate to the stack, that beacons have been lost */ |
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c index 87f6305bda2c..567660cd2fcd 100644 --- a/drivers/net/wireless/ti/wl1251/spi.c +++ b/drivers/net/wireless/ti/wl1251/spi.c | |||
| @@ -73,6 +73,8 @@ static void wl1251_spi_reset(struct wl1251 *wl) | |||
| 73 | spi_sync(wl_to_spi(wl), &m); | 73 | spi_sync(wl_to_spi(wl), &m); |
| 74 | 74 | ||
| 75 | wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN); | 75 | wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN); |
| 76 | |||
| 77 | kfree(cmd); | ||
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | static void wl1251_spi_wake(struct wl1251 *wl) | 80 | static void wl1251_spi_wake(struct wl1251 *wl) |
| @@ -127,6 +129,8 @@ static void wl1251_spi_wake(struct wl1251 *wl) | |||
| 127 | spi_sync(wl_to_spi(wl), &m); | 129 | spi_sync(wl_to_spi(wl), &m); |
| 128 | 130 | ||
| 129 | wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN); | 131 | wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN); |
| 132 | |||
| 133 | kfree(cmd); | ||
| 130 | } | 134 | } |
| 131 | 135 | ||
| 132 | static void wl1251_spi_reset_wake(struct wl1251 *wl) | 136 | static void wl1251_spi_reset_wake(struct wl1251 *wl) |
