aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-28 14:20:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-28 14:20:31 -0400
commitf3747e2f2cea74264e1f8031b94d413b426d0436 (patch)
tree5d0a1e68456827483fd931d28abc4b9de9cbdb1d /drivers/net
parent47b514cd476db2eca066a2ad31501b079d6c9cce (diff)
parenta969dd139cc2f2bccdcb11894f0695517cf84d4d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking update from David Miller: 1) Pairing and deadlock fixes in bluetooth from Johan Hedberg. 2) Add device IDs for AR3011 and AR3012 bluetooth chips. From Giancarlo Formicuccia and Marek Vasut. 3) Fix wireless regulatory deadlock, from Eliad Peller. 4) Fix full TX ring panic in bnx2x driver, from Eric Dumazet. 5) Revert the two commits that added skb_orphan_try(), it causes erratic bonding behavior with UDP clients and the gains it used to give are mostly no longer happening due to how BQL works. From Eric Dumazet. 6) It took two tries, but Thomas Graf fixed a problem wherein we registered ipv6 routing procfs files before their backend data were initialized properly. 7) Fix max GSO size setting in be2net, from Sarveshwar Bandi. 8) PHY device id mask is wrong for KSZ9021 and KS8001 chips, fix from Jason Wang. 9) Fix use of stale SKB data pointer after skb_linearize() call in batman-adv, from Antonio Quartulli. 10) Fix memory leak in IXGBE due to missing __GFP_COMP, from Alexander Duyck. 11) Fix probing of Gobi devices in qmi_wwan usbnet driver, from Bjørn Mork. 12) Fix suspend/resume and open failure handling in usbnet from Ming Lei. 13) Attempt to fix device r8169 hangs for certain chips, from Francois Romieu. 14) Fix advancement of RX dirty pointer in some situations in sh_eth driver, from Yoshihiro Shimoda. 15) Attempt to fix restart of IPV6 routing table dumps when there is an intervening table update. From Eric Dumazet. 16) Respect security_inet_conn_request() return value in ipv6 TCP. From Neal Cardwell. 17) Add another iPAD device ID to ipheth driver, from Davide Gerhard. 18) Fix access to freed SKB in l2tp_eth_dev_xmit(), and fix l2tp lockdep splats, from Eric Dumazet. 19) Make sure all bridge devices, regardless of whether they were created via netlink or ioctls, have their rtnetlink ops hooked up. From Thomas Graf and Stephen Hemminger. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (81 commits) 9p: fix min_t() casting in p9pdu_vwritef() can: flexcan: use be32_to_cpup to handle the value of dt entry xen/netfront: teardown the device before unregistering it. bridge: Assign rtnl_link_ops to bridge devices created via ioctl (v2) vhost: use USER_DS in vhost_worker thread ixgbe: Do not pad FCoE frames as this can cause issues with FCoE DDP net: l2tp_eth: use LLTX to avoid LOCKDEP splats mac802154: add missed braces net: l2tp_eth: fix l2tp_eth_dev_xmit race net/mlx4_en: Release QP range in free_resources net/mlx4: Use single completion vector after NOP failure net/mlx4_en: Set correct port parameters during device initialization ipheth: add support for iPad caif-hsi: Add missing return in error path caif-hsi: Bugfix - Piggyback'ed embedded CAIF frame lost caif: Clear shutdown mask to zero at reconnect. tcp: heed result of security_inet_conn_request() in tcp_v6_conn_request() ipv6: fib: fix fib dump restart batman-adv: fix race condition in TT full-table replacement batman-adv: only drop packets of known wifi clients ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_procfs.c15
-rw-r--r--drivers/net/caif/caif_hsi.c5
-rw-r--r--drivers/net/can/c_can/c_can.c4
-rw-r--r--drivers/net/can/flexcan.c4
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c8
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c54
-rw-r--r--drivers/net/ethernet/emulex/benet/be_cmds.c12
-rw-r--r--drivers/net/ethernet/emulex/benet/be_cmds.h2
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c2
-rw-r--r--drivers/net/ethernet/intel/Kconfig10
-rw-r--r--drivers/net/ethernet/intel/igb/e1000_82575.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe.h4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c16
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c13
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c18
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4_en.h1
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c2
-rw-r--r--drivers/net/ethernet/realtek/r8169.c1
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c12
-rw-r--r--drivers/net/phy/micrel.c8
-rw-r--r--drivers/net/usb/ipheth.c5
-rw-r--r--drivers/net/usb/qmi_wwan.c83
-rw-r--r--drivers/net/usb/usbnet.c53
-rw-r--r--drivers/net/wireless/airo.c4
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c14
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c27
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c31
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c6
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c25
-rw-r--r--drivers/net/wireless/mwifiex/txrx.c10
-rw-r--r--drivers/net/wireless/mwifiex/uap_cmd.c11
-rw-r--r--drivers/net/wireless/rndis_wlan.c2
-rw-r--r--drivers/net/wireless/ti/wl1251/acx.c2
-rw-r--r--drivers/net/wireless/ti/wl1251/event.c3
-rw-r--r--drivers/net/wireless/ti/wl1251/spi.c4
-rw-r--r--drivers/net/xen-netfront.c8
41 files changed, 288 insertions, 207 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
153static 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
153static void bond_info_show_slave(struct seq_file *seq, 165static 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/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 1520814c77c7..4a27adb7ae67 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -693,8 +693,6 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi)
693 */ 693 */
694 memcpy(rx_buf, (u8 *)piggy_desc, 694 memcpy(rx_buf, (u8 *)piggy_desc,
695 CFHSI_DESC_SHORT_SZ); 695 CFHSI_DESC_SHORT_SZ);
696 /* Mark no embedded frame here */
697 piggy_desc->offset = 0;
698 if (desc_pld_len == -EPROTO) 696 if (desc_pld_len == -EPROTO)
699 goto out_of_sync; 697 goto out_of_sync;
700 } 698 }
@@ -737,6 +735,8 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi)
737 /* Extract any payload in piggyback descriptor. */ 735 /* Extract any payload in piggyback descriptor. */
738 if (cfhsi_rx_desc(piggy_desc, cfhsi) < 0) 736 if (cfhsi_rx_desc(piggy_desc, cfhsi) < 0)
739 goto out_of_sync; 737 goto out_of_sync;
738 /* Mark no embedded frame after extracting it */
739 piggy_desc->offset = 0;
740 } 740 }
741 } 741 }
742 742
@@ -1178,6 +1178,7 @@ int cfhsi_probe(struct platform_device *pdev)
1178 dev_err(&ndev->dev, "%s: Registration error: %d.\n", 1178 dev_err(&ndev->dev, "%s: Registration error: %d.\n",
1179 __func__, res); 1179 __func__, res);
1180 free_netdev(ndev); 1180 free_netdev(ndev);
1181 return -ENODEV;
1181 } 1182 }
1182 /* Add CAIF HSI device to list. */ 1183 /* Add CAIF HSI device to list. */
1183 spin_lock(&cfhsi_list_lock); 1184 spin_lock(&cfhsi_list_lock);
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 8dc84d66eea1..86cd532c78f9 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -590,8 +590,8 @@ static void c_can_chip_config(struct net_device *dev)
590 priv->write_reg(priv, &priv->regs->control, 590 priv->write_reg(priv, &priv->regs->control,
591 CONTROL_ENABLE_AR); 591 CONTROL_ENABLE_AR);
592 592
593 if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY & 593 if ((priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) &&
594 CAN_CTRLMODE_LOOPBACK)) { 594 (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)) {
595 /* loopback + silent mode : useful for hot self-test */ 595 /* loopback + silent mode : useful for hot self-test */
596 priv->write_reg(priv, &priv->regs->control, CONTROL_EIE | 596 priv->write_reg(priv, &priv->regs->control, CONTROL_EIE |
597 CONTROL_SIE | CONTROL_IE | CONTROL_TEST); 597 CONTROL_SIE | CONTROL_IE | CONTROL_TEST);
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 38c0690df5c8..81d474102378 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -939,12 +939,12 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
939 return PTR_ERR(pinctrl); 939 return PTR_ERR(pinctrl);
940 940
941 if (pdev->dev.of_node) { 941 if (pdev->dev.of_node) {
942 const u32 *clock_freq_p; 942 const __be32 *clock_freq_p;
943 943
944 clock_freq_p = of_get_property(pdev->dev.of_node, 944 clock_freq_p = of_get_property(pdev->dev.of_node,
945 "clock-frequency", NULL); 945 "clock-frequency", NULL);
946 if (clock_freq_p) 946 if (clock_freq_p)
947 clock_freq = *clock_freq_p; 947 clock_freq = be32_to_cpup(clock_freq_p);
948 } 948 }
949 949
950 if (!clock_freq) { 950 if (!clock_freq) {
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index cbc56f274e0c..8098eea9704d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -190,7 +190,7 @@ int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata)
190 190
191 if ((netif_tx_queue_stopped(txq)) && 191 if ((netif_tx_queue_stopped(txq)) &&
192 (bp->state == BNX2X_STATE_OPEN) && 192 (bp->state == BNX2X_STATE_OPEN) &&
193 (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 3)) 193 (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 4))
194 netif_tx_wake_queue(txq); 194 netif_tx_wake_queue(txq);
195 195
196 __netif_tx_unlock(txq); 196 __netif_tx_unlock(txq);
@@ -2516,8 +2516,6 @@ int bnx2x_poll(struct napi_struct *napi, int budget)
2516/* we split the first BD into headers and data BDs 2516/* we split the first BD into headers and data BDs
2517 * to ease the pain of our fellow microcode engineers 2517 * to ease the pain of our fellow microcode engineers
2518 * we use one mapping for both BDs 2518 * we use one mapping for both BDs
2519 * So far this has only been observed to happen
2520 * in Other Operating Systems(TM)
2521 */ 2519 */
2522static noinline u16 bnx2x_tx_split(struct bnx2x *bp, 2520static noinline u16 bnx2x_tx_split(struct bnx2x *bp,
2523 struct bnx2x_fp_txdata *txdata, 2521 struct bnx2x_fp_txdata *txdata,
@@ -3171,7 +3169,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
3171 3169
3172 txdata->tx_bd_prod += nbd; 3170 txdata->tx_bd_prod += nbd;
3173 3171
3174 if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_SKB_FRAGS + 3)) { 3172 if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_SKB_FRAGS + 4)) {
3175 netif_tx_stop_queue(txq); 3173 netif_tx_stop_queue(txq);
3176 3174
3177 /* paired memory barrier is in bnx2x_tx_int(), we have to keep 3175 /* paired memory barrier is in bnx2x_tx_int(), we have to keep
@@ -3180,7 +3178,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
3180 smp_mb(); 3178 smp_mb();
3181 3179
3182 fp->eth_q_stats.driver_xoff++; 3180 fp->eth_q_stats.driver_xoff++;
3183 if (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 3) 3181 if (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 4)
3184 netif_tx_wake_queue(txq); 3182 netif_tx_wake_queue(txq);
3185 } 3183 }
3186 txdata->tx_pkt++; 3184 txdata->tx_pkt++;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index a3fb7215cd89..6e7d5c0843b4 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
@@ -7659,6 +7660,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy,
7659 return -EINVAL; 7660 return -EINVAL;
7660} 7661}
7661 7662
7663static void bnx2x_warpcore_power_module(struct link_params *params,
7664 struct bnx2x_phy *phy,
7665 u8 power)
7666{
7667 u32 pin_cfg;
7668 struct bnx2x *bp = params->bp;
7669
7670 pin_cfg = (REG_RD(bp, params->shmem_base +
7671 offsetof(struct shmem_region,
7672 dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
7673 PORT_HW_CFG_E3_PWR_DIS_MASK) >>
7674 PORT_HW_CFG_E3_PWR_DIS_SHIFT;
7675
7676 if (pin_cfg == PIN_CFG_NA)
7677 return;
7678 DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
7679 power, pin_cfg);
7680 /* Low ==> corresponding SFP+ module is powered
7681 * high ==> the SFP+ module is powered down
7682 */
7683 bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
7684}
7662static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, 7685static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
7663 struct link_params *params, 7686 struct link_params *params,
7664 u16 addr, u8 byte_cnt, 7687 u16 addr, u8 byte_cnt,
@@ -7678,6 +7701,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
7678 /* 4 byte aligned address */ 7701 /* 4 byte aligned address */
7679 addr32 = addr & (~0x3); 7702 addr32 = addr & (~0x3);
7680 do { 7703 do {
7704 if (cnt == I2C_WA_PWR_ITER) {
7705 bnx2x_warpcore_power_module(params, phy, 0);
7706 /* Note that 100us are not enough here */
7707 usleep_range(1000,1000);
7708 bnx2x_warpcore_power_module(params, phy, 1);
7709 }
7681 rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt, 7710 rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt,
7682 data_array); 7711 data_array);
7683 } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT)); 7712 } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT));
@@ -8200,29 +8229,6 @@ static void bnx2x_set_sfp_module_fault_led(struct link_params *params,
8200 bnx2x_set_e1e2_module_fault_led(params, gpio_mode); 8229 bnx2x_set_e1e2_module_fault_led(params, gpio_mode);
8201} 8230}
8202 8231
8203static void bnx2x_warpcore_power_module(struct link_params *params,
8204 struct bnx2x_phy *phy,
8205 u8 power)
8206{
8207 u32 pin_cfg;
8208 struct bnx2x *bp = params->bp;
8209
8210 pin_cfg = (REG_RD(bp, params->shmem_base +
8211 offsetof(struct shmem_region,
8212 dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
8213 PORT_HW_CFG_E3_PWR_DIS_MASK) >>
8214 PORT_HW_CFG_E3_PWR_DIS_SHIFT;
8215
8216 if (pin_cfg == PIN_CFG_NA)
8217 return;
8218 DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
8219 power, pin_cfg);
8220 /* Low ==> corresponding SFP+ module is powered
8221 * high ==> the SFP+ module is powered down
8222 */
8223 bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
8224}
8225
8226static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, 8232static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy,
8227 struct link_params *params) 8233 struct link_params *params)
8228{ 8234{
@@ -9748,7 +9754,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
9748 9754
9749 msleep(1); 9755 msleep(1);
9750 9756
9751 if (!(CHIP_IS_E1(bp))) 9757 if (!(CHIP_IS_E1x(bp)))
9752 port = BP_PATH(bp); 9758 port = BP_PATH(bp);
9753 else 9759 else
9754 port = params->port; 9760 port = params->port;
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 8d06ea381741..921c2082af4c 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 }
136done: 136done:
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h
index 9625bf420c16..b3f3fc3d1323 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
1572struct be_cmd_req_get_stats_v1 { 1572struct 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 fdb50cec6b51..501dfa9c88ec 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -3237,7 +3237,7 @@ static void be_netdev_init(struct net_device *netdev)
3237 3237
3238 netdev->flags |= IFF_MULTICAST; 3238 netdev->flags |= IFF_MULTICAST;
3239 3239
3240 netif_set_gso_max_size(netdev, 65535); 3240 netif_set_gso_max_size(netdev, 65535 - ETH_HLEN);
3241 3241
3242 netdev->netdev_ops = &be_netdev_ops; 3242 netdev->netdev_ops = &be_netdev_ops;
3243 3243
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
123config IGB_PTP 123config 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
223config IXGBE_PTP 225config 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.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 3ef3c5284e52..7af291e236bf 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -196,7 +196,7 @@ enum ixgbe_ring_state_t {
196 __IXGBE_HANG_CHECK_ARMED, 196 __IXGBE_HANG_CHECK_ARMED,
197 __IXGBE_RX_RSC_ENABLED, 197 __IXGBE_RX_RSC_ENABLED,
198 __IXGBE_RX_CSUM_UDP_ZERO_ERR, 198 __IXGBE_RX_CSUM_UDP_ZERO_ERR,
199 __IXGBE_RX_FCOE_BUFSZ, 199 __IXGBE_RX_FCOE,
200}; 200};
201 201
202#define check_for_tx_hang(ring) \ 202#define check_for_tx_hang(ring) \
@@ -290,7 +290,7 @@ struct ixgbe_ring_feature {
290#if defined(IXGBE_FCOE) && (PAGE_SIZE < 8192) 290#if defined(IXGBE_FCOE) && (PAGE_SIZE < 8192)
291static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring) 291static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring)
292{ 292{
293 return test_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state) ? 1 : 0; 293 return test_bit(__IXGBE_RX_FCOE, &ring->state) ? 1 : 0;
294} 294}
295#else 295#else
296#define ixgbe_rx_pg_order(_ring) 0 296#define ixgbe_rx_pg_order(_ring) 0
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index af1a5314b494..c377706e81a8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -634,7 +634,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,
634 f = &adapter->ring_feature[RING_F_FCOE]; 634 f = &adapter->ring_feature[RING_F_FCOE];
635 if ((rxr_idx >= f->mask) && 635 if ((rxr_idx >= f->mask) &&
636 (rxr_idx < f->mask + f->indices)) 636 (rxr_idx < f->mask + f->indices))
637 set_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state); 637 set_bit(__IXGBE_RX_FCOE, &ring->state);
638 } 638 }
639 639
640#endif /* IXGBE_FCOE */ 640#endif /* IXGBE_FCOE */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 17ad6a3c1be1..18ca3bcadf0c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1058,17 +1058,17 @@ static inline void ixgbe_rx_hash(struct ixgbe_ring *ring,
1058#ifdef IXGBE_FCOE 1058#ifdef IXGBE_FCOE
1059/** 1059/**
1060 * ixgbe_rx_is_fcoe - check the rx desc for incoming pkt type 1060 * ixgbe_rx_is_fcoe - check the rx desc for incoming pkt type
1061 * @adapter: address of board private structure 1061 * @ring: structure containing ring specific data
1062 * @rx_desc: advanced rx descriptor 1062 * @rx_desc: advanced rx descriptor
1063 * 1063 *
1064 * Returns : true if it is FCoE pkt 1064 * Returns : true if it is FCoE pkt
1065 */ 1065 */
1066static inline bool ixgbe_rx_is_fcoe(struct ixgbe_adapter *adapter, 1066static inline bool ixgbe_rx_is_fcoe(struct ixgbe_ring *ring,
1067 union ixgbe_adv_rx_desc *rx_desc) 1067 union ixgbe_adv_rx_desc *rx_desc)
1068{ 1068{
1069 __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; 1069 __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info;
1070 1070
1071 return (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && 1071 return test_bit(__IXGBE_RX_FCOE, &ring->state) &&
1072 ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) == 1072 ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) ==
1073 (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE << 1073 (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE <<
1074 IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT))); 1074 IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT)));
@@ -1148,7 +1148,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,
1148 1148
1149 /* alloc new page for storage */ 1149 /* alloc new page for storage */
1150 if (likely(!page)) { 1150 if (likely(!page)) {
1151 page = alloc_pages(GFP_ATOMIC | __GFP_COLD, 1151 page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP,
1152 ixgbe_rx_pg_order(rx_ring)); 1152 ixgbe_rx_pg_order(rx_ring));
1153 if (unlikely(!page)) { 1153 if (unlikely(!page)) {
1154 rx_ring->rx_stats.alloc_rx_page_failed++; 1154 rx_ring->rx_stats.alloc_rx_page_failed++;
@@ -1549,6 +1549,12 @@ static bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring,
1549 skb->truesize -= ixgbe_rx_bufsz(rx_ring); 1549 skb->truesize -= ixgbe_rx_bufsz(rx_ring);
1550 } 1550 }
1551 1551
1552#ifdef IXGBE_FCOE
1553 /* do not attempt to pad FCoE Frames as this will disrupt DDP */
1554 if (ixgbe_rx_is_fcoe(rx_ring, rx_desc))
1555 return false;
1556
1557#endif
1552 /* if skb_pad returns an error the skb was freed */ 1558 /* if skb_pad returns an error the skb was freed */
1553 if (unlikely(skb->len < 60)) { 1559 if (unlikely(skb->len < 60)) {
1554 int pad_len = 60 - skb->len; 1560 int pad_len = 60 - skb->len;
@@ -1775,7 +1781,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
1775 1781
1776#ifdef IXGBE_FCOE 1782#ifdef IXGBE_FCOE
1777 /* if ddp, not passing to ULD unless for FCP_RSP or error */ 1783 /* if ddp, not passing to ULD unless for FCP_RSP or error */
1778 if (ixgbe_rx_is_fcoe(adapter, rx_desc)) { 1784 if (ixgbe_rx_is_fcoe(rx_ring, rx_desc)) {
1779 ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb); 1785 ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb);
1780 if (!ddp_bytes) { 1786 if (!ddp_bytes) {
1781 dev_kfree_skb_any(skb); 1787 dev_kfree_skb_any(skb);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index ddc6a4d19302..dcebd128becf 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -708,6 +708,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
708{ 708{
709 struct ixgbe_hw *hw = &adapter->hw; 709 struct ixgbe_hw *hw = &adapter->hw;
710 u32 incval = 0; 710 u32 incval = 0;
711 u32 timinca = 0;
711 u32 shift = 0; 712 u32 shift = 0;
712 u32 cycle_speed; 713 u32 cycle_speed;
713 unsigned long flags; 714 unsigned long flags;
@@ -730,8 +731,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
730 break; 731 break;
731 } 732 }
732 733
733 /* Bail if the cycle speed didn't change */ 734 /*
734 if (adapter->cycle_speed == cycle_speed) 735 * grab the current TIMINCA value from the register so that it can be
736 * double checked. If the register value has been cleared, it must be
737 * reset to the correct value for generating a cyclecounter. If
738 * TIMINCA is zero, the SYSTIME registers do not increment at all.
739 */
740 timinca = IXGBE_READ_REG(hw, IXGBE_TIMINCA);
741
742 /* Bail if the cycle speed didn't change and TIMINCA is non-zero */
743 if (adapter->cycle_speed == cycle_speed && timinca)
735 return; 744 return;
736 745
737 /* disable the SDP clock out */ 746 /* disable the SDP clock out */
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 926d8aac941c..073b85b45fc5 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -929,15 +929,20 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv)
929 if (priv->rx_cq[i].buf) 929 if (priv->rx_cq[i].buf)
930 mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); 930 mlx4_en_destroy_cq(priv, &priv->rx_cq[i]);
931 } 931 }
932
933 if (priv->base_tx_qpn) {
934 mlx4_qp_release_range(priv->mdev->dev, priv->base_tx_qpn, priv->tx_ring_num);
935 priv->base_tx_qpn = 0;
936 }
932} 937}
933 938
934int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) 939int mlx4_en_alloc_resources(struct mlx4_en_priv *priv)
935{ 940{
936 struct mlx4_en_port_profile *prof = priv->prof; 941 struct mlx4_en_port_profile *prof = priv->prof;
937 int i; 942 int i;
938 int base_tx_qpn, err; 943 int err;
939 944
940 err = mlx4_qp_reserve_range(priv->mdev->dev, priv->tx_ring_num, 256, &base_tx_qpn); 945 err = mlx4_qp_reserve_range(priv->mdev->dev, priv->tx_ring_num, 256, &priv->base_tx_qpn);
941 if (err) { 946 if (err) {
942 en_err(priv, "failed reserving range for TX rings\n"); 947 en_err(priv, "failed reserving range for TX rings\n");
943 return err; 948 return err;
@@ -949,7 +954,7 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv)
949 prof->tx_ring_size, i, TX)) 954 prof->tx_ring_size, i, TX))
950 goto err; 955 goto err;
951 956
952 if (mlx4_en_create_tx_ring(priv, &priv->tx_ring[i], base_tx_qpn + i, 957 if (mlx4_en_create_tx_ring(priv, &priv->tx_ring[i], priv->base_tx_qpn + i,
953 prof->tx_ring_size, TXBB_SIZE)) 958 prof->tx_ring_size, TXBB_SIZE))
954 goto err; 959 goto err;
955 } 960 }
@@ -969,7 +974,6 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv)
969 974
970err: 975err:
971 en_err(priv, "Failed to allocate NIC resources\n"); 976 en_err(priv, "Failed to allocate NIC resources\n");
972 mlx4_qp_release_range(priv->mdev->dev, base_tx_qpn, priv->tx_ring_num);
973 return -ENOMEM; 977 return -ENOMEM;
974} 978}
975 979
@@ -1204,9 +1208,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
1204 en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); 1208 en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num);
1205 1209
1206 /* Configure port */ 1210 /* Configure port */
1211 mlx4_en_calc_rx_buf(dev);
1207 err = mlx4_SET_PORT_general(mdev->dev, priv->port, 1212 err = mlx4_SET_PORT_general(mdev->dev, priv->port,
1208 MLX4_EN_MIN_MTU, 1213 priv->rx_skb_size + ETH_FCS_LEN,
1209 0, 0, 0, 0); 1214 prof->tx_pause, prof->tx_ppp,
1215 prof->rx_pause, prof->rx_ppp);
1210 if (err) { 1216 if (err) {
1211 en_err(priv, "Failed setting port general configurations " 1217 en_err(priv, "Failed setting port general configurations "
1212 "for port %d, with error %d\n", priv->port, err); 1218 "for port %d, with error %d\n", priv->port, err);
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index ee6f4fe00837..a0313de122de 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -1975,6 +1975,8 @@ slave_start:
1975 if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && 1975 if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) &&
1976 !mlx4_is_mfunc(dev)) { 1976 !mlx4_is_mfunc(dev)) {
1977 dev->flags &= ~MLX4_FLAG_MSI_X; 1977 dev->flags &= ~MLX4_FLAG_MSI_X;
1978 dev->caps.num_comp_vectors = 1;
1979 dev->caps.comp_pool = 0;
1978 pci_disable_msix(pdev); 1980 pci_disable_msix(pdev);
1979 err = mlx4_setup_hca(dev); 1981 err = mlx4_setup_hca(dev);
1980 } 1982 }
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 6ae350921b1a..225c20d47900 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -495,6 +495,7 @@ struct mlx4_en_priv {
495 int vids[128]; 495 int vids[128];
496 bool wol; 496 bool wol;
497 struct device *ddev; 497 struct device *ddev;
498 int base_tx_qpn;
498 499
499#ifdef CONFIG_MLX4_EN_DCB 500#ifdef CONFIG_MLX4_EN_DCB
500 struct ieee_ets ets; 501 struct ieee_ets ets;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 46e77a2c5121..ad98f4d7919d 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -479,7 +479,7 @@ qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
479 479
480 for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) { 480 for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) {
481 pfn = pci_info[i].id; 481 pfn = pci_info[i].id;
482 if (pfn > QLCNIC_MAX_PCI_FUNC) { 482 if (pfn >= QLCNIC_MAX_PCI_FUNC) {
483 ret = QL_STATUS_INVALID_PARAM; 483 ret = QL_STATUS_INVALID_PARAM;
484 goto err_eswitch; 484 goto err_eswitch;
485 } 485 }
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 */
1014static int sh_eth_rx(struct net_device *ndev) 1014static 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 = {
161static struct phy_driver ks8001_driver = { 161static 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
175static struct phy_driver ksz9021_driver = { 175static 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");
240MODULE_LICENSE("GPL"); 240MODULE_LICENSE("GPL");
241 241
242static struct mdio_device_id __maybe_unused micrel_tbl[] = { 242static 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/ipheth.c b/drivers/net/usb/ipheth.c
index 964031e3da87..a28a983d465e 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -59,6 +59,7 @@
59#define USB_PRODUCT_IPHONE_3G 0x1292 59#define USB_PRODUCT_IPHONE_3G 0x1292
60#define USB_PRODUCT_IPHONE_3GS 0x1294 60#define USB_PRODUCT_IPHONE_3GS 0x1294
61#define USB_PRODUCT_IPHONE_4 0x1297 61#define USB_PRODUCT_IPHONE_4 0x1297
62#define USB_PRODUCT_IPAD 0x129a
62#define USB_PRODUCT_IPHONE_4_VZW 0x129c 63#define USB_PRODUCT_IPHONE_4_VZW 0x129c
63#define USB_PRODUCT_IPHONE_4S 0x12a0 64#define USB_PRODUCT_IPHONE_4S 0x12a0
64 65
@@ -101,6 +102,10 @@ static struct usb_device_id ipheth_table[] = {
101 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, 102 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
102 IPHETH_USBINTF_PROTO) }, 103 IPHETH_USBINTF_PROTO) },
103 { USB_DEVICE_AND_INTERFACE_INFO( 104 { USB_DEVICE_AND_INTERFACE_INFO(
105 USB_VENDOR_APPLE, USB_PRODUCT_IPAD,
106 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
107 IPHETH_USBINTF_PROTO) },
108 { USB_DEVICE_AND_INTERFACE_INFO(
104 USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4_VZW, 109 USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4_VZW,
105 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, 110 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
106 IPHETH_USBINTF_PROTO) }, 111 IPHETH_USBINTF_PROTO) },
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 3b206786b5e7..3767a1225860 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -257,29 +257,6 @@ err:
257 return rv; 257 return rv;
258} 258}
259 259
260/* Gobi devices uses identical class/protocol codes for all interfaces regardless
261 * of function. Some of these are CDC ACM like and have the exact same endpoints
262 * we are looking for. This leaves two possible strategies for identifying the
263 * correct interface:
264 * a) hardcoding interface number, or
265 * b) use the fact that the wwan interface is the only one lacking additional
266 * (CDC functional) descriptors
267 *
268 * Let's see if we can get away with the generic b) solution.
269 */
270static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf)
271{
272 int rv = -EINVAL;
273
274 /* ignore any interface with additional descriptors */
275 if (intf->cur_altsetting->extralen)
276 goto err;
277
278 rv = qmi_wwan_bind_shared(dev, intf);
279err:
280 return rv;
281}
282
283static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf) 260static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf)
284{ 261{
285 struct usb_driver *subdriver = (void *)dev->data[0]; 262 struct usb_driver *subdriver = (void *)dev->data[0];
@@ -347,15 +324,15 @@ static const struct driver_info qmi_wwan_shared = {
347 .manage_power = qmi_wwan_manage_power, 324 .manage_power = qmi_wwan_manage_power,
348}; 325};
349 326
350static const struct driver_info qmi_wwan_gobi = { 327static const struct driver_info qmi_wwan_force_int0 = {
351 .description = "Qualcomm Gobi wwan/QMI device", 328 .description = "Qualcomm WWAN/QMI device",
352 .flags = FLAG_WWAN, 329 .flags = FLAG_WWAN,
353 .bind = qmi_wwan_bind_gobi, 330 .bind = qmi_wwan_bind_shared,
354 .unbind = qmi_wwan_unbind_shared, 331 .unbind = qmi_wwan_unbind_shared,
355 .manage_power = qmi_wwan_manage_power, 332 .manage_power = qmi_wwan_manage_power,
333 .data = BIT(0), /* interface whitelist bitmap */
356}; 334};
357 335
358/* ZTE suck at making USB descriptors */
359static const struct driver_info qmi_wwan_force_int1 = { 336static const struct driver_info qmi_wwan_force_int1 = {
360 .description = "Qualcomm WWAN/QMI device", 337 .description = "Qualcomm WWAN/QMI device",
361 .flags = FLAG_WWAN, 338 .flags = FLAG_WWAN,
@@ -365,6 +342,15 @@ static const struct driver_info qmi_wwan_force_int1 = {
365 .data = BIT(1), /* interface whitelist bitmap */ 342 .data = BIT(1), /* interface whitelist bitmap */
366}; 343};
367 344
345static const struct driver_info qmi_wwan_force_int3 = {
346 .description = "Qualcomm WWAN/QMI device",
347 .flags = FLAG_WWAN,
348 .bind = qmi_wwan_bind_shared,
349 .unbind = qmi_wwan_unbind_shared,
350 .manage_power = qmi_wwan_manage_power,
351 .data = BIT(3), /* interface whitelist bitmap */
352};
353
368static const struct driver_info qmi_wwan_force_int4 = { 354static const struct driver_info qmi_wwan_force_int4 = {
369 .description = "Qualcomm WWAN/QMI device", 355 .description = "Qualcomm WWAN/QMI device",
370 .flags = FLAG_WWAN, 356 .flags = FLAG_WWAN,
@@ -390,16 +376,23 @@ static const struct driver_info qmi_wwan_force_int4 = {
390static const struct driver_info qmi_wwan_sierra = { 376static const struct driver_info qmi_wwan_sierra = {
391 .description = "Sierra Wireless wwan/QMI device", 377 .description = "Sierra Wireless wwan/QMI device",
392 .flags = FLAG_WWAN, 378 .flags = FLAG_WWAN,
393 .bind = qmi_wwan_bind_gobi, 379 .bind = qmi_wwan_bind_shared,
394 .unbind = qmi_wwan_unbind_shared, 380 .unbind = qmi_wwan_unbind_shared,
395 .manage_power = qmi_wwan_manage_power, 381 .manage_power = qmi_wwan_manage_power,
396 .data = BIT(8) | BIT(19), /* interface whitelist bitmap */ 382 .data = BIT(8) | BIT(19), /* interface whitelist bitmap */
397}; 383};
398 384
399#define HUAWEI_VENDOR_ID 0x12D1 385#define HUAWEI_VENDOR_ID 0x12D1
386
387/* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */
388#define QMI_GOBI1K_DEVICE(vend, prod) \
389 USB_DEVICE(vend, prod), \
390 .driver_info = (unsigned long)&qmi_wwan_force_int3
391
392/* Gobi 2000 and Gobi 3000 QMI/wwan interface number is 0 according to qcserial */
400#define QMI_GOBI_DEVICE(vend, prod) \ 393#define QMI_GOBI_DEVICE(vend, prod) \
401 USB_DEVICE(vend, prod), \ 394 USB_DEVICE(vend, prod), \
402 .driver_info = (unsigned long)&qmi_wwan_gobi 395 .driver_info = (unsigned long)&qmi_wwan_force_int0
403 396
404static const struct usb_device_id products[] = { 397static const struct usb_device_id products[] = {
405 { /* Huawei E392, E398 and possibly others sharing both device id and more... */ 398 { /* Huawei E392, E398 and possibly others sharing both device id and more... */
@@ -510,20 +503,24 @@ static const struct usb_device_id products[] = {
510 .bInterfaceProtocol = 0xff, 503 .bInterfaceProtocol = 0xff,
511 .driver_info = (unsigned long)&qmi_wwan_sierra, 504 .driver_info = (unsigned long)&qmi_wwan_sierra,
512 }, 505 },
513 {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 506
514 {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ 507 /* Gobi 1000 devices */
515 {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ 508 {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
516 {QMI_GOBI_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ 509 {QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
517 {QMI_GOBI_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ 510 {QMI_GOBI1K_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
518 {QMI_GOBI_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ 511 {QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
519 {QMI_GOBI_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ 512 {QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
520 {QMI_GOBI_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ 513 {QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
521 {QMI_GOBI_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ 514 {QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
522 {QMI_GOBI_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ 515 {QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
523 {QMI_GOBI_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ 516 {QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
524 {QMI_GOBI_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ 517 {QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
525 {QMI_GOBI_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ 518 {QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
526 {QMI_GOBI_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */ 519 {QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
520 {QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
521 {QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
522
523 /* Gobi 2000 and 3000 devices */
527 {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ 524 {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
528 {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ 525 {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */
529 {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ 526 {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 9f58330f1312..aba769d77459 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net)
796 if (info->manage_power) { 796 if (info->manage_power) {
797 retval = info->manage_power(dev, 1); 797 retval = info->manage_power(dev, 1);
798 if (retval < 0) 798 if (retval < 0)
799 goto done; 799 goto done_manage_power_error;
800 usb_autopm_put_interface(dev->intf); 800 usb_autopm_put_interface(dev->intf);
801 } 801 }
802 return retval; 802 return retval;
803 803
804done_manage_power_error:
805 clear_bit(EVENT_DEV_OPEN, &dev->flags);
804done: 806done:
805 usb_autopm_put_interface(dev->intf); 807 usb_autopm_put_interface(dev->intf);
806done_nopm: 808done_nopm:
@@ -876,9 +878,9 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
876{ 878{
877 struct usbnet *dev = netdev_priv(net); 879 struct usbnet *dev = netdev_priv(net);
878 880
879 strncpy (info->driver, dev->driver_name, sizeof info->driver); 881 strlcpy (info->driver, dev->driver_name, sizeof info->driver);
880 strncpy (info->version, DRIVER_VERSION, sizeof info->version); 882 strlcpy (info->version, DRIVER_VERSION, sizeof info->version);
881 strncpy (info->fw_version, dev->driver_info->description, 883 strlcpy (info->fw_version, dev->driver_info->description,
882 sizeof info->fw_version); 884 sizeof info->fw_version);
883 usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info); 885 usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info);
884} 886}
@@ -1202,6 +1204,21 @@ deferred:
1202} 1204}
1203EXPORT_SYMBOL_GPL(usbnet_start_xmit); 1205EXPORT_SYMBOL_GPL(usbnet_start_xmit);
1204 1206
1207static void rx_alloc_submit(struct usbnet *dev, gfp_t flags)
1208{
1209 struct urb *urb;
1210 int i;
1211
1212 /* don't refill the queue all at once */
1213 for (i = 0; i < 10 && dev->rxq.qlen < RX_QLEN(dev); i++) {
1214 urb = usb_alloc_urb(0, flags);
1215 if (urb != NULL) {
1216 if (rx_submit(dev, urb, flags) == -ENOLINK)
1217 return;
1218 }
1219 }
1220}
1221
1205/*-------------------------------------------------------------------------*/ 1222/*-------------------------------------------------------------------------*/
1206 1223
1207// tasklet (work deferred from completions, in_irq) or timer 1224// tasklet (work deferred from completions, in_irq) or timer
@@ -1241,26 +1258,14 @@ static void usbnet_bh (unsigned long param)
1241 !timer_pending (&dev->delay) && 1258 !timer_pending (&dev->delay) &&
1242 !test_bit (EVENT_RX_HALT, &dev->flags)) { 1259 !test_bit (EVENT_RX_HALT, &dev->flags)) {
1243 int temp = dev->rxq.qlen; 1260 int temp = dev->rxq.qlen;
1244 int qlen = RX_QLEN (dev); 1261
1245 1262 if (temp < RX_QLEN(dev)) {
1246 if (temp < qlen) { 1263 rx_alloc_submit(dev, GFP_ATOMIC);
1247 struct urb *urb;
1248 int i;
1249
1250 // don't refill the queue all at once
1251 for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) {
1252 urb = usb_alloc_urb (0, GFP_ATOMIC);
1253 if (urb != NULL) {
1254 if (rx_submit (dev, urb, GFP_ATOMIC) ==
1255 -ENOLINK)
1256 return;
1257 }
1258 }
1259 if (temp != dev->rxq.qlen) 1264 if (temp != dev->rxq.qlen)
1260 netif_dbg(dev, link, dev->net, 1265 netif_dbg(dev, link, dev->net,
1261 "rxqlen %d --> %d\n", 1266 "rxqlen %d --> %d\n",
1262 temp, dev->rxq.qlen); 1267 temp, dev->rxq.qlen);
1263 if (dev->rxq.qlen < qlen) 1268 if (dev->rxq.qlen < RX_QLEN(dev))
1264 tasklet_schedule (&dev->bh); 1269 tasklet_schedule (&dev->bh);
1265 } 1270 }
1266 if (dev->txq.qlen < TX_QLEN (dev)) 1271 if (dev->txq.qlen < TX_QLEN (dev))
@@ -1513,6 +1518,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
1513 spin_lock_irq(&dev->txq.lock); 1518 spin_lock_irq(&dev->txq.lock);
1514 /* don't autosuspend while transmitting */ 1519 /* don't autosuspend while transmitting */
1515 if (dev->txq.qlen && PMSG_IS_AUTO(message)) { 1520 if (dev->txq.qlen && PMSG_IS_AUTO(message)) {
1521 dev->suspend_count--;
1516 spin_unlock_irq(&dev->txq.lock); 1522 spin_unlock_irq(&dev->txq.lock);
1517 return -EBUSY; 1523 return -EBUSY;
1518 } else { 1524 } else {
@@ -1569,6 +1575,13 @@ int usbnet_resume (struct usb_interface *intf)
1569 spin_unlock_irq(&dev->txq.lock); 1575 spin_unlock_irq(&dev->txq.lock);
1570 1576
1571 if (test_bit(EVENT_DEV_OPEN, &dev->flags)) { 1577 if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
1578 /* handle remote wakeup ASAP */
1579 if (!dev->wait &&
1580 netif_device_present(dev->net) &&
1581 !timer_pending(&dev->delay) &&
1582 !test_bit(EVENT_RX_HALT, &dev->flags))
1583 rx_alloc_submit(dev, GFP_KERNEL);
1584
1572 if (!(dev->txq.qlen >= TX_QLEN(dev))) 1585 if (!(dev->txq.qlen >= TX_QLEN(dev)))
1573 netif_tx_wake_all_queues(dev->net); 1586 netif_tx_wake_all_queues(dev->net);
1574 tasklet_schedule (&dev->bh); 1587 tasklet_schedule (&dev->bh);
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 520a4b2eb9cc..a747c632597a 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 a277cf6f339d..4866550ddd96 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
219struct ath_buf_state { 220struct 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 7db1890448f2..1c68e564f503 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -784,13 +784,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah)
784 784
785u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) 785u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
786{ 786{
787 struct ath_common *common = ath9k_hw_common(ah);
788 int i = 0;
789
787 REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); 790 REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
788 udelay(100); 791 udelay(100);
789 REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); 792 REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
790 793
791 while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) 794 while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) {
795
792 udelay(100); 796 udelay(100);
793 797
798 if (WARN_ON_ONCE(i >= 100)) {
799 ath_err(common, "PLL4 meaurement not done\n");
800 break;
801 }
802
803 i++;
804 }
805
794 return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; 806 return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3;
795} 807}
796EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); 808EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 4de4473776ac..dac1a2709e3c 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -971,6 +971,15 @@ void ath_hw_pll_work(struct work_struct *work)
971 hw_pll_work.work); 971 hw_pll_work.work);
972 u32 pll_sqsum; 972 u32 pll_sqsum;
973 973
974 /*
975 * ensure that the PLL WAR is executed only
976 * after the STA is associated (or) if the
977 * beaconing had started in interfaces that
978 * uses beacons.
979 */
980 if (!(sc->sc_flags & SC_OP_BEACONS))
981 return;
982
974 if (AR_SREV_9485(sc->sc_ah)) { 983 if (AR_SREV_9485(sc->sc_ah)) {
975 984
976 ath9k_ps_wakeup(sc); 985 ath9k_ps_wakeup(sc);
@@ -1443,15 +1452,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1443 } 1452 }
1444 } 1453 }
1445 1454
1446 if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
1447 ((vif->type == NL80211_IFTYPE_ADHOC) &&
1448 sc->nvifs > 0)) {
1449 ath_err(common, "Cannot create ADHOC interface when other"
1450 " interfaces already exist.\n");
1451 ret = -EINVAL;
1452 goto out;
1453 }
1454
1455 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); 1455 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
1456 1456
1457 sc->nvifs++; 1457 sc->nvifs++;
@@ -1476,15 +1476,6 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1476 mutex_lock(&sc->mutex); 1476 mutex_lock(&sc->mutex);
1477 ath9k_ps_wakeup(sc); 1477 ath9k_ps_wakeup(sc);
1478 1478
1479 /* See if new interface type is valid. */
1480 if ((new_type == NL80211_IFTYPE_ADHOC) &&
1481 (sc->nvifs > 1)) {
1482 ath_err(common, "When using ADHOC, it must be the only"
1483 " interface.\n");
1484 ret = -EINVAL;
1485 goto out;
1486 }
1487
1488 if (ath9k_uses_beacons(new_type) && 1479 if (ath9k_uses_beacons(new_type) &&
1489 !ath9k_uses_beacons(vif->type)) { 1480 !ath9k_uses_beacons(vif->type)) {
1490 if (sc->nbcnvifs >= ATH_BCBUF) { 1481 if (sc->nbcnvifs >= ATH_BCBUF) {
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index d59dd01d6cde..4d571394c7a8 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
1799u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) 1804u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index e7c157e5ebeb..7f97dec8534d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -2239,6 +2239,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
2239 return count; 2239 return count;
2240} 2240}
2241 2241
2242#ifdef CONFIG_IWLWIFI_DEBUG
2242static ssize_t iwl_dbgfs_log_event_read(struct file *file, 2243static ssize_t iwl_dbgfs_log_event_read(struct file *file,
2243 char __user *user_buf, 2244 char __user *user_buf,
2244 size_t count, loff_t *ppos) 2245 size_t count, loff_t *ppos)
@@ -2276,6 +2277,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
2276 2277
2277 return count; 2278 return count;
2278} 2279}
2280#endif
2279 2281
2280static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file, 2282static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file,
2281 char __user *user_buf, 2283 char __user *user_buf,
@@ -2345,7 +2347,9 @@ DEBUGFS_READ_FILE_OPS(bt_traffic);
2345DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); 2347DEBUGFS_READ_WRITE_FILE_OPS(protection_mode);
2346DEBUGFS_READ_FILE_OPS(reply_tx_error); 2348DEBUGFS_READ_FILE_OPS(reply_tx_error);
2347DEBUGFS_WRITE_FILE_OPS(echo_test); 2349DEBUGFS_WRITE_FILE_OPS(echo_test);
2350#ifdef CONFIG_IWLWIFI_DEBUG
2348DEBUGFS_READ_WRITE_FILE_OPS(log_event); 2351DEBUGFS_READ_WRITE_FILE_OPS(log_event);
2352#endif
2349DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled); 2353DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled);
2350 2354
2351/* 2355/*
@@ -2405,7 +2409,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
2405 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); 2409 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
2406 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); 2410 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
2407 DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR); 2411 DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR);
2412#ifdef CONFIG_IWLWIFI_DEBUG
2408 DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR); 2413 DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR);
2414#endif
2409 2415
2410 if (iwl_advanced_bt_coexist(priv)) 2416 if (iwl_advanced_bt_coexist(priv))
2411 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); 2417 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 015fec3371a0..ce61b6fae1c9 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;
1597error:
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}
1604EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); 1601EXPORT_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 }
174done: 170done:
175 dev_kfree_skb_any(skb); 171 dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
index 8173ab66066d..89f9a2a45de3 100644
--- a/drivers/net/wireless/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -27,6 +27,17 @@ int mwifiex_set_secure_params(struct mwifiex_private *priv,
27 struct cfg80211_ap_settings *params) { 27 struct cfg80211_ap_settings *params) {
28 int i; 28 int i;
29 29
30 if (!params->privacy) {
31 bss_config->protocol = PROTOCOL_NO_SECURITY;
32 bss_config->key_mgmt = KEY_MGMT_NONE;
33 bss_config->wpa_cfg.length = 0;
34 priv->sec_info.wep_enabled = 0;
35 priv->sec_info.wpa_enabled = 0;
36 priv->sec_info.wpa2_enabled = 0;
37
38 return 0;
39 }
40
30 switch (params->auth_type) { 41 switch (params->auth_type) {
31 case NL80211_AUTHTYPE_OPEN_SYSTEM: 42 case NL80211_AUTHTYPE_OPEN_SYSTEM:
32 bss_config->auth_mode = WLAN_AUTH_OPEN; 43 bss_config->auth_mode = WLAN_AUTH_OPEN;
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 2e9e6af21362..dfcd02ab6cae 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2110,7 +2110,7 @@ resize_buf:
2110 while (check_bssid_list_item(bssid, bssid_len, buf, len)) { 2110 while (check_bssid_list_item(bssid, bssid_len, buf, len)) {
2111 if (rndis_bss_info_update(usbdev, bssid) && match_bssid && 2111 if (rndis_bss_info_update(usbdev, bssid) && match_bssid &&
2112 matched) { 2112 matched) {
2113 if (!ether_addr_equal(bssid->mac, match_bssid)) 2113 if (ether_addr_equal(bssid->mac, match_bssid))
2114 *matched = true; 2114 *matched = true;
2115 } 2115 }
2116 2116
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
874out: 874out:
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
78static void wl1251_spi_wake(struct wl1251 *wl) 80static 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
132static void wl1251_spi_reset_wake(struct wl1251 *wl) 136static void wl1251_spi_reset_wake(struct wl1251 *wl)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 2027afe405fe..30899901aef5 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1935,14 +1935,14 @@ static int __devexit xennet_remove(struct xenbus_device *dev)
1935 1935
1936 dev_dbg(&dev->dev, "%s\n", dev->nodename); 1936 dev_dbg(&dev->dev, "%s\n", dev->nodename);
1937 1937
1938 unregister_netdev(info->netdev);
1939
1940 xennet_disconnect_backend(info); 1938 xennet_disconnect_backend(info);
1941 1939
1942 del_timer_sync(&info->rx_refill_timer);
1943
1944 xennet_sysfs_delif(info->netdev); 1940 xennet_sysfs_delif(info->netdev);
1945 1941
1942 unregister_netdev(info->netdev);
1943
1944 del_timer_sync(&info->rx_refill_timer);
1945
1946 free_percpu(info->stats); 1946 free_percpu(info->stats);
1947 1947
1948 free_netdev(info->netdev); 1948 free_netdev(info->netdev);