aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-05 15:26:41 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-05 15:26:41 -0500
commit255333c1db3ec63921de29b134418a4e56e5921e (patch)
treeb1cd99373cabfa6fed020496d4d74500e7bc7e92 /drivers
parent9a43b709a230705ca40a6f854a334a02334a3c1c (diff)
parent0d66afe7805b169b6bf3c7a88cf8163298b8ef05 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/mac80211/rc80211_pid_algo.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/Kconfig2
-rw-r--r--drivers/net/atarilance.c5
-rw-r--r--drivers/net/e100.c29
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/mv643xx_eth.c1
-rw-r--r--drivers/net/pcmcia/axnet_cs.c2
-rw-r--r--drivers/net/phy/Kconfig1
-rw-r--r--drivers/net/phy/davicom.c17
-rw-r--r--drivers/net/pppol2tp.c8
-rw-r--r--drivers/net/s2io.c2
-rw-r--r--drivers/net/tulip/de2104x.c3
-rw-r--r--drivers/net/tun.c6
-rw-r--r--drivers/net/wireless/b43legacy/main.c2
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c8
-rw-r--r--drivers/net/wireless/p54common.c20
-rw-r--r--drivers/net/wireless/p54common.h8
-rw-r--r--drivers/net/wireless/rndis_wlan.c8
-rw-r--r--drivers/ssb/driver_pcicore.c5
18 files changed, 66 insertions, 63 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index a0f0e605d630..a64bb415f10c 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2519,7 +2519,7 @@ config CHELSIO_T3
2519 2519
2520config EHEA 2520config EHEA
2521 tristate "eHEA Ethernet support" 2521 tristate "eHEA Ethernet support"
2522 depends on IBMEBUS && INET 2522 depends on IBMEBUS && INET && SPARSEMEM
2523 select INET_LRO 2523 select INET_LRO
2524 ---help--- 2524 ---help---
2525 This driver supports the IBM pSeries eHEA ethernet adapter. 2525 This driver supports the IBM pSeries eHEA ethernet adapter.
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c
index b74dbeef8050..13c293b286de 100644
--- a/drivers/net/atarilance.c
+++ b/drivers/net/atarilance.c
@@ -336,8 +336,6 @@ struct lance_addr {
336 336
337/***************************** Prototypes *****************************/ 337/***************************** Prototypes *****************************/
338 338
339static int addr_accessible( volatile void *regp, int wordflag, int
340 writeflag );
341static unsigned long lance_probe1( struct net_device *dev, struct lance_addr 339static unsigned long lance_probe1( struct net_device *dev, struct lance_addr
342 *init_rec ); 340 *init_rec );
343static int lance_open( struct net_device *dev ); 341static int lance_open( struct net_device *dev );
@@ -406,7 +404,8 @@ struct net_device * __init atarilance_probe(int unit)
406 404
407/* Derived from hwreg_present() in atari/config.c: */ 405/* Derived from hwreg_present() in atari/config.c: */
408 406
409static int __init addr_accessible( volatile void *regp, int wordflag, int writeflag ) 407static noinline int __init addr_accessible(volatile void *regp, int wordflag,
408 int writeflag)
410{ 409{
411 int ret; 410 int ret;
412 long flags; 411 long flags;
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 36ba6dc96acc..cdf3090a1885 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2782,16 +2782,13 @@ static void __devexit e100_remove(struct pci_dev *pdev)
2782 } 2782 }
2783} 2783}
2784 2784
2785#ifdef CONFIG_PM
2786static int e100_suspend(struct pci_dev *pdev, pm_message_t state) 2785static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
2787{ 2786{
2788 struct net_device *netdev = pci_get_drvdata(pdev); 2787 struct net_device *netdev = pci_get_drvdata(pdev);
2789 struct nic *nic = netdev_priv(netdev); 2788 struct nic *nic = netdev_priv(netdev);
2790 2789
2791 if (netif_running(netdev)) 2790 if (netif_running(netdev))
2792 napi_disable(&nic->napi); 2791 e100_down(nic);
2793 del_timer_sync(&nic->watchdog);
2794 netif_carrier_off(nic->netdev);
2795 netif_device_detach(netdev); 2792 netif_device_detach(netdev);
2796 2793
2797 pci_save_state(pdev); 2794 pci_save_state(pdev);
@@ -2804,14 +2801,13 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
2804 pci_enable_wake(pdev, PCI_D3cold, 0); 2801 pci_enable_wake(pdev, PCI_D3cold, 0);
2805 } 2802 }
2806 2803
2807 free_irq(pdev->irq, netdev);
2808
2809 pci_disable_device(pdev); 2804 pci_disable_device(pdev);
2810 pci_set_power_state(pdev, PCI_D3hot); 2805 pci_set_power_state(pdev, PCI_D3hot);
2811 2806
2812 return 0; 2807 return 0;
2813} 2808}
2814 2809
2810#ifdef CONFIG_PM
2815static int e100_resume(struct pci_dev *pdev) 2811static int e100_resume(struct pci_dev *pdev)
2816{ 2812{
2817 struct net_device *netdev = pci_get_drvdata(pdev); 2813 struct net_device *netdev = pci_get_drvdata(pdev);
@@ -2832,26 +2828,7 @@ static int e100_resume(struct pci_dev *pdev)
2832 2828
2833static void e100_shutdown(struct pci_dev *pdev) 2829static void e100_shutdown(struct pci_dev *pdev)
2834{ 2830{
2835 struct net_device *netdev = pci_get_drvdata(pdev); 2831 e100_suspend(pdev, PMSG_SUSPEND);
2836 struct nic *nic = netdev_priv(netdev);
2837
2838 if (netif_running(netdev))
2839 napi_disable(&nic->napi);
2840 del_timer_sync(&nic->watchdog);
2841 netif_carrier_off(nic->netdev);
2842
2843 if ((nic->flags & wol_magic) | e100_asf(nic)) {
2844 pci_enable_wake(pdev, PCI_D3hot, 1);
2845 pci_enable_wake(pdev, PCI_D3cold, 1);
2846 } else {
2847 pci_enable_wake(pdev, PCI_D3hot, 0);
2848 pci_enable_wake(pdev, PCI_D3cold, 0);
2849 }
2850
2851 free_irq(pdev->irq, netdev);
2852
2853 pci_disable_device(pdev);
2854 pci_set_power_state(pdev, PCI_D3hot);
2855} 2832}
2856 2833
2857/* ------------------ PCI Error Recovery infrastructure -------------- */ 2834/* ------------------ PCI Error Recovery infrastructure -------------- */
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 23d0a4afe0e1..c2095ce531c9 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2133,7 +2133,7 @@ static void ixgbe_watchdog(unsigned long data)
2133 (link_speed == IXGBE_LINK_SPEED_10GB_FULL ? 2133 (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
2134 "10 Gbps" : 2134 "10 Gbps" :
2135 (link_speed == IXGBE_LINK_SPEED_1GB_FULL ? 2135 (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
2136 "1 Gpbs" : "unknown speed")), 2136 "1 Gbps" : "unknown speed")),
2137 ((FLOW_RX && FLOW_TX) ? "RX/TX" : 2137 ((FLOW_RX && FLOW_TX) ? "RX/TX" :
2138 (FLOW_RX ? "RX" : 2138 (FLOW_RX ? "RX" :
2139 (FLOW_TX ? "TX" : "None")))); 2139 (FLOW_TX ? "TX" : "None"))));
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index b528ce77c406..771139e283af 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2104,6 +2104,7 @@ MODULE_LICENSE("GPL");
2104MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani" 2104MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani"
2105 " and Dale Farnsworth"); 2105 " and Dale Farnsworth");
2106MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX"); 2106MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
2107MODULE_ALIAS("platform:mv643xx_eth");
2107 2108
2108/* 2109/*
2109 * The second part is the low level driver of the gigE ethernet ports. 2110 * The second part is the low level driver of the gigE ethernet ports.
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index e8a63e483a2b..ce95c5d168fe 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -1268,7 +1268,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
1268 } 1268 }
1269 } 1269 }
1270 1270
1271 if (interrupts && ei_debug) 1271 if (interrupts && ei_debug > 3)
1272 { 1272 {
1273 handled = 1; 1273 handled = 1;
1274 if (nr_serviced >= MAX_SERVICE) 1274 if (nr_serviced >= MAX_SERVICE)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index f4ca0591231d..3ac8529bb92c 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -67,6 +67,7 @@ config REALTEK_PHY
67 67
68config FIXED_PHY 68config FIXED_PHY
69 bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" 69 bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
70 depends on PHYLIB=y
70 ---help--- 71 ---help---
71 Adds the platform "fixed" MDIO Bus to cover the boards that use 72 Adds the platform "fixed" MDIO Bus to cover the boards that use
72 PHYs that are not connected to the real MDIO bus. 73 PHYs that are not connected to the real MDIO bus.
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c
index 7ed632db00d7..d926168bc780 100644
--- a/drivers/net/phy/davicom.c
+++ b/drivers/net/phy/davicom.c
@@ -37,6 +37,7 @@
37 37
38#define MII_DM9161_SCR 0x10 38#define MII_DM9161_SCR 0x10
39#define MII_DM9161_SCR_INIT 0x0610 39#define MII_DM9161_SCR_INIT 0x0610
40#define MII_DM9161_SCR_RMII 0x0100
40 41
41/* DM9161 Interrupt Register */ 42/* DM9161 Interrupt Register */
42#define MII_DM9161_INTR 0x15 43#define MII_DM9161_INTR 0x15
@@ -103,7 +104,7 @@ static int dm9161_config_aneg(struct phy_device *phydev)
103 104
104static int dm9161_config_init(struct phy_device *phydev) 105static int dm9161_config_init(struct phy_device *phydev)
105{ 106{
106 int err; 107 int err, temp;
107 108
108 /* Isolate the PHY */ 109 /* Isolate the PHY */
109 err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); 110 err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE);
@@ -111,9 +112,19 @@ static int dm9161_config_init(struct phy_device *phydev)
111 if (err < 0) 112 if (err < 0)
112 return err; 113 return err;
113 114
114 /* Do not bypass the scrambler/descrambler */ 115 switch (phydev->interface) {
115 err = phy_write(phydev, MII_DM9161_SCR, MII_DM9161_SCR_INIT); 116 case PHY_INTERFACE_MODE_MII:
117 temp = MII_DM9161_SCR_INIT;
118 break;
119 case PHY_INTERFACE_MODE_RMII:
120 temp = MII_DM9161_SCR_INIT | MII_DM9161_SCR_RMII;
121 break;
122 default:
123 return -EINVAL;
124 }
116 125
126 /* Do not bypass the scrambler/descrambler */
127 err = phy_write(phydev, MII_DM9161_SCR, temp);
117 if (err < 0) 128 if (err < 0)
118 return err; 129 return err;
119 130
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index e0b072d9fdb7..86e5dba079fe 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -455,6 +455,7 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session)
455 skb_queue_len(&session->reorder_q)); 455 skb_queue_len(&session->reorder_q));
456 __skb_unlink(skb, &session->reorder_q); 456 __skb_unlink(skb, &session->reorder_q);
457 kfree_skb(skb); 457 kfree_skb(skb);
458 sock_put(session->sock);
458 continue; 459 continue;
459 } 460 }
460 461
@@ -1110,6 +1111,8 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
1110 for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) { 1111 for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) {
1111again: 1112again:
1112 hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) { 1113 hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
1114 struct sk_buff *skb;
1115
1113 session = hlist_entry(walk, struct pppol2tp_session, hlist); 1116 session = hlist_entry(walk, struct pppol2tp_session, hlist);
1114 1117
1115 sk = session->sock; 1118 sk = session->sock;
@@ -1138,7 +1141,10 @@ again:
1138 /* Purge any queued data */ 1141 /* Purge any queued data */
1139 skb_queue_purge(&sk->sk_receive_queue); 1142 skb_queue_purge(&sk->sk_receive_queue);
1140 skb_queue_purge(&sk->sk_write_queue); 1143 skb_queue_purge(&sk->sk_write_queue);
1141 skb_queue_purge(&session->reorder_q); 1144 while ((skb = skb_dequeue(&session->reorder_q))) {
1145 kfree_skb(skb);
1146 sock_put(sk);
1147 }
1142 1148
1143 release_sock(sk); 1149 release_sock(sk);
1144 sock_put(sk); 1150 sock_put(sk);
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 6179a0a2032c..c72787adeba3 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -1088,7 +1088,7 @@ static int s2io_print_pci_mode(struct s2io_nic *nic)
1088 * '-1' on failure 1088 * '-1' on failure
1089 */ 1089 */
1090 1090
1091int init_tti(struct s2io_nic *nic, int link) 1091static int init_tti(struct s2io_nic *nic, int link)
1092{ 1092{
1093 struct XENA_dev_config __iomem *bar0 = nic->bar0; 1093 struct XENA_dev_config __iomem *bar0 = nic->bar0;
1094 register u64 val64 = 0; 1094 register u64 val64 = 0;
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 77d9dd7ea34f..567c62757e9d 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -910,7 +910,8 @@ static void de_set_media (struct de_private *de)
910 unsigned media = de->media_type; 910 unsigned media = de->media_type;
911 u32 macmode = dr32(MacMode); 911 u32 macmode = dr32(MacMode);
912 912
913 BUG_ON(de_is_running(de)); 913 if (de_is_running(de))
914 printk(KERN_WARNING "%s: chip is running while changing media!\n", de->dev->name);
914 915
915 if (de->de21040) 916 if (de->de21040)
916 dw32(CSR11, FULL_DUPLEX_MAGIC); 917 dw32(CSR11, FULL_DUPLEX_MAGIC);
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 038c1ef94d2e..7b816a032957 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -663,7 +663,11 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
663 case SIOCSIFHWADDR: 663 case SIOCSIFHWADDR:
664 { 664 {
665 /* try to set the actual net device's hw address */ 665 /* try to set the actual net device's hw address */
666 int ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr); 666 int ret;
667
668 rtnl_lock();
669 ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr);
670 rtnl_unlock();
667 671
668 if (ret == 0) { 672 if (ret == 0) {
669 /** Set the character device's hardware address. This is used when 673 /** Set the character device's hardware address. This is used when
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 82953dd0bae0..f518e796bdec 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3870,7 +3870,7 @@ static void b43legacy_print_driverinfo(void)
3870#ifdef CONFIG_B43LEGACY_DMA 3870#ifdef CONFIG_B43LEGACY_DMA
3871 feat_dma = "D"; 3871 feat_dma = "D";
3872#endif 3872#endif
3873 printk(KERN_INFO "Broadcom 43xx driver loaded " 3873 printk(KERN_INFO "Broadcom 43xx-legacy driver loaded "
3874 "[ Features: %s%s%s%s%s, Firmware-ID: " 3874 "[ Features: %s%s%s%s%s, Firmware-ID: "
3875 B43legacy_SUPPORTED_FIRMWARE_ID " ]\n", 3875 B43legacy_SUPPORTED_FIRMWARE_ID " ]\n",
3876 feat_pci, feat_leds, feat_rfkill, feat_pio, feat_dma); 3876 feat_pci, feat_leds, feat_rfkill, feat_pio, feat_dma);
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index a0a5dbe81b3b..5d90b83f28eb 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -562,9 +562,7 @@ int lbs_process_rx_command(struct lbs_private *priv)
562 } 562 }
563 563
564 resp = (void *)priv->upld_buf; 564 resp = (void *)priv->upld_buf;
565 565 curcmd = le16_to_cpu(priv->cur_cmd->cmdbuf->command);
566 curcmd = le16_to_cpu(resp->command);
567
568 respcmd = le16_to_cpu(resp->command); 566 respcmd = le16_to_cpu(resp->command);
569 result = le16_to_cpu(resp->result); 567 result = le16_to_cpu(resp->result);
570 568
@@ -572,9 +570,9 @@ int lbs_process_rx_command(struct lbs_private *priv)
572 respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies); 570 respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
573 lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len); 571 lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
574 572
575 if (resp->seqnum != resp->seqnum) { 573 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
576 lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n", 574 lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
577 le16_to_cpu(resp->seqnum), le16_to_cpu(resp->seqnum)); 575 le16_to_cpu(resp->seqnum), le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
578 spin_unlock_irqrestore(&priv->driver_lock, flags); 576 spin_unlock_irqrestore(&priv->driver_lock, flags);
579 ret = -1; 577 ret = -1;
580 goto done; 578 goto done;
diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c
index 84cc000e71aa..63f9badf3f52 100644
--- a/drivers/net/wireless/p54common.c
+++ b/drivers/net/wireless/p54common.c
@@ -206,18 +206,23 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
206 struct p54_common *priv = dev->priv; 206 struct p54_common *priv = dev->priv;
207 struct eeprom_pda_wrap *wrap = NULL; 207 struct eeprom_pda_wrap *wrap = NULL;
208 struct pda_entry *entry; 208 struct pda_entry *entry;
209 int i = 0;
210 unsigned int data_len, entry_len; 209 unsigned int data_len, entry_len;
211 void *tmp; 210 void *tmp;
212 int err; 211 int err;
212 u8 *end = (u8 *)eeprom + len;
213 213
214 wrap = (struct eeprom_pda_wrap *) eeprom; 214 wrap = (struct eeprom_pda_wrap *) eeprom;
215 entry = (void *)wrap->data + wrap->len; 215 entry = (void *)wrap->data + le16_to_cpu(wrap->len);
216 i += 2; 216
217 i += le16_to_cpu(entry->len)*2; 217 /* verify that at least the entry length/code fits */
218 while (i < len) { 218 while ((u8 *)entry <= end - sizeof(*entry)) {
219 entry_len = le16_to_cpu(entry->len); 219 entry_len = le16_to_cpu(entry->len);
220 data_len = ((entry_len - 1) << 1); 220 data_len = ((entry_len - 1) << 1);
221
222 /* abort if entry exceeds whole structure */
223 if ((u8 *)entry + sizeof(*entry) + data_len > end)
224 break;
225
221 switch (le16_to_cpu(entry->code)) { 226 switch (le16_to_cpu(entry->code)) {
222 case PDR_MAC_ADDRESS: 227 case PDR_MAC_ADDRESS:
223 SET_IEEE80211_PERM_ADDR(dev, entry->data); 228 SET_IEEE80211_PERM_ADDR(dev, entry->data);
@@ -289,7 +294,8 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
289 priv->version = *(u8 *)(entry->data + 1); 294 priv->version = *(u8 *)(entry->data + 1);
290 break; 295 break;
291 case PDR_END: 296 case PDR_END:
292 i = len; 297 /* make it overrun */
298 entry_len = len;
293 break; 299 break;
294 default: 300 default:
295 printk(KERN_INFO "p54: unknown eeprom code : 0x%x\n", 301 printk(KERN_INFO "p54: unknown eeprom code : 0x%x\n",
@@ -298,8 +304,6 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
298 } 304 }
299 305
300 entry = (void *)entry + (entry_len + 1)*2; 306 entry = (void *)entry + (entry_len + 1)*2;
301 i += 2;
302 i += entry_len*2;
303 } 307 }
304 308
305 if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) { 309 if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) {
diff --git a/drivers/net/wireless/p54common.h b/drivers/net/wireless/p54common.h
index dc9f4cef585e..c15b56e1d75e 100644
--- a/drivers/net/wireless/p54common.h
+++ b/drivers/net/wireless/p54common.h
@@ -53,10 +53,10 @@ struct pda_entry {
53} __attribute__ ((packed)); 53} __attribute__ ((packed));
54 54
55struct eeprom_pda_wrap { 55struct eeprom_pda_wrap {
56 u32 magic; 56 __le32 magic;
57 u16 pad; 57 __le16 pad;
58 u16 len; 58 __le16 len;
59 u32 arm_opcode; 59 __le32 arm_opcode;
60 u8 data[0]; 60 u8 data[0];
61} __attribute__ ((packed)); 61} __attribute__ ((packed));
62 62
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index d9460aed1f22..10b776c1adc5 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -260,7 +260,7 @@ struct NDIS_802_11_KEY {
260 __le32 KeyLength; 260 __le32 KeyLength;
261 u8 Bssid[6]; 261 u8 Bssid[6];
262 u8 Padding[6]; 262 u8 Padding[6];
263 __le64 KeyRSC; 263 u8 KeyRSC[8];
264 u8 KeyMaterial[32]; 264 u8 KeyMaterial[32];
265} __attribute__((packed)); 265} __attribute__((packed));
266 266
@@ -1508,7 +1508,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev,
1508 struct usbnet *usbdev = dev->priv; 1508 struct usbnet *usbdev = dev->priv;
1509 struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); 1509 struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev);
1510 struct NDIS_802_11_KEY ndis_key; 1510 struct NDIS_802_11_KEY ndis_key;
1511 int i, keyidx, ret; 1511 int keyidx, ret;
1512 u8 *addr; 1512 u8 *addr;
1513 1513
1514 keyidx = wrqu->encoding.flags & IW_ENCODE_INDEX; 1514 keyidx = wrqu->encoding.flags & IW_ENCODE_INDEX;
@@ -1543,9 +1543,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev,
1543 ndis_key.KeyIndex = cpu_to_le32(keyidx); 1543 ndis_key.KeyIndex = cpu_to_le32(keyidx);
1544 1544
1545 if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { 1545 if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
1546 for (i = 0; i < 6; i++) 1546 memcpy(ndis_key.KeyRSC, ext->rx_seq, 6);
1547 ndis_key.KeyRSC |=
1548 cpu_to_le64(ext->rx_seq[i] << (i * 8));
1549 ndis_key.KeyIndex |= cpu_to_le32(1 << 29); 1547 ndis_key.KeyIndex |= cpu_to_le32(1 << 29);
1550 } 1548 }
1551 1549
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 07ab48d9ceab..74b9a8aea52b 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -111,7 +111,10 @@ static void __init ssb_fixup_pcibridge(struct pci_dev *dev)
111 111
112 /* Enable PCI bridge bus mastering and memory space */ 112 /* Enable PCI bridge bus mastering and memory space */
113 pci_set_master(dev); 113 pci_set_master(dev);
114 pcibios_enable_device(dev, ~0); 114 if (pcibios_enable_device(dev, ~0) < 0) {
115 ssb_printk(KERN_ERR "PCI: SSB bridge enable failed\n");
116 return;
117 }
115 118
116 /* Enable PCI bridge BAR1 prefetch and burst */ 119 /* Enable PCI bridge BAR1 prefetch and burst */
117 pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3); 120 pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3);