diff options
85 files changed, 529 insertions, 310 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index ad591bd240ec..10308cd8a7ed 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = { | |||
63 | 63 | ||
64 | /* Atheros AR3011 with sflash firmware*/ | 64 | /* Atheros AR3011 with sflash firmware*/ |
65 | { USB_DEVICE(0x0CF3, 0x3002) }, | 65 | { USB_DEVICE(0x0CF3, 0x3002) }, |
66 | { USB_DEVICE(0x0CF3, 0xE019) }, | ||
66 | { USB_DEVICE(0x13d3, 0x3304) }, | 67 | { USB_DEVICE(0x13d3, 0x3304) }, |
67 | { USB_DEVICE(0x0930, 0x0215) }, | 68 | { USB_DEVICE(0x0930, 0x0215) }, |
68 | { USB_DEVICE(0x0489, 0xE03D) }, | 69 | { USB_DEVICE(0x0489, 0xE03D) }, |
@@ -77,6 +78,7 @@ static struct usb_device_id ath3k_table[] = { | |||
77 | { USB_DEVICE(0x04CA, 0x3005) }, | 78 | { USB_DEVICE(0x04CA, 0x3005) }, |
78 | { USB_DEVICE(0x13d3, 0x3362) }, | 79 | { USB_DEVICE(0x13d3, 0x3362) }, |
79 | { USB_DEVICE(0x0CF3, 0xE004) }, | 80 | { USB_DEVICE(0x0CF3, 0xE004) }, |
81 | { USB_DEVICE(0x0930, 0x0219) }, | ||
80 | 82 | ||
81 | /* Atheros AR5BBU12 with sflash firmware */ | 83 | /* Atheros AR5BBU12 with sflash firmware */ |
82 | { USB_DEVICE(0x0489, 0xE02C) }, | 84 | { USB_DEVICE(0x0489, 0xE02C) }, |
@@ -101,6 +103,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { | |||
101 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, | 103 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, |
102 | { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, | 104 | { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, |
103 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, | 105 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, |
106 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | ||
104 | 107 | ||
105 | /* Atheros AR5BBU22 with sflash firmware */ | 108 | /* Atheros AR5BBU22 with sflash firmware */ |
106 | { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 }, | 109 | { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 }, |
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h index 94f2d65131c4..27068d149380 100644 --- a/drivers/bluetooth/btmrvl_drv.h +++ b/drivers/bluetooth/btmrvl_drv.h | |||
@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv); | |||
136 | 136 | ||
137 | void btmrvl_interrupt(struct btmrvl_private *priv); | 137 | void btmrvl_interrupt(struct btmrvl_private *priv); |
138 | 138 | ||
139 | void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb); | 139 | bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb); |
140 | int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); | 140 | int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); |
141 | 141 | ||
142 | int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); | 142 | int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); |
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 681ca9d18e12..dc304def8400 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c | |||
@@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv) | |||
44 | } | 44 | } |
45 | EXPORT_SYMBOL_GPL(btmrvl_interrupt); | 45 | EXPORT_SYMBOL_GPL(btmrvl_interrupt); |
46 | 46 | ||
47 | void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb) | 47 | bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb) |
48 | { | 48 | { |
49 | struct hci_event_hdr *hdr = (void *) skb->data; | 49 | struct hci_event_hdr *hdr = (void *) skb->data; |
50 | struct hci_ev_cmd_complete *ec; | 50 | struct hci_ev_cmd_complete *ec; |
51 | u16 opcode, ocf; | 51 | u16 opcode, ocf, ogf; |
52 | 52 | ||
53 | if (hdr->evt == HCI_EV_CMD_COMPLETE) { | 53 | if (hdr->evt == HCI_EV_CMD_COMPLETE) { |
54 | ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE); | 54 | ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE); |
55 | opcode = __le16_to_cpu(ec->opcode); | 55 | opcode = __le16_to_cpu(ec->opcode); |
56 | ocf = hci_opcode_ocf(opcode); | 56 | ocf = hci_opcode_ocf(opcode); |
57 | ogf = hci_opcode_ogf(opcode); | ||
58 | |||
57 | if (ocf == BT_CMD_MODULE_CFG_REQ && | 59 | if (ocf == BT_CMD_MODULE_CFG_REQ && |
58 | priv->btmrvl_dev.sendcmdflag) { | 60 | priv->btmrvl_dev.sendcmdflag) { |
59 | priv->btmrvl_dev.sendcmdflag = false; | 61 | priv->btmrvl_dev.sendcmdflag = false; |
60 | priv->adapter->cmd_complete = true; | 62 | priv->adapter->cmd_complete = true; |
61 | wake_up_interruptible(&priv->adapter->cmd_wait_q); | 63 | wake_up_interruptible(&priv->adapter->cmd_wait_q); |
62 | } | 64 | } |
65 | |||
66 | if (ogf == OGF) { | ||
67 | BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf); | ||
68 | kfree_skb(skb); | ||
69 | return false; | ||
70 | } | ||
63 | } | 71 | } |
72 | |||
73 | return true; | ||
64 | } | 74 | } |
65 | EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt); | 75 | EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt); |
66 | 76 | ||
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index a853244e7fd7..0cd61d9f07cd 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c | |||
@@ -562,10 +562,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) | |||
562 | skb_put(skb, buf_len); | 562 | skb_put(skb, buf_len); |
563 | skb_pull(skb, SDIO_HEADER_LEN); | 563 | skb_pull(skb, SDIO_HEADER_LEN); |
564 | 564 | ||
565 | if (type == HCI_EVENT_PKT) | 565 | if (type == HCI_EVENT_PKT) { |
566 | btmrvl_check_evtpkt(priv, skb); | 566 | if (btmrvl_check_evtpkt(priv, skb)) |
567 | hci_recv_frame(skb); | ||
568 | } else | ||
569 | hci_recv_frame(skb); | ||
567 | 570 | ||
568 | hci_recv_frame(skb); | ||
569 | hdev->stat.byte_rx += buf_len; | 571 | hdev->stat.byte_rx += buf_len; |
570 | break; | 572 | break; |
571 | 573 | ||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index c9463af8e564..83ebb241bfcc 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -125,6 +125,7 @@ static struct usb_device_id blacklist_table[] = { | |||
125 | 125 | ||
126 | /* Atheros 3011 with sflash firmware */ | 126 | /* Atheros 3011 with sflash firmware */ |
127 | { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, | 127 | { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, |
128 | { USB_DEVICE(0x0cf3, 0xe019), .driver_info = BTUSB_IGNORE }, | ||
128 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, | 129 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, |
129 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, | 130 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, |
130 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, | 131 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, |
@@ -139,6 +140,7 @@ static struct usb_device_id blacklist_table[] = { | |||
139 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, | 140 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, |
140 | { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, | 141 | { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, |
141 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, | 142 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, |
143 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | ||
142 | 144 | ||
143 | /* Atheros AR5BBU12 with sflash firmware */ | 145 | /* Atheros AR5BBU12 with sflash firmware */ |
144 | { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, | 146 | { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, |
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/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 | */ |
2522 | static noinline u16 bnx2x_tx_split(struct bnx2x *bp, | 2520 | static 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 | ||
7663 | static 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 | } | ||
7662 | static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, | 7685 | static 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 | ||
8203 | static 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 | |||
8226 | static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, | 8232 | static 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 | } |
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 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 | ||
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 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 | ||
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.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) |
291 | static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring) | 291 | static 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 | */ |
1066 | static inline bool ixgbe_rx_is_fcoe(struct ixgbe_adapter *adapter, | 1066 | static 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 | ||
934 | int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) | 939 | int 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 | ||
970 | err: | 975 | err: |
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 */ |
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/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 | */ | ||
270 | static 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); | ||
279 | err: | ||
280 | return rv; | ||
281 | } | ||
282 | |||
283 | static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf) | 260 | static 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 | ||
350 | static const struct driver_info qmi_wwan_gobi = { | 327 | static 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 */ | ||
359 | static const struct driver_info qmi_wwan_force_int1 = { | 336 | static 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 | ||
345 | static 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 | |||
368 | static const struct driver_info qmi_wwan_force_int4 = { | 354 | static 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 = { | |||
390 | static const struct driver_info qmi_wwan_sierra = { | 376 | static 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 | ||
404 | static const struct usb_device_id products[] = { | 397 | static 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 | ||
804 | done_manage_power_error: | ||
805 | clear_bit(EVENT_DEV_OPEN, &dev->flags); | ||
804 | done: | 806 | done: |
805 | usb_autopm_put_interface(dev->intf); | 807 | usb_autopm_put_interface(dev->intf); |
806 | done_nopm: | 808 | done_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 | } |
1203 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); | 1205 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); |
1204 | 1206 | ||
1207 | static 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 | ||
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 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 | ||
785 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) | 785 | u32 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 | } |
796 | EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); | 808 | EXPORT_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 | ||
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/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 | ||
2242 | static ssize_t iwl_dbgfs_log_event_read(struct file *file, | 2243 | static 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 | ||
2280 | static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file, | 2282 | static 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); | |||
2345 | DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); | 2347 | DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); |
2346 | DEBUGFS_READ_FILE_OPS(reply_tx_error); | 2348 | DEBUGFS_READ_FILE_OPS(reply_tx_error); |
2347 | DEBUGFS_WRITE_FILE_OPS(echo_test); | 2349 | DEBUGFS_WRITE_FILE_OPS(echo_test); |
2350 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
2348 | DEBUGFS_READ_WRITE_FILE_OPS(log_event); | 2351 | DEBUGFS_READ_WRITE_FILE_OPS(log_event); |
2352 | #endif | ||
2349 | DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled); | 2353 | DEBUGFS_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; |
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/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 | ||
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) |
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); |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 94dbd25caa30..112156f68afb 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -191,7 +191,9 @@ static int vhost_worker(void *data) | |||
191 | struct vhost_dev *dev = data; | 191 | struct vhost_dev *dev = data; |
192 | struct vhost_work *work = NULL; | 192 | struct vhost_work *work = NULL; |
193 | unsigned uninitialized_var(seq); | 193 | unsigned uninitialized_var(seq); |
194 | mm_segment_t oldfs = get_fs(); | ||
194 | 195 | ||
196 | set_fs(USER_DS); | ||
195 | use_mm(dev->mm); | 197 | use_mm(dev->mm); |
196 | 198 | ||
197 | for (;;) { | 199 | for (;;) { |
@@ -229,6 +231,7 @@ static int vhost_worker(void *data) | |||
229 | 231 | ||
230 | } | 232 | } |
231 | unuse_mm(dev->mm); | 233 | unuse_mm(dev->mm); |
234 | set_fs(oldfs); | ||
232 | return 0; | 235 | return 0; |
233 | } | 236 | } |
234 | 237 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b534a1be540a..642cb7355df3 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -225,14 +225,11 @@ enum { | |||
225 | /* device driver is going to provide hardware time stamp */ | 225 | /* device driver is going to provide hardware time stamp */ |
226 | SKBTX_IN_PROGRESS = 1 << 2, | 226 | SKBTX_IN_PROGRESS = 1 << 2, |
227 | 227 | ||
228 | /* ensure the originating sk reference is available on driver level */ | ||
229 | SKBTX_DRV_NEEDS_SK_REF = 1 << 3, | ||
230 | |||
231 | /* device driver supports TX zero-copy buffers */ | 228 | /* device driver supports TX zero-copy buffers */ |
232 | SKBTX_DEV_ZEROCOPY = 1 << 4, | 229 | SKBTX_DEV_ZEROCOPY = 1 << 3, |
233 | 230 | ||
234 | /* generate wifi status information (where possible) */ | 231 | /* generate wifi status information (where possible) */ |
235 | SKBTX_WIFI_STATUS = 1 << 5, | 232 | SKBTX_WIFI_STATUS = 1 << 4, |
236 | }; | 233 | }; |
237 | 234 | ||
238 | /* | 235 | /* |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 66a7b579e31c..3def64ba77fa 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -1144,6 +1144,12 @@ struct extended_inquiry_info { | |||
1144 | __u8 data[240]; | 1144 | __u8 data[240]; |
1145 | } __packed; | 1145 | } __packed; |
1146 | 1146 | ||
1147 | #define HCI_EV_KEY_REFRESH_COMPLETE 0x30 | ||
1148 | struct hci_ev_key_refresh_complete { | ||
1149 | __u8 status; | ||
1150 | __le16 handle; | ||
1151 | } __packed; | ||
1152 | |||
1147 | #define HCI_EV_IO_CAPA_REQUEST 0x31 | 1153 | #define HCI_EV_IO_CAPA_REQUEST 0x31 |
1148 | struct hci_ev_io_capa_request { | 1154 | struct hci_ev_io_capa_request { |
1149 | bdaddr_t bdaddr; | 1155 | bdaddr_t bdaddr; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 1937c7d98304..95e39b6a02ec 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1940,6 +1940,11 @@ enum ieee80211_rate_control_changed { | |||
1940 | * to also unregister the device. If it returns 1, then mac80211 | 1940 | * to also unregister the device. If it returns 1, then mac80211 |
1941 | * will also go through the regular complete restart on resume. | 1941 | * will also go through the regular complete restart on resume. |
1942 | * | 1942 | * |
1943 | * @set_wakeup: Enable or disable wakeup when WoWLAN configuration is | ||
1944 | * modified. The reason is that device_set_wakeup_enable() is | ||
1945 | * supposed to be called when the configuration changes, not only | ||
1946 | * in suspend(). | ||
1947 | * | ||
1943 | * @add_interface: Called when a netdevice attached to the hardware is | 1948 | * @add_interface: Called when a netdevice attached to the hardware is |
1944 | * enabled. Because it is not called for monitor mode devices, @start | 1949 | * enabled. Because it is not called for monitor mode devices, @start |
1945 | * and @stop must be implemented. | 1950 | * and @stop must be implemented. |
@@ -2966,6 +2971,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, | |||
2966 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame | 2971 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame |
2967 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 2972 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
2968 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 2973 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
2974 | * @band: the band to calculate the frame duration on | ||
2969 | * @frame_len: the length of the frame. | 2975 | * @frame_len: the length of the frame. |
2970 | * @rate: the rate at which the frame is going to be transmitted. | 2976 | * @rate: the rate at which the frame is going to be transmitted. |
2971 | * | 2977 | * |
diff --git a/include/net/phonet/gprs.h b/include/net/phonet/gprs.h index 928daf595beb..bcd525e39a0b 100644 --- a/include/net/phonet/gprs.h +++ b/include/net/phonet/gprs.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Author: Rémi Denis-Courmont |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 9ee48cb30179..3d33ecf13327 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
@@ -368,7 +368,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, | |||
368 | const char *sptr = va_arg(ap, const char *); | 368 | const char *sptr = va_arg(ap, const char *); |
369 | uint16_t len = 0; | 369 | uint16_t len = 0; |
370 | if (sptr) | 370 | if (sptr) |
371 | len = min_t(uint16_t, strlen(sptr), | 371 | len = min_t(size_t, strlen(sptr), |
372 | USHRT_MAX); | 372 | USHRT_MAX); |
373 | 373 | ||
374 | errcode = p9pdu_writef(pdu, proto_version, | 374 | errcode = p9pdu_writef(pdu, proto_version, |
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 840e2c64a301..015471d801b4 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -617,6 +617,8 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) | |||
617 | * changes */ | 617 | * changes */ |
618 | if (skb_linearize(skb) < 0) | 618 | if (skb_linearize(skb) < 0) |
619 | goto out; | 619 | goto out; |
620 | /* skb_linearize() possibly changed skb->data */ | ||
621 | tt_query = (struct tt_query_packet *)skb->data; | ||
620 | 622 | ||
621 | tt_len = tt_query->tt_data * sizeof(struct tt_change); | 623 | tt_len = tt_query->tt_data * sizeof(struct tt_change); |
622 | 624 | ||
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index a66c2dcd1088..2ab83d7fb1f8 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -141,13 +141,14 @@ static void tt_orig_list_entry_free_rcu(struct rcu_head *rcu) | |||
141 | struct tt_orig_list_entry *orig_entry; | 141 | struct tt_orig_list_entry *orig_entry; |
142 | 142 | ||
143 | orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); | 143 | orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); |
144 | atomic_dec(&orig_entry->orig_node->tt_size); | ||
145 | orig_node_free_ref(orig_entry->orig_node); | 144 | orig_node_free_ref(orig_entry->orig_node); |
146 | kfree(orig_entry); | 145 | kfree(orig_entry); |
147 | } | 146 | } |
148 | 147 | ||
149 | static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) | 148 | static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) |
150 | { | 149 | { |
150 | /* to avoid race conditions, immediately decrease the tt counter */ | ||
151 | atomic_dec(&orig_entry->orig_node->tt_size); | ||
151 | call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu); | 152 | call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu); |
152 | } | 153 | } |
153 | 154 | ||
@@ -910,7 +911,6 @@ void tt_global_del_orig(struct bat_priv *bat_priv, | |||
910 | } | 911 | } |
911 | spin_unlock_bh(list_lock); | 912 | spin_unlock_bh(list_lock); |
912 | } | 913 | } |
913 | atomic_set(&orig_node->tt_size, 0); | ||
914 | orig_node->tt_initialised = false; | 914 | orig_node->tt_initialised = false; |
915 | } | 915 | } |
916 | 916 | ||
@@ -2031,10 +2031,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) | |||
2031 | { | 2031 | { |
2032 | struct tt_local_entry *tt_local_entry = NULL; | 2032 | struct tt_local_entry *tt_local_entry = NULL; |
2033 | struct tt_global_entry *tt_global_entry = NULL; | 2033 | struct tt_global_entry *tt_global_entry = NULL; |
2034 | bool ret = true; | 2034 | bool ret = false; |
2035 | 2035 | ||
2036 | if (!atomic_read(&bat_priv->ap_isolation)) | 2036 | if (!atomic_read(&bat_priv->ap_isolation)) |
2037 | return false; | 2037 | goto out; |
2038 | 2038 | ||
2039 | tt_local_entry = tt_local_hash_find(bat_priv, dst); | 2039 | tt_local_entry = tt_local_hash_find(bat_priv, dst); |
2040 | if (!tt_local_entry) | 2040 | if (!tt_local_entry) |
@@ -2044,10 +2044,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) | |||
2044 | if (!tt_global_entry) | 2044 | if (!tt_global_entry) |
2045 | goto out; | 2045 | goto out; |
2046 | 2046 | ||
2047 | if (_is_ap_isolated(tt_local_entry, tt_global_entry)) | 2047 | if (!_is_ap_isolated(tt_local_entry, tt_global_entry)) |
2048 | goto out; | 2048 | goto out; |
2049 | 2049 | ||
2050 | ret = false; | 2050 | ret = true; |
2051 | 2051 | ||
2052 | out: | 2052 | out: |
2053 | if (tt_global_entry) | 2053 | if (tt_global_entry) |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 4eefb7f65cf6..94ad124a4ea3 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -3043,6 +3043,50 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct | |||
3043 | hci_dev_unlock(hdev); | 3043 | hci_dev_unlock(hdev); |
3044 | } | 3044 | } |
3045 | 3045 | ||
3046 | static void hci_key_refresh_complete_evt(struct hci_dev *hdev, | ||
3047 | struct sk_buff *skb) | ||
3048 | { | ||
3049 | struct hci_ev_key_refresh_complete *ev = (void *) skb->data; | ||
3050 | struct hci_conn *conn; | ||
3051 | |||
3052 | BT_DBG("%s status %u handle %u", hdev->name, ev->status, | ||
3053 | __le16_to_cpu(ev->handle)); | ||
3054 | |||
3055 | hci_dev_lock(hdev); | ||
3056 | |||
3057 | conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); | ||
3058 | if (!conn) | ||
3059 | goto unlock; | ||
3060 | |||
3061 | if (!ev->status) | ||
3062 | conn->sec_level = conn->pending_sec_level; | ||
3063 | |||
3064 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); | ||
3065 | |||
3066 | if (ev->status && conn->state == BT_CONNECTED) { | ||
3067 | hci_acl_disconn(conn, HCI_ERROR_AUTH_FAILURE); | ||
3068 | hci_conn_put(conn); | ||
3069 | goto unlock; | ||
3070 | } | ||
3071 | |||
3072 | if (conn->state == BT_CONFIG) { | ||
3073 | if (!ev->status) | ||
3074 | conn->state = BT_CONNECTED; | ||
3075 | |||
3076 | hci_proto_connect_cfm(conn, ev->status); | ||
3077 | hci_conn_put(conn); | ||
3078 | } else { | ||
3079 | hci_auth_cfm(conn, ev->status); | ||
3080 | |||
3081 | hci_conn_hold(conn); | ||
3082 | conn->disc_timeout = HCI_DISCONN_TIMEOUT; | ||
3083 | hci_conn_put(conn); | ||
3084 | } | ||
3085 | |||
3086 | unlock: | ||
3087 | hci_dev_unlock(hdev); | ||
3088 | } | ||
3089 | |||
3046 | static inline u8 hci_get_auth_req(struct hci_conn *conn) | 3090 | static inline u8 hci_get_auth_req(struct hci_conn *conn) |
3047 | { | 3091 | { |
3048 | /* If remote requests dedicated bonding follow that lead */ | 3092 | /* If remote requests dedicated bonding follow that lead */ |
@@ -3559,6 +3603,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) | |||
3559 | hci_extended_inquiry_result_evt(hdev, skb); | 3603 | hci_extended_inquiry_result_evt(hdev, skb); |
3560 | break; | 3604 | break; |
3561 | 3605 | ||
3606 | case HCI_EV_KEY_REFRESH_COMPLETE: | ||
3607 | hci_key_refresh_complete_evt(hdev, skb); | ||
3608 | break; | ||
3609 | |||
3562 | case HCI_EV_IO_CAPA_REQUEST: | 3610 | case HCI_EV_IO_CAPA_REQUEST: |
3563 | hci_io_capa_request_evt(hdev, skb); | 3611 | hci_io_capa_request_evt(hdev, skb); |
3564 | break; | 3612 | break; |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 24f144b72a96..4554e80d16a3 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1295,7 +1295,12 @@ static void security_timeout(struct work_struct *work) | |||
1295 | struct l2cap_conn *conn = container_of(work, struct l2cap_conn, | 1295 | struct l2cap_conn *conn = container_of(work, struct l2cap_conn, |
1296 | security_timer.work); | 1296 | security_timer.work); |
1297 | 1297 | ||
1298 | l2cap_conn_del(conn->hcon, ETIMEDOUT); | 1298 | BT_DBG("conn %p", conn); |
1299 | |||
1300 | if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) { | ||
1301 | smp_chan_destroy(conn); | ||
1302 | l2cap_conn_del(conn->hcon, ETIMEDOUT); | ||
1303 | } | ||
1299 | } | 1304 | } |
1300 | 1305 | ||
1301 | static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) | 1306 | static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) |
@@ -2910,12 +2915,14 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) | |||
2910 | while (len >= L2CAP_CONF_OPT_SIZE) { | 2915 | while (len >= L2CAP_CONF_OPT_SIZE) { |
2911 | len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val); | 2916 | len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val); |
2912 | 2917 | ||
2913 | switch (type) { | 2918 | if (type != L2CAP_CONF_RFC) |
2914 | case L2CAP_CONF_RFC: | 2919 | continue; |
2915 | if (olen == sizeof(rfc)) | 2920 | |
2916 | memcpy(&rfc, (void *)val, olen); | 2921 | if (olen != sizeof(rfc)) |
2917 | goto done; | 2922 | break; |
2918 | } | 2923 | |
2924 | memcpy(&rfc, (void *)val, olen); | ||
2925 | goto done; | ||
2919 | } | 2926 | } |
2920 | 2927 | ||
2921 | /* Use sane default values in case a misbehaving remote device | 2928 | /* Use sane default values in case a misbehaving remote device |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 25d220776079..3e5e3362ea00 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -1598,7 +1598,7 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data, | |||
1598 | else | 1598 | else |
1599 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); | 1599 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); |
1600 | 1600 | ||
1601 | if (!conn) { | 1601 | if (!conn || conn->state == BT_OPEN || conn->state == BT_CLOSED) { |
1602 | err = cmd_status(sk, hdev->id, MGMT_OP_DISCONNECT, | 1602 | err = cmd_status(sk, hdev->id, MGMT_OP_DISCONNECT, |
1603 | MGMT_STATUS_NOT_CONNECTED); | 1603 | MGMT_STATUS_NOT_CONNECTED); |
1604 | goto failed; | 1604 | goto failed; |
@@ -1873,6 +1873,22 @@ static void pairing_complete_cb(struct hci_conn *conn, u8 status) | |||
1873 | pairing_complete(cmd, mgmt_status(status)); | 1873 | pairing_complete(cmd, mgmt_status(status)); |
1874 | } | 1874 | } |
1875 | 1875 | ||
1876 | static void le_connect_complete_cb(struct hci_conn *conn, u8 status) | ||
1877 | { | ||
1878 | struct pending_cmd *cmd; | ||
1879 | |||
1880 | BT_DBG("status %u", status); | ||
1881 | |||
1882 | if (!status) | ||
1883 | return; | ||
1884 | |||
1885 | cmd = find_pairing(conn); | ||
1886 | if (!cmd) | ||
1887 | BT_DBG("Unable to find a pending command"); | ||
1888 | else | ||
1889 | pairing_complete(cmd, mgmt_status(status)); | ||
1890 | } | ||
1891 | |||
1876 | static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, | 1892 | static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, |
1877 | u16 len) | 1893 | u16 len) |
1878 | { | 1894 | { |
@@ -1934,6 +1950,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, | |||
1934 | /* For LE, just connecting isn't a proof that the pairing finished */ | 1950 | /* For LE, just connecting isn't a proof that the pairing finished */ |
1935 | if (cp->addr.type == BDADDR_BREDR) | 1951 | if (cp->addr.type == BDADDR_BREDR) |
1936 | conn->connect_cfm_cb = pairing_complete_cb; | 1952 | conn->connect_cfm_cb = pairing_complete_cb; |
1953 | else | ||
1954 | conn->connect_cfm_cb = le_connect_complete_cb; | ||
1937 | 1955 | ||
1938 | conn->security_cfm_cb = pairing_complete_cb; | 1956 | conn->security_cfm_cb = pairing_complete_cb; |
1939 | conn->disconn_cfm_cb = pairing_complete_cb; | 1957 | conn->disconn_cfm_cb = pairing_complete_cb; |
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 6fc7c4708f3e..37df4e9b3896 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -648,7 +648,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb) | |||
648 | 648 | ||
649 | auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM; | 649 | auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM; |
650 | 650 | ||
651 | ret = tk_request(conn, 0, auth, rsp->io_capability, req->io_capability); | 651 | ret = tk_request(conn, 0, auth, req->io_capability, rsp->io_capability); |
652 | if (ret) | 652 | if (ret) |
653 | return SMP_UNSPECIFIED; | 653 | return SMP_UNSPECIFIED; |
654 | 654 | ||
@@ -703,7 +703,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb) | |||
703 | return 0; | 703 | return 0; |
704 | } | 704 | } |
705 | 705 | ||
706 | static u8 smp_ltk_encrypt(struct l2cap_conn *conn) | 706 | static u8 smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level) |
707 | { | 707 | { |
708 | struct smp_ltk *key; | 708 | struct smp_ltk *key; |
709 | struct hci_conn *hcon = conn->hcon; | 709 | struct hci_conn *hcon = conn->hcon; |
@@ -712,6 +712,9 @@ static u8 smp_ltk_encrypt(struct l2cap_conn *conn) | |||
712 | if (!key) | 712 | if (!key) |
713 | return 0; | 713 | return 0; |
714 | 714 | ||
715 | if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated) | ||
716 | return 0; | ||
717 | |||
715 | if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) | 718 | if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) |
716 | return 1; | 719 | return 1; |
717 | 720 | ||
@@ -732,7 +735,7 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) | |||
732 | 735 | ||
733 | hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req); | 736 | hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req); |
734 | 737 | ||
735 | if (smp_ltk_encrypt(conn)) | 738 | if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) |
736 | return 0; | 739 | return 0; |
737 | 740 | ||
738 | if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) | 741 | if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) |
@@ -771,7 +774,7 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level) | |||
771 | return 1; | 774 | return 1; |
772 | 775 | ||
773 | if (hcon->link_mode & HCI_LM_MASTER) | 776 | if (hcon->link_mode & HCI_LM_MASTER) |
774 | if (smp_ltk_encrypt(conn)) | 777 | if (smp_ltk_encrypt(conn, sec_level)) |
775 | goto done; | 778 | goto done; |
776 | 779 | ||
777 | if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) | 780 | if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 0a942fbccc9a..e1144e1617be 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -240,6 +240,7 @@ int br_add_bridge(struct net *net, const char *name) | |||
240 | return -ENOMEM; | 240 | return -ENOMEM; |
241 | 241 | ||
242 | dev_net_set(dev, net); | 242 | dev_net_set(dev, net); |
243 | dev->rtnl_link_ops = &br_link_ops; | ||
243 | 244 | ||
244 | res = register_netdev(dev); | 245 | res = register_netdev(dev); |
245 | if (res) | 246 | if (res) |
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 2080485515f1..fe41260fbf38 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -208,7 +208,7 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[]) | |||
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | 210 | ||
211 | static struct rtnl_link_ops br_link_ops __read_mostly = { | 211 | struct rtnl_link_ops br_link_ops __read_mostly = { |
212 | .kind = "bridge", | 212 | .kind = "bridge", |
213 | .priv_size = sizeof(struct net_bridge), | 213 | .priv_size = sizeof(struct net_bridge), |
214 | .setup = br_dev_setup, | 214 | .setup = br_dev_setup, |
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 1a8ad4fb9a6b..a768b2408edf 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -549,6 +549,7 @@ extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr) | |||
549 | #endif | 549 | #endif |
550 | 550 | ||
551 | /* br_netlink.c */ | 551 | /* br_netlink.c */ |
552 | extern struct rtnl_link_ops br_link_ops; | ||
552 | extern int br_netlink_init(void); | 553 | extern int br_netlink_init(void); |
553 | extern void br_netlink_fini(void); | 554 | extern void br_netlink_fini(void); |
554 | extern void br_ifinfo_notify(int event, struct net_bridge_port *port); | 555 | extern void br_ifinfo_notify(int event, struct net_bridge_port *port); |
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index aa6f716524fd..554b31289607 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c | |||
@@ -4,8 +4,7 @@ | |||
4 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | 4 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com |
5 | * License terms: GNU General Public License (GPL) version 2 | 5 | * License terms: GNU General Public License (GPL) version 2 |
6 | * | 6 | * |
7 | * Borrowed heavily from file: pn_dev.c. Thanks to | 7 | * Borrowed heavily from file: pn_dev.c. Thanks to Remi Denis-Courmont |
8 | * Remi Denis-Courmont <remi.denis-courmont@nokia.com> | ||
9 | * and Sakari Ailus <sakari.ailus@nokia.com> | 8 | * and Sakari Ailus <sakari.ailus@nokia.com> |
10 | */ | 9 | */ |
11 | 10 | ||
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index fb8944355264..78f1cdad5b33 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c | |||
@@ -220,6 +220,7 @@ static void caif_ctrl_cb(struct cflayer *layr, | |||
220 | cfsk_hold, cfsk_put); | 220 | cfsk_hold, cfsk_put); |
221 | cf_sk->sk.sk_state = CAIF_CONNECTED; | 221 | cf_sk->sk.sk_state = CAIF_CONNECTED; |
222 | set_tx_flow_on(cf_sk); | 222 | set_tx_flow_on(cf_sk); |
223 | cf_sk->sk.sk_shutdown = 0; | ||
223 | cf_sk->sk.sk_state_change(&cf_sk->sk); | 224 | cf_sk->sk.sk_state_change(&cf_sk->sk); |
224 | break; | 225 | break; |
225 | 226 | ||
diff --git a/net/can/raw.c b/net/can/raw.c index cde1b4a20f75..46cca3a91d19 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -681,9 +681,6 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
681 | if (err < 0) | 681 | if (err < 0) |
682 | goto free_skb; | 682 | goto free_skb; |
683 | 683 | ||
684 | /* to be able to check the received tx sock reference in raw_rcv() */ | ||
685 | skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF; | ||
686 | |||
687 | skb->dev = dev; | 684 | skb->dev = dev; |
688 | skb->sk = sk; | 685 | skb->sk = sk; |
689 | 686 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index cd0981977f5c..6df214041a5e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2089,25 +2089,6 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features) | |||
2089 | return 0; | 2089 | return 0; |
2090 | } | 2090 | } |
2091 | 2091 | ||
2092 | /* | ||
2093 | * Try to orphan skb early, right before transmission by the device. | ||
2094 | * We cannot orphan skb if tx timestamp is requested or the sk-reference | ||
2095 | * is needed on driver level for other reasons, e.g. see net/can/raw.c | ||
2096 | */ | ||
2097 | static inline void skb_orphan_try(struct sk_buff *skb) | ||
2098 | { | ||
2099 | struct sock *sk = skb->sk; | ||
2100 | |||
2101 | if (sk && !skb_shinfo(skb)->tx_flags) { | ||
2102 | /* skb_tx_hash() wont be able to get sk. | ||
2103 | * We copy sk_hash into skb->rxhash | ||
2104 | */ | ||
2105 | if (!skb->rxhash) | ||
2106 | skb->rxhash = sk->sk_hash; | ||
2107 | skb_orphan(skb); | ||
2108 | } | ||
2109 | } | ||
2110 | |||
2111 | static bool can_checksum_protocol(netdev_features_t features, __be16 protocol) | 2092 | static bool can_checksum_protocol(netdev_features_t features, __be16 protocol) |
2112 | { | 2093 | { |
2113 | return ((features & NETIF_F_GEN_CSUM) || | 2094 | return ((features & NETIF_F_GEN_CSUM) || |
@@ -2193,8 +2174,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
2193 | if (!list_empty(&ptype_all)) | 2174 | if (!list_empty(&ptype_all)) |
2194 | dev_queue_xmit_nit(skb, dev); | 2175 | dev_queue_xmit_nit(skb, dev); |
2195 | 2176 | ||
2196 | skb_orphan_try(skb); | ||
2197 | |||
2198 | features = netif_skb_features(skb); | 2177 | features = netif_skb_features(skb); |
2199 | 2178 | ||
2200 | if (vlan_tx_tag_present(skb) && | 2179 | if (vlan_tx_tag_present(skb) && |
@@ -2304,7 +2283,7 @@ u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb, | |||
2304 | if (skb->sk && skb->sk->sk_hash) | 2283 | if (skb->sk && skb->sk->sk_hash) |
2305 | hash = skb->sk->sk_hash; | 2284 | hash = skb->sk->sk_hash; |
2306 | else | 2285 | else |
2307 | hash = (__force u16) skb->protocol ^ skb->rxhash; | 2286 | hash = (__force u16) skb->protocol; |
2308 | hash = jhash_1word(hash, hashrnd); | 2287 | hash = jhash_1word(hash, hashrnd); |
2309 | 2288 | ||
2310 | return (u16) (((u64) hash * qcount) >> 32) + qoffset; | 2289 | return (u16) (((u64) hash * qcount) >> 32) + qoffset; |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 74c21b924a79..608327661960 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1349,8 +1349,8 @@ static int fib6_walk_continue(struct fib6_walker_t *w) | |||
1349 | if (w->leaf && fn->fn_flags & RTN_RTINFO) { | 1349 | if (w->leaf && fn->fn_flags & RTN_RTINFO) { |
1350 | int err; | 1350 | int err; |
1351 | 1351 | ||
1352 | if (w->count < w->skip) { | 1352 | if (w->skip) { |
1353 | w->count++; | 1353 | w->skip--; |
1354 | continue; | 1354 | continue; |
1355 | } | 1355 | } |
1356 | 1356 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 999a982ad3fd..becb048d18d4 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2957,10 +2957,6 @@ static int __net_init ip6_route_net_init(struct net *net) | |||
2957 | net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; | 2957 | net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; |
2958 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; | 2958 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; |
2959 | 2959 | ||
2960 | #ifdef CONFIG_PROC_FS | ||
2961 | proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops); | ||
2962 | proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); | ||
2963 | #endif | ||
2964 | net->ipv6.ip6_rt_gc_expire = 30*HZ; | 2960 | net->ipv6.ip6_rt_gc_expire = 30*HZ; |
2965 | 2961 | ||
2966 | ret = 0; | 2962 | ret = 0; |
@@ -2981,10 +2977,6 @@ out_ip6_dst_ops: | |||
2981 | 2977 | ||
2982 | static void __net_exit ip6_route_net_exit(struct net *net) | 2978 | static void __net_exit ip6_route_net_exit(struct net *net) |
2983 | { | 2979 | { |
2984 | #ifdef CONFIG_PROC_FS | ||
2985 | proc_net_remove(net, "ipv6_route"); | ||
2986 | proc_net_remove(net, "rt6_stats"); | ||
2987 | #endif | ||
2988 | kfree(net->ipv6.ip6_null_entry); | 2980 | kfree(net->ipv6.ip6_null_entry); |
2989 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 2981 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
2990 | kfree(net->ipv6.ip6_prohibit_entry); | 2982 | kfree(net->ipv6.ip6_prohibit_entry); |
@@ -2993,11 +2985,33 @@ static void __net_exit ip6_route_net_exit(struct net *net) | |||
2993 | dst_entries_destroy(&net->ipv6.ip6_dst_ops); | 2985 | dst_entries_destroy(&net->ipv6.ip6_dst_ops); |
2994 | } | 2986 | } |
2995 | 2987 | ||
2988 | static int __net_init ip6_route_net_init_late(struct net *net) | ||
2989 | { | ||
2990 | #ifdef CONFIG_PROC_FS | ||
2991 | proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops); | ||
2992 | proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); | ||
2993 | #endif | ||
2994 | return 0; | ||
2995 | } | ||
2996 | |||
2997 | static void __net_exit ip6_route_net_exit_late(struct net *net) | ||
2998 | { | ||
2999 | #ifdef CONFIG_PROC_FS | ||
3000 | proc_net_remove(net, "ipv6_route"); | ||
3001 | proc_net_remove(net, "rt6_stats"); | ||
3002 | #endif | ||
3003 | } | ||
3004 | |||
2996 | static struct pernet_operations ip6_route_net_ops = { | 3005 | static struct pernet_operations ip6_route_net_ops = { |
2997 | .init = ip6_route_net_init, | 3006 | .init = ip6_route_net_init, |
2998 | .exit = ip6_route_net_exit, | 3007 | .exit = ip6_route_net_exit, |
2999 | }; | 3008 | }; |
3000 | 3009 | ||
3010 | static struct pernet_operations ip6_route_net_late_ops = { | ||
3011 | .init = ip6_route_net_init_late, | ||
3012 | .exit = ip6_route_net_exit_late, | ||
3013 | }; | ||
3014 | |||
3001 | static struct notifier_block ip6_route_dev_notifier = { | 3015 | static struct notifier_block ip6_route_dev_notifier = { |
3002 | .notifier_call = ip6_route_dev_notify, | 3016 | .notifier_call = ip6_route_dev_notify, |
3003 | .priority = 0, | 3017 | .priority = 0, |
@@ -3047,19 +3061,25 @@ int __init ip6_route_init(void) | |||
3047 | if (ret) | 3061 | if (ret) |
3048 | goto xfrm6_init; | 3062 | goto xfrm6_init; |
3049 | 3063 | ||
3064 | ret = register_pernet_subsys(&ip6_route_net_late_ops); | ||
3065 | if (ret) | ||
3066 | goto fib6_rules_init; | ||
3067 | |||
3050 | ret = -ENOBUFS; | 3068 | ret = -ENOBUFS; |
3051 | if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) || | 3069 | if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) || |
3052 | __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) || | 3070 | __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) || |
3053 | __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL)) | 3071 | __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL)) |
3054 | goto fib6_rules_init; | 3072 | goto out_register_late_subsys; |
3055 | 3073 | ||
3056 | ret = register_netdevice_notifier(&ip6_route_dev_notifier); | 3074 | ret = register_netdevice_notifier(&ip6_route_dev_notifier); |
3057 | if (ret) | 3075 | if (ret) |
3058 | goto fib6_rules_init; | 3076 | goto out_register_late_subsys; |
3059 | 3077 | ||
3060 | out: | 3078 | out: |
3061 | return ret; | 3079 | return ret; |
3062 | 3080 | ||
3081 | out_register_late_subsys: | ||
3082 | unregister_pernet_subsys(&ip6_route_net_late_ops); | ||
3063 | fib6_rules_init: | 3083 | fib6_rules_init: |
3064 | fib6_rules_cleanup(); | 3084 | fib6_rules_cleanup(); |
3065 | xfrm6_init: | 3085 | xfrm6_init: |
@@ -3078,6 +3098,7 @@ out_kmem_cache: | |||
3078 | void ip6_route_cleanup(void) | 3098 | void ip6_route_cleanup(void) |
3079 | { | 3099 | { |
3080 | unregister_netdevice_notifier(&ip6_route_dev_notifier); | 3100 | unregister_netdevice_notifier(&ip6_route_dev_notifier); |
3101 | unregister_pernet_subsys(&ip6_route_net_late_ops); | ||
3081 | fib6_rules_cleanup(); | 3102 | fib6_rules_cleanup(); |
3082 | xfrm6_fini(); | 3103 | xfrm6_fini(); |
3083 | fib6_gc_cleanup(); | 3104 | fib6_gc_cleanup(); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 3a9aec29581a..9df64a50b075 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1212,7 +1212,8 @@ have_isn: | |||
1212 | tcp_rsk(req)->snt_isn = isn; | 1212 | tcp_rsk(req)->snt_isn = isn; |
1213 | tcp_rsk(req)->snt_synack = tcp_time_stamp; | 1213 | tcp_rsk(req)->snt_synack = tcp_time_stamp; |
1214 | 1214 | ||
1215 | security_inet_conn_request(sk, skb, req); | 1215 | if (security_inet_conn_request(sk, skb, req)) |
1216 | goto drop_and_release; | ||
1216 | 1217 | ||
1217 | if (tcp_v6_send_synack(sk, req, | 1218 | if (tcp_v6_send_synack(sk, req, |
1218 | (struct request_values *)&tmp_ext, | 1219 | (struct request_values *)&tmp_ext, |
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 07d7d55a1b93..cd6f7a991d80 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -372,7 +372,6 @@ static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock, | |||
372 | skb_trim(skb, skb->dev->mtu); | 372 | skb_trim(skb, skb->dev->mtu); |
373 | } | 373 | } |
374 | skb->protocol = ETH_P_AF_IUCV; | 374 | skb->protocol = ETH_P_AF_IUCV; |
375 | skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF; | ||
376 | nskb = skb_clone(skb, GFP_ATOMIC); | 375 | nskb = skb_clone(skb, GFP_ATOMIC); |
377 | if (!nskb) | 376 | if (!nskb) |
378 | return -ENOMEM; | 377 | return -ENOMEM; |
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index 185f12f4a5fa..47b259fccd27 100644 --- a/net/l2tp/l2tp_eth.c +++ b/net/l2tp/l2tp_eth.c | |||
@@ -42,6 +42,11 @@ struct l2tp_eth { | |||
42 | struct sock *tunnel_sock; | 42 | struct sock *tunnel_sock; |
43 | struct l2tp_session *session; | 43 | struct l2tp_session *session; |
44 | struct list_head list; | 44 | struct list_head list; |
45 | atomic_long_t tx_bytes; | ||
46 | atomic_long_t tx_packets; | ||
47 | atomic_long_t rx_bytes; | ||
48 | atomic_long_t rx_packets; | ||
49 | atomic_long_t rx_errors; | ||
45 | }; | 50 | }; |
46 | 51 | ||
47 | /* via l2tp_session_priv() */ | 52 | /* via l2tp_session_priv() */ |
@@ -88,24 +93,40 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
88 | struct l2tp_eth *priv = netdev_priv(dev); | 93 | struct l2tp_eth *priv = netdev_priv(dev); |
89 | struct l2tp_session *session = priv->session; | 94 | struct l2tp_session *session = priv->session; |
90 | 95 | ||
96 | atomic_long_add(skb->len, &priv->tx_bytes); | ||
97 | atomic_long_inc(&priv->tx_packets); | ||
98 | |||
91 | l2tp_xmit_skb(session, skb, session->hdr_len); | 99 | l2tp_xmit_skb(session, skb, session->hdr_len); |
92 | 100 | ||
93 | dev->stats.tx_bytes += skb->len; | 101 | return NETDEV_TX_OK; |
94 | dev->stats.tx_packets++; | 102 | } |
95 | 103 | ||
96 | return 0; | 104 | static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev, |
105 | struct rtnl_link_stats64 *stats) | ||
106 | { | ||
107 | struct l2tp_eth *priv = netdev_priv(dev); | ||
108 | |||
109 | stats->tx_bytes = atomic_long_read(&priv->tx_bytes); | ||
110 | stats->tx_packets = atomic_long_read(&priv->tx_packets); | ||
111 | stats->rx_bytes = atomic_long_read(&priv->rx_bytes); | ||
112 | stats->rx_packets = atomic_long_read(&priv->rx_packets); | ||
113 | stats->rx_errors = atomic_long_read(&priv->rx_errors); | ||
114 | return stats; | ||
97 | } | 115 | } |
98 | 116 | ||
117 | |||
99 | static struct net_device_ops l2tp_eth_netdev_ops = { | 118 | static struct net_device_ops l2tp_eth_netdev_ops = { |
100 | .ndo_init = l2tp_eth_dev_init, | 119 | .ndo_init = l2tp_eth_dev_init, |
101 | .ndo_uninit = l2tp_eth_dev_uninit, | 120 | .ndo_uninit = l2tp_eth_dev_uninit, |
102 | .ndo_start_xmit = l2tp_eth_dev_xmit, | 121 | .ndo_start_xmit = l2tp_eth_dev_xmit, |
122 | .ndo_get_stats64 = l2tp_eth_get_stats64, | ||
103 | }; | 123 | }; |
104 | 124 | ||
105 | static void l2tp_eth_dev_setup(struct net_device *dev) | 125 | static void l2tp_eth_dev_setup(struct net_device *dev) |
106 | { | 126 | { |
107 | ether_setup(dev); | 127 | ether_setup(dev); |
108 | dev->priv_flags &= ~IFF_TX_SKB_SHARING; | 128 | dev->priv_flags &= ~IFF_TX_SKB_SHARING; |
129 | dev->features |= NETIF_F_LLTX; | ||
109 | dev->netdev_ops = &l2tp_eth_netdev_ops; | 130 | dev->netdev_ops = &l2tp_eth_netdev_ops; |
110 | dev->destructor = free_netdev; | 131 | dev->destructor = free_netdev; |
111 | } | 132 | } |
@@ -114,17 +135,17 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb, | |||
114 | { | 135 | { |
115 | struct l2tp_eth_sess *spriv = l2tp_session_priv(session); | 136 | struct l2tp_eth_sess *spriv = l2tp_session_priv(session); |
116 | struct net_device *dev = spriv->dev; | 137 | struct net_device *dev = spriv->dev; |
138 | struct l2tp_eth *priv = netdev_priv(dev); | ||
117 | 139 | ||
118 | if (session->debug & L2TP_MSG_DATA) { | 140 | if (session->debug & L2TP_MSG_DATA) { |
119 | unsigned int length; | 141 | unsigned int length; |
120 | u8 *ptr = skb->data; | ||
121 | 142 | ||
122 | length = min(32u, skb->len); | 143 | length = min(32u, skb->len); |
123 | if (!pskb_may_pull(skb, length)) | 144 | if (!pskb_may_pull(skb, length)) |
124 | goto error; | 145 | goto error; |
125 | 146 | ||
126 | pr_debug("%s: eth recv\n", session->name); | 147 | pr_debug("%s: eth recv\n", session->name); |
127 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, ptr, length); | 148 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, skb->data, length); |
128 | } | 149 | } |
129 | 150 | ||
130 | if (!pskb_may_pull(skb, sizeof(ETH_HLEN))) | 151 | if (!pskb_may_pull(skb, sizeof(ETH_HLEN))) |
@@ -139,15 +160,15 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb, | |||
139 | nf_reset(skb); | 160 | nf_reset(skb); |
140 | 161 | ||
141 | if (dev_forward_skb(dev, skb) == NET_RX_SUCCESS) { | 162 | if (dev_forward_skb(dev, skb) == NET_RX_SUCCESS) { |
142 | dev->stats.rx_packets++; | 163 | atomic_long_inc(&priv->rx_packets); |
143 | dev->stats.rx_bytes += data_len; | 164 | atomic_long_add(data_len, &priv->rx_bytes); |
144 | } else | 165 | } else { |
145 | dev->stats.rx_errors++; | 166 | atomic_long_inc(&priv->rx_errors); |
146 | 167 | } | |
147 | return; | 168 | return; |
148 | 169 | ||
149 | error: | 170 | error: |
150 | dev->stats.rx_errors++; | 171 | atomic_long_inc(&priv->rx_errors); |
151 | kfree_skb(skb); | 172 | kfree_skb(skb); |
152 | } | 173 | } |
153 | 174 | ||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index e9cecca5c44d..7d5108a867ad 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2093,6 +2093,9 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, | |||
2093 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 2093 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
2094 | int i, ret; | 2094 | int i, ret; |
2095 | 2095 | ||
2096 | if (!ieee80211_sdata_running(sdata)) | ||
2097 | return -ENETDOWN; | ||
2098 | |||
2096 | if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) { | 2099 | if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) { |
2097 | ret = drv_set_bitrate_mask(local, sdata, mask); | 2100 | ret = drv_set_bitrate_mask(local, sdata, mask); |
2098 | if (ret) | 2101 | if (ret) |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 91d84cc77bbf..66e4fcdd1c6b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1352,6 +1352,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1352 | if (WARN_ON(!ifmgd->associated)) | 1352 | if (WARN_ON(!ifmgd->associated)) |
1353 | return; | 1353 | return; |
1354 | 1354 | ||
1355 | ieee80211_stop_poll(sdata); | ||
1356 | |||
1355 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); | 1357 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); |
1356 | 1358 | ||
1357 | ifmgd->associated = NULL; | 1359 | ifmgd->associated = NULL; |
@@ -2612,8 +2614,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, | |||
2612 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 2614 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
2613 | u8 frame_buf[DEAUTH_DISASSOC_LEN]; | 2615 | u8 frame_buf[DEAUTH_DISASSOC_LEN]; |
2614 | 2616 | ||
2615 | ieee80211_stop_poll(sdata); | ||
2616 | |||
2617 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason, | 2617 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason, |
2618 | false, frame_buf); | 2618 | false, frame_buf); |
2619 | mutex_unlock(&ifmgd->mtx); | 2619 | mutex_unlock(&ifmgd->mtx); |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 3bb24a121c95..a470e1123a55 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -271,6 +271,9 @@ struct sta_ampdu_mlme { | |||
271 | * @plink_timer: peer link watch timer | 271 | * @plink_timer: peer link watch timer |
272 | * @plink_timer_was_running: used by suspend/resume to restore timers | 272 | * @plink_timer_was_running: used by suspend/resume to restore timers |
273 | * @t_offset: timing offset relative to this host | 273 | * @t_offset: timing offset relative to this host |
274 | * @t_offset_setpoint: reference timing offset of this sta to be used when | ||
275 | * calculating clockdrift | ||
276 | * @ch_type: peer's channel type | ||
274 | * @debugfs: debug filesystem info | 277 | * @debugfs: debug filesystem info |
275 | * @dead: set to true when sta is unlinked | 278 | * @dead: set to true when sta is unlinked |
276 | * @uploaded: set to true when sta is uploaded to the driver | 279 | * @uploaded: set to true when sta is uploaded to the driver |
@@ -278,6 +281,8 @@ struct sta_ampdu_mlme { | |||
278 | * @sta: station information we share with the driver | 281 | * @sta: station information we share with the driver |
279 | * @sta_state: duplicates information about station state (for debug) | 282 | * @sta_state: duplicates information about station state (for debug) |
280 | * @beacon_loss_count: number of times beacon loss has triggered | 283 | * @beacon_loss_count: number of times beacon loss has triggered |
284 | * @supports_40mhz: tracks whether the station advertised 40 MHz support | ||
285 | * as we overwrite its HT parameters with the currently used value | ||
281 | */ | 286 | */ |
282 | struct sta_info { | 287 | struct sta_info { |
283 | /* General information, mostly static */ | 288 | /* General information, mostly static */ |
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index 8781d8f904d9..434b6873b352 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c | |||
@@ -83,9 +83,10 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb, | |||
83 | { | 83 | { |
84 | struct xmit_work *work; | 84 | struct xmit_work *work; |
85 | 85 | ||
86 | if (!(priv->phy->channels_supported[page] & (1 << chan))) | 86 | if (!(priv->phy->channels_supported[page] & (1 << chan))) { |
87 | WARN_ON(1); | 87 | WARN_ON(1); |
88 | return NETDEV_TX_OK; | 88 | return NETDEV_TX_OK; |
89 | } | ||
89 | 90 | ||
90 | if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { | 91 | if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { |
91 | u16 crc = crc_ccitt(0, skb->data, skb->len); | 92 | u16 crc = crc_ccitt(0, skb->data, skb->len); |
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 779ce4ff92ec..5a940dbd74a3 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Authors: Sakari Ailus <sakari.ailus@nokia.com> |
9 | * Original author: Sakari Ailus <sakari.ailus@nokia.com> | 9 | * Rémi Denis-Courmont |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c index bf35b4e1a14c..12c30f3e643e 100644 --- a/net/phonet/datagram.c +++ b/net/phonet/datagram.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Authors: Sakari Ailus <sakari.ailus@nokia.com> |
9 | * Original author: Sakari Ailus <sakari.ailus@nokia.com> | 9 | * Rémi Denis-Courmont |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/pep-gprs.c b/net/phonet/pep-gprs.c index d01208968c83..a2fba7edfd1f 100644 --- a/net/phonet/pep-gprs.c +++ b/net/phonet/pep-gprs.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Author: Rémi Denis-Courmont |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 9dd4f926f7d1..576f22c9c76e 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Author: Rémi Denis-Courmont |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index 36f75a9e2c3d..5bf6341e2dd4 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Authors: Sakari Ailus <sakari.ailus@nokia.com> |
9 | * Original author: Sakari Ailus <sakari.ailus@nokia.com> | 9 | * Rémi Denis-Courmont |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index cfdf135fcd69..7dd762a464e5 100644 --- a/net/phonet/pn_netlink.c +++ b/net/phonet/pn_netlink.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Authors: Sakari Ailus <sakari.ailus@nokia.com> |
9 | * Original author: Sakari Ailus <sakari.ailus@nokia.com> | 9 | * Remi Denis-Courmont |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 89cfa9ce4939..0acc943f713a 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Authors: Sakari Ailus <sakari.ailus@nokia.com> |
9 | * Original author: Sakari Ailus <sakari.ailus@nokia.com> | 9 | * Rémi Denis-Courmont |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c index 696348fd31a1..d6bbbbd0af18 100644 --- a/net/phonet/sysctl.c +++ b/net/phonet/sysctl.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nokia Corporation. | 6 | * Copyright (C) 2008 Nokia Corporation. |
7 | * | 7 | * |
8 | * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | 8 | * Author: Rémi Denis-Courmont |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 5942d27b1444..9c90811d1134 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -673,7 +673,9 @@ void sctp_addr_wq_timeout_handler(unsigned long arg) | |||
673 | SCTP_DEBUG_PRINTK("sctp_addrwq_timo_handler: sctp_asconf_mgmt failed\n"); | 673 | SCTP_DEBUG_PRINTK("sctp_addrwq_timo_handler: sctp_asconf_mgmt failed\n"); |
674 | sctp_bh_unlock_sock(sk); | 674 | sctp_bh_unlock_sock(sk); |
675 | } | 675 | } |
676 | #if IS_ENABLED(CONFIG_IPV6) | ||
676 | free_next: | 677 | free_next: |
678 | #endif | ||
677 | list_del(&addrw->list); | 679 | list_del(&addrw->list); |
678 | kfree(addrw); | 680 | kfree(addrw); |
679 | } | 681 | } |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 15f347477a99..baf5704740ee 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1389,7 +1389,7 @@ static void reg_set_request_processed(void) | |||
1389 | spin_unlock(®_requests_lock); | 1389 | spin_unlock(®_requests_lock); |
1390 | 1390 | ||
1391 | if (last_request->initiator == NL80211_REGDOM_SET_BY_USER) | 1391 | if (last_request->initiator == NL80211_REGDOM_SET_BY_USER) |
1392 | cancel_delayed_work_sync(®_timeout); | 1392 | cancel_delayed_work(®_timeout); |
1393 | 1393 | ||
1394 | if (need_more_processing) | 1394 | if (need_more_processing) |
1395 | schedule_work(®_work); | 1395 | schedule_work(®_work); |
diff --git a/net/wireless/util.c b/net/wireless/util.c index 8f2d68fc3a44..316cfd00914f 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -804,7 +804,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, | |||
804 | ntype == NL80211_IFTYPE_P2P_CLIENT)) | 804 | ntype == NL80211_IFTYPE_P2P_CLIENT)) |
805 | return -EBUSY; | 805 | return -EBUSY; |
806 | 806 | ||
807 | if (ntype != otype) { | 807 | if (ntype != otype && netif_running(dev)) { |
808 | err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr, | 808 | err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr, |
809 | ntype); | 809 | ntype); |
810 | if (err) | 810 | if (err) |