diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ppp_generic.c | 48 | ||||
-rw-r--r-- | drivers/net/tun.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/Makefile | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/hw.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 47 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 5 | ||||
-rw-r--r-- | drivers/ssb/pci.c | 5 |
12 files changed, 126 insertions, 55 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 4dc5b4b7a561..d3207c0da895 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -123,7 +123,6 @@ struct ppp { | |||
123 | u32 minseq; /* MP: min of most recent seqnos */ | 123 | u32 minseq; /* MP: min of most recent seqnos */ |
124 | struct sk_buff_head mrq; /* MP: receive reconstruction queue */ | 124 | struct sk_buff_head mrq; /* MP: receive reconstruction queue */ |
125 | #endif /* CONFIG_PPP_MULTILINK */ | 125 | #endif /* CONFIG_PPP_MULTILINK */ |
126 | struct net_device_stats stats; /* statistics */ | ||
127 | #ifdef CONFIG_PPP_FILTER | 126 | #ifdef CONFIG_PPP_FILTER |
128 | struct sock_filter *pass_filter; /* filter for packets to pass */ | 127 | struct sock_filter *pass_filter; /* filter for packets to pass */ |
129 | struct sock_filter *active_filter;/* filter for pkts to reset idle */ | 128 | struct sock_filter *active_filter;/* filter for pkts to reset idle */ |
@@ -914,18 +913,10 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
914 | 913 | ||
915 | outf: | 914 | outf: |
916 | kfree_skb(skb); | 915 | kfree_skb(skb); |
917 | ++ppp->stats.tx_dropped; | 916 | ++ppp->dev->stats.tx_dropped; |
918 | return 0; | 917 | return 0; |
919 | } | 918 | } |
920 | 919 | ||
921 | static struct net_device_stats * | ||
922 | ppp_net_stats(struct net_device *dev) | ||
923 | { | ||
924 | struct ppp *ppp = (struct ppp *) dev->priv; | ||
925 | |||
926 | return &ppp->stats; | ||
927 | } | ||
928 | |||
929 | static int | 920 | static int |
930 | ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 921 | ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
931 | { | 922 | { |
@@ -1095,8 +1086,8 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1095 | #endif /* CONFIG_PPP_FILTER */ | 1086 | #endif /* CONFIG_PPP_FILTER */ |
1096 | } | 1087 | } |
1097 | 1088 | ||
1098 | ++ppp->stats.tx_packets; | 1089 | ++ppp->dev->stats.tx_packets; |
1099 | ppp->stats.tx_bytes += skb->len - 2; | 1090 | ppp->dev->stats.tx_bytes += skb->len - 2; |
1100 | 1091 | ||
1101 | switch (proto) { | 1092 | switch (proto) { |
1102 | case PPP_IP: | 1093 | case PPP_IP: |
@@ -1171,7 +1162,7 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1171 | drop: | 1162 | drop: |
1172 | if (skb) | 1163 | if (skb) |
1173 | kfree_skb(skb); | 1164 | kfree_skb(skb); |
1174 | ++ppp->stats.tx_errors; | 1165 | ++ppp->dev->stats.tx_errors; |
1175 | } | 1166 | } |
1176 | 1167 | ||
1177 | /* | 1168 | /* |
@@ -1409,7 +1400,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1409 | spin_unlock_bh(&pch->downl); | 1400 | spin_unlock_bh(&pch->downl); |
1410 | if (ppp->debug & 1) | 1401 | if (ppp->debug & 1) |
1411 | printk(KERN_ERR "PPP: no memory (fragment)\n"); | 1402 | printk(KERN_ERR "PPP: no memory (fragment)\n"); |
1412 | ++ppp->stats.tx_errors; | 1403 | ++ppp->dev->stats.tx_errors; |
1413 | ++ppp->nxseq; | 1404 | ++ppp->nxseq; |
1414 | return 1; /* abandon the frame */ | 1405 | return 1; /* abandon the frame */ |
1415 | } | 1406 | } |
@@ -1538,7 +1529,7 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
1538 | 1529 | ||
1539 | if (skb->len > 0) | 1530 | if (skb->len > 0) |
1540 | /* note: a 0-length skb is used as an error indication */ | 1531 | /* note: a 0-length skb is used as an error indication */ |
1541 | ++ppp->stats.rx_length_errors; | 1532 | ++ppp->dev->stats.rx_length_errors; |
1542 | 1533 | ||
1543 | kfree_skb(skb); | 1534 | kfree_skb(skb); |
1544 | ppp_receive_error(ppp); | 1535 | ppp_receive_error(ppp); |
@@ -1547,7 +1538,7 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
1547 | static void | 1538 | static void |
1548 | ppp_receive_error(struct ppp *ppp) | 1539 | ppp_receive_error(struct ppp *ppp) |
1549 | { | 1540 | { |
1550 | ++ppp->stats.rx_errors; | 1541 | ++ppp->dev->stats.rx_errors; |
1551 | if (ppp->vj) | 1542 | if (ppp->vj) |
1552 | slhc_toss(ppp->vj); | 1543 | slhc_toss(ppp->vj); |
1553 | } | 1544 | } |
@@ -1627,8 +1618,8 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1627 | break; | 1618 | break; |
1628 | } | 1619 | } |
1629 | 1620 | ||
1630 | ++ppp->stats.rx_packets; | 1621 | ++ppp->dev->stats.rx_packets; |
1631 | ppp->stats.rx_bytes += skb->len - 2; | 1622 | ppp->dev->stats.rx_bytes += skb->len - 2; |
1632 | 1623 | ||
1633 | npi = proto_to_npindex(proto); | 1624 | npi = proto_to_npindex(proto); |
1634 | if (npi < 0) { | 1625 | if (npi < 0) { |
@@ -1806,7 +1797,7 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
1806 | */ | 1797 | */ |
1807 | if (seq_before(seq, ppp->nextseq)) { | 1798 | if (seq_before(seq, ppp->nextseq)) { |
1808 | kfree_skb(skb); | 1799 | kfree_skb(skb); |
1809 | ++ppp->stats.rx_dropped; | 1800 | ++ppp->dev->stats.rx_dropped; |
1810 | ppp_receive_error(ppp); | 1801 | ppp_receive_error(ppp); |
1811 | return; | 1802 | return; |
1812 | } | 1803 | } |
@@ -1928,7 +1919,7 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
1928 | /* Got a complete packet yet? */ | 1919 | /* Got a complete packet yet? */ |
1929 | if (lost == 0 && (p->BEbits & E) && (head->BEbits & B)) { | 1920 | if (lost == 0 && (p->BEbits & E) && (head->BEbits & B)) { |
1930 | if (len > ppp->mrru + 2) { | 1921 | if (len > ppp->mrru + 2) { |
1931 | ++ppp->stats.rx_length_errors; | 1922 | ++ppp->dev->stats.rx_length_errors; |
1932 | printk(KERN_DEBUG "PPP: reconstructed packet" | 1923 | printk(KERN_DEBUG "PPP: reconstructed packet" |
1933 | " is too long (%d)\n", len); | 1924 | " is too long (%d)\n", len); |
1934 | } else if (p == head) { | 1925 | } else if (p == head) { |
@@ -1937,7 +1928,7 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
1937 | skb = skb_get(p); | 1928 | skb = skb_get(p); |
1938 | break; | 1929 | break; |
1939 | } else if ((skb = dev_alloc_skb(len)) == NULL) { | 1930 | } else if ((skb = dev_alloc_skb(len)) == NULL) { |
1940 | ++ppp->stats.rx_missed_errors; | 1931 | ++ppp->dev->stats.rx_missed_errors; |
1941 | printk(KERN_DEBUG "PPP: no memory for " | 1932 | printk(KERN_DEBUG "PPP: no memory for " |
1942 | "reconstructed packet"); | 1933 | "reconstructed packet"); |
1943 | } else { | 1934 | } else { |
@@ -1966,7 +1957,7 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
1966 | if (ppp->debug & 1) | 1957 | if (ppp->debug & 1) |
1967 | printk(KERN_DEBUG " missed pkts %u..%u\n", | 1958 | printk(KERN_DEBUG " missed pkts %u..%u\n", |
1968 | ppp->nextseq, head->sequence-1); | 1959 | ppp->nextseq, head->sequence-1); |
1969 | ++ppp->stats.rx_dropped; | 1960 | ++ppp->dev->stats.rx_dropped; |
1970 | ppp_receive_error(ppp); | 1961 | ppp_receive_error(ppp); |
1971 | } | 1962 | } |
1972 | 1963 | ||
@@ -2377,12 +2368,12 @@ ppp_get_stats(struct ppp *ppp, struct ppp_stats *st) | |||
2377 | struct slcompress *vj = ppp->vj; | 2368 | struct slcompress *vj = ppp->vj; |
2378 | 2369 | ||
2379 | memset(st, 0, sizeof(*st)); | 2370 | memset(st, 0, sizeof(*st)); |
2380 | st->p.ppp_ipackets = ppp->stats.rx_packets; | 2371 | st->p.ppp_ipackets = ppp->dev->stats.rx_packets; |
2381 | st->p.ppp_ierrors = ppp->stats.rx_errors; | 2372 | st->p.ppp_ierrors = ppp->dev->stats.rx_errors; |
2382 | st->p.ppp_ibytes = ppp->stats.rx_bytes; | 2373 | st->p.ppp_ibytes = ppp->dev->stats.rx_bytes; |
2383 | st->p.ppp_opackets = ppp->stats.tx_packets; | 2374 | st->p.ppp_opackets = ppp->dev->stats.tx_packets; |
2384 | st->p.ppp_oerrors = ppp->stats.tx_errors; | 2375 | st->p.ppp_oerrors = ppp->dev->stats.tx_errors; |
2385 | st->p.ppp_obytes = ppp->stats.tx_bytes; | 2376 | st->p.ppp_obytes = ppp->dev->stats.tx_bytes; |
2386 | if (!vj) | 2377 | if (!vj) |
2387 | return; | 2378 | return; |
2388 | st->vj.vjs_packets = vj->sls_o_compressed + vj->sls_o_uncompressed; | 2379 | st->vj.vjs_packets = vj->sls_o_compressed + vj->sls_o_uncompressed; |
@@ -2436,7 +2427,6 @@ ppp_create_interface(int unit, int *retp) | |||
2436 | dev->priv = ppp; | 2427 | dev->priv = ppp; |
2437 | 2428 | ||
2438 | dev->hard_start_xmit = ppp_start_xmit; | 2429 | dev->hard_start_xmit = ppp_start_xmit; |
2439 | dev->get_stats = ppp_net_stats; | ||
2440 | dev->do_ioctl = ppp_net_ioctl; | 2430 | dev->do_ioctl = ppp_net_ioctl; |
2441 | 2431 | ||
2442 | ret = -EEXIST; | 2432 | ret = -EEXIST; |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d91856b19f6f..0ce07a339c7e 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -668,16 +668,23 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
668 | break; | 668 | break; |
669 | 669 | ||
670 | case TUNSETLINK: | 670 | case TUNSETLINK: |
671 | { | ||
672 | int ret; | ||
673 | |||
671 | /* Only allow setting the type when the interface is down */ | 674 | /* Only allow setting the type when the interface is down */ |
675 | rtnl_lock(); | ||
672 | if (tun->dev->flags & IFF_UP) { | 676 | if (tun->dev->flags & IFF_UP) { |
673 | DBG(KERN_INFO "%s: Linktype set failed because interface is up\n", | 677 | DBG(KERN_INFO "%s: Linktype set failed because interface is up\n", |
674 | tun->dev->name); | 678 | tun->dev->name); |
675 | return -EBUSY; | 679 | ret = -EBUSY; |
676 | } else { | 680 | } else { |
677 | tun->dev->type = (int) arg; | 681 | tun->dev->type = (int) arg; |
678 | DBG(KERN_INFO "%s: linktype set to %d\n", tun->dev->name, tun->dev->type); | 682 | DBG(KERN_INFO "%s: linktype set to %d\n", tun->dev->name, tun->dev->type); |
683 | ret = 0; | ||
679 | } | 684 | } |
680 | break; | 685 | rtnl_unlock(); |
686 | return ret; | ||
687 | } | ||
681 | 688 | ||
682 | #ifdef TUN_DEBUG | 689 | #ifdef TUN_DEBUG |
683 | case TUNSETDEBUG: | 690 | case TUNSETDEBUG: |
@@ -734,7 +741,12 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
734 | case SIOCADDMULTI: | 741 | case SIOCADDMULTI: |
735 | /** Add the specified group to the character device's multicast filter | 742 | /** Add the specified group to the character device's multicast filter |
736 | * list. */ | 743 | * list. */ |
744 | rtnl_lock(); | ||
745 | netif_tx_lock_bh(tun->dev); | ||
737 | add_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data); | 746 | add_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data); |
747 | netif_tx_unlock_bh(tun->dev); | ||
748 | rtnl_unlock(); | ||
749 | |||
738 | DBG(KERN_DEBUG "%s: add multi: %s\n", | 750 | DBG(KERN_DEBUG "%s: add multi: %s\n", |
739 | tun->dev->name, print_mac(mac, ifr.ifr_hwaddr.sa_data)); | 751 | tun->dev->name, print_mac(mac, ifr.ifr_hwaddr.sa_data)); |
740 | return 0; | 752 | return 0; |
@@ -742,7 +754,12 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
742 | case SIOCDELMULTI: | 754 | case SIOCDELMULTI: |
743 | /** Remove the specified group from the character device's multicast | 755 | /** Remove the specified group from the character device's multicast |
744 | * filter list. */ | 756 | * filter list. */ |
757 | rtnl_lock(); | ||
758 | netif_tx_lock_bh(tun->dev); | ||
745 | del_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data); | 759 | del_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data); |
760 | netif_tx_unlock_bh(tun->dev); | ||
761 | rtnl_unlock(); | ||
762 | |||
746 | DBG(KERN_DEBUG "%s: del multi: %s\n", | 763 | DBG(KERN_DEBUG "%s: del multi: %s\n", |
747 | tun->dev->name, print_mac(mac, ifr.ifr_hwaddr.sa_data)); | 764 | tun->dev->name, print_mac(mac, ifr.ifr_hwaddr.sa_data)); |
748 | return 0; | 765 | return 0; |
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index 70092191fc53..c2642bc1d49b 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile | |||
@@ -56,8 +56,7 @@ obj-$(CONFIG_RTL8187) += rtl8187.o | |||
56 | 56 | ||
57 | obj-$(CONFIG_ADM8211) += adm8211.o | 57 | obj-$(CONFIG_ADM8211) += adm8211.o |
58 | 58 | ||
59 | obj-$(CONFIG_IWL3945) += iwlwifi/ | 59 | obj-$(CONFIG_IWLCORE) += iwlwifi/ |
60 | obj-$(CONFIG_IWL4965) += iwlwifi/ | ||
61 | obj-$(CONFIG_RT2X00) += rt2x00/ | 60 | obj-$(CONFIG_RT2X00) += rt2x00/ |
62 | 61 | ||
63 | obj-$(CONFIG_P54_COMMON) += p54/ | 62 | obj-$(CONFIG_P54_COMMON) += p54/ |
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index 87e782291a01..5fb1ae6ad3e2 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c | |||
@@ -304,14 +304,20 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) | |||
304 | ah->ah_radio = AR5K_RF2413; | 304 | ah->ah_radio = AR5K_RF2413; |
305 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; | 305 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; |
306 | } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) { | 306 | } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_SC2) { |
307 | |||
308 | ah->ah_radio = AR5K_RF5413; | 307 | ah->ah_radio = AR5K_RF5413; |
308 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; | ||
309 | } else if (ah->ah_radio_5ghz_revision < AR5K_SREV_RAD_5133) { | ||
309 | 310 | ||
310 | if (ah->ah_mac_srev <= AR5K_SREV_VER_AR5424 && | 311 | /* AR5424 */ |
311 | ah->ah_mac_srev >= AR5K_SREV_VER_AR2424) | 312 | if (srev >= AR5K_SREV_VER_AR5424) { |
313 | ah->ah_radio = AR5K_RF5413; | ||
312 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424; | 314 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5424; |
313 | else | 315 | /* AR2424 */ |
316 | } else { | ||
317 | ah->ah_radio = AR5K_RF2413; /* For testing */ | ||
314 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; | 318 | ah->ah_phy_spending = AR5K_PHY_SPENDING_RF5112A; |
319 | } | ||
320 | |||
315 | /* | 321 | /* |
316 | * Register returns 0x4 for radio revision | 322 | * Register returns 0x4 for radio revision |
317 | * so ath5k_hw_radio_revision doesn't parse the value | 323 | * so ath5k_hw_radio_revision doesn't parse the value |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 21c886a9a1d9..6dcbb3c87e72 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -980,6 +980,42 @@ void b43_dma_free(struct b43_wldev *dev) | |||
980 | destroy_ring(dma, tx_ring_mcast); | 980 | destroy_ring(dma, tx_ring_mcast); |
981 | } | 981 | } |
982 | 982 | ||
983 | static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask) | ||
984 | { | ||
985 | u64 orig_mask = mask; | ||
986 | bool fallback = 0; | ||
987 | int err; | ||
988 | |||
989 | /* Try to set the DMA mask. If it fails, try falling back to a | ||
990 | * lower mask, as we can always also support a lower one. */ | ||
991 | while (1) { | ||
992 | err = ssb_dma_set_mask(dev->dev, mask); | ||
993 | if (!err) | ||
994 | break; | ||
995 | if (mask == DMA_64BIT_MASK) { | ||
996 | mask = DMA_32BIT_MASK; | ||
997 | fallback = 1; | ||
998 | continue; | ||
999 | } | ||
1000 | if (mask == DMA_32BIT_MASK) { | ||
1001 | mask = DMA_30BIT_MASK; | ||
1002 | fallback = 1; | ||
1003 | continue; | ||
1004 | } | ||
1005 | b43err(dev->wl, "The machine/kernel does not support " | ||
1006 | "the required %u-bit DMA mask\n", | ||
1007 | (unsigned int)dma_mask_to_engine_type(orig_mask)); | ||
1008 | return -EOPNOTSUPP; | ||
1009 | } | ||
1010 | if (fallback) { | ||
1011 | b43info(dev->wl, "DMA mask fallback from %u-bit to %u-bit\n", | ||
1012 | (unsigned int)dma_mask_to_engine_type(orig_mask), | ||
1013 | (unsigned int)dma_mask_to_engine_type(mask)); | ||
1014 | } | ||
1015 | |||
1016 | return 0; | ||
1017 | } | ||
1018 | |||
983 | int b43_dma_init(struct b43_wldev *dev) | 1019 | int b43_dma_init(struct b43_wldev *dev) |
984 | { | 1020 | { |
985 | struct b43_dma *dma = &dev->dma; | 1021 | struct b43_dma *dma = &dev->dma; |
@@ -989,14 +1025,9 @@ int b43_dma_init(struct b43_wldev *dev) | |||
989 | 1025 | ||
990 | dmamask = supported_dma_mask(dev); | 1026 | dmamask = supported_dma_mask(dev); |
991 | type = dma_mask_to_engine_type(dmamask); | 1027 | type = dma_mask_to_engine_type(dmamask); |
992 | err = ssb_dma_set_mask(dev->dev, dmamask); | 1028 | err = b43_dma_set_mask(dev, dmamask); |
993 | if (err) { | 1029 | if (err) |
994 | b43err(dev->wl, "The machine/kernel does not support " | 1030 | return err; |
995 | "the required DMA mask (0x%08X%08X)\n", | ||
996 | (unsigned int)((dmamask & 0xFFFFFFFF00000000ULL) >> 32), | ||
997 | (unsigned int)(dmamask & 0x00000000FFFFFFFFULL)); | ||
998 | return -EOPNOTSUPP; | ||
999 | } | ||
1000 | 1031 | ||
1001 | err = -ENOMEM; | 1032 | err = -ENOMEM; |
1002 | /* setup TX DMA channels. */ | 1033 | /* setup TX DMA channels. */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 943cc851c504..4bf8a99099fe 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -84,6 +84,10 @@ int b43_modparam_qos = 1; | |||
84 | module_param_named(qos, b43_modparam_qos, int, 0444); | 84 | module_param_named(qos, b43_modparam_qos, int, 0444); |
85 | MODULE_PARM_DESC(qos, "Enable QOS support (default on)"); | 85 | MODULE_PARM_DESC(qos, "Enable QOS support (default on)"); |
86 | 86 | ||
87 | static int modparam_btcoex = 1; | ||
88 | module_param_named(btcoex, modparam_btcoex, int, 0444); | ||
89 | MODULE_PARM_DESC(btcoex, "Enable Bluetooth coexistance (default on)"); | ||
90 | |||
87 | 91 | ||
88 | static const struct ssb_device_id b43_ssb_tbl[] = { | 92 | static const struct ssb_device_id b43_ssb_tbl[] = { |
89 | SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5), | 93 | SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5), |
@@ -3706,8 +3710,10 @@ static void setup_struct_wldev_for_init(struct b43_wldev *dev) | |||
3706 | static void b43_bluetooth_coext_enable(struct b43_wldev *dev) | 3710 | static void b43_bluetooth_coext_enable(struct b43_wldev *dev) |
3707 | { | 3711 | { |
3708 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; | 3712 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; |
3709 | u32 hf; | 3713 | u64 hf; |
3710 | 3714 | ||
3715 | if (!modparam_btcoex) | ||
3716 | return; | ||
3711 | if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST)) | 3717 | if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST)) |
3712 | return; | 3718 | return; |
3713 | if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode) | 3719 | if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode) |
@@ -3719,11 +3725,13 @@ static void b43_bluetooth_coext_enable(struct b43_wldev *dev) | |||
3719 | else | 3725 | else |
3720 | hf |= B43_HF_BTCOEX; | 3726 | hf |= B43_HF_BTCOEX; |
3721 | b43_hf_write(dev, hf); | 3727 | b43_hf_write(dev, hf); |
3722 | //TODO | ||
3723 | } | 3728 | } |
3724 | 3729 | ||
3725 | static void b43_bluetooth_coext_disable(struct b43_wldev *dev) | 3730 | static void b43_bluetooth_coext_disable(struct b43_wldev *dev) |
3726 | { //TODO | 3731 | { |
3732 | if (!modparam_btcoex) | ||
3733 | return; | ||
3734 | //TODO | ||
3727 | } | 3735 | } |
3728 | 3736 | ||
3729 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) | 3737 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) |
@@ -3852,7 +3860,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3852 | struct ssb_sprom *sprom = &bus->sprom; | 3860 | struct ssb_sprom *sprom = &bus->sprom; |
3853 | struct b43_phy *phy = &dev->phy; | 3861 | struct b43_phy *phy = &dev->phy; |
3854 | int err; | 3862 | int err; |
3855 | u32 hf, tmp; | 3863 | u64 hf; |
3864 | u32 tmp; | ||
3856 | 3865 | ||
3857 | B43_WARN_ON(b43_status(dev) != B43_STAT_UNINIT); | 3866 | B43_WARN_ON(b43_status(dev) != B43_STAT_UNINIT); |
3858 | 3867 | ||
@@ -4414,8 +4423,16 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl) | |||
4414 | return err; | 4423 | return err; |
4415 | } | 4424 | } |
4416 | 4425 | ||
4426 | #define IS_PDEV(pdev, _vendor, _device, _subvendor, _subdevice) ( \ | ||
4427 | (pdev->vendor == PCI_VENDOR_ID_##_vendor) && \ | ||
4428 | (pdev->device == _device) && \ | ||
4429 | (pdev->subsystem_vendor == PCI_VENDOR_ID_##_subvendor) && \ | ||
4430 | (pdev->subsystem_device == _subdevice) ) | ||
4431 | |||
4417 | static void b43_sprom_fixup(struct ssb_bus *bus) | 4432 | static void b43_sprom_fixup(struct ssb_bus *bus) |
4418 | { | 4433 | { |
4434 | struct pci_dev *pdev; | ||
4435 | |||
4419 | /* boardflags workarounds */ | 4436 | /* boardflags workarounds */ |
4420 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL && | 4437 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL && |
4421 | bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74) | 4438 | bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74) |
@@ -4423,6 +4440,13 @@ static void b43_sprom_fixup(struct ssb_bus *bus) | |||
4423 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && | 4440 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && |
4424 | bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40) | 4441 | bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40) |
4425 | bus->sprom.boardflags_lo |= B43_BFL_PACTRL; | 4442 | bus->sprom.boardflags_lo |= B43_BFL_PACTRL; |
4443 | if (bus->bustype == SSB_BUSTYPE_PCI) { | ||
4444 | pdev = bus->host_pci; | ||
4445 | if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) || | ||
4446 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) || | ||
4447 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013)) | ||
4448 | bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST; | ||
4449 | } | ||
4426 | } | 4450 | } |
4427 | 4451 | ||
4428 | static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl) | 4452 | static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl) |
diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c index 575c5436ebdf..de024dc03718 100644 --- a/drivers/net/wireless/b43/phy.c +++ b/drivers/net/wireless/b43/phy.c | |||
@@ -2043,7 +2043,7 @@ int b43_phy_init(struct b43_wldev *dev) | |||
2043 | void b43_set_rx_antenna(struct b43_wldev *dev, int antenna) | 2043 | void b43_set_rx_antenna(struct b43_wldev *dev, int antenna) |
2044 | { | 2044 | { |
2045 | struct b43_phy *phy = &dev->phy; | 2045 | struct b43_phy *phy = &dev->phy; |
2046 | u32 hf; | 2046 | u64 hf; |
2047 | u16 tmp; | 2047 | u16 tmp; |
2048 | int autodiv = 0; | 2048 | int autodiv = 0; |
2049 | 2049 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 1a5678fe4224..a1a0b3c581f1 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6907,7 +6907,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
6907 | 6907 | ||
6908 | if (priv->vif != vif) { | 6908 | if (priv->vif != vif) { |
6909 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | 6909 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); |
6910 | mutex_unlock(&priv->mutex); | ||
6911 | return 0; | 6910 | return 0; |
6912 | } | 6911 | } |
6913 | 6912 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index d7e2358a213a..d0bbcaaeb94c 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -6473,7 +6473,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
6473 | 6473 | ||
6474 | if (priv->vif != vif) { | 6474 | if (priv->vif != vif) { |
6475 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | 6475 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); |
6476 | mutex_unlock(&priv->mutex); | ||
6477 | return 0; | 6476 | return 0; |
6478 | } | 6477 | } |
6479 | 6478 | ||
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index e5b3c282009c..5b375b289036 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -1186,7 +1186,7 @@ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info, | |||
1186 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYID, 0, NULL, &r); | 1186 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYID, 0, NULL, &r); |
1187 | devindex = r.u; | 1187 | devindex = r.u; |
1188 | /* Now get the key, return it */ | 1188 | /* Now get the key, return it */ |
1189 | if ((index < 0) || (index > 3)) | 1189 | if (index == -1 || index > 3) |
1190 | /* no index provided, use the current one */ | 1190 | /* no index provided, use the current one */ |
1191 | index = devindex; | 1191 | index = devindex; |
1192 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYX, index, NULL, &r); | 1192 | rvalue |= mgt_get_request(priv, DOT11_OID_DEFKEYX, index, NULL, &r); |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 977751f372ff..d0b1fb15c709 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2402,7 +2402,6 @@ static int bcm4320_early_init(struct usbnet *dev) | |||
2402 | priv->param_power_output = modparam_power_output; | 2402 | priv->param_power_output = modparam_power_output; |
2403 | priv->param_roamtrigger = modparam_roamtrigger; | 2403 | priv->param_roamtrigger = modparam_roamtrigger; |
2404 | priv->param_roamdelta = modparam_roamdelta; | 2404 | priv->param_roamdelta = modparam_roamdelta; |
2405 | priv->param_workaround_interval = modparam_workaround_interval; | ||
2406 | 2405 | ||
2407 | priv->param_country[0] = toupper(priv->param_country[0]); | 2406 | priv->param_country[0] = toupper(priv->param_country[0]); |
2408 | priv->param_country[1] = toupper(priv->param_country[1]); | 2407 | priv->param_country[1] = toupper(priv->param_country[1]); |
@@ -2425,8 +2424,10 @@ static int bcm4320_early_init(struct usbnet *dev) | |||
2425 | else if (priv->param_roamdelta > 2) | 2424 | else if (priv->param_roamdelta > 2) |
2426 | priv->param_roamdelta = 2; | 2425 | priv->param_roamdelta = 2; |
2427 | 2426 | ||
2428 | if (priv->param_workaround_interval < 0) | 2427 | if (modparam_workaround_interval < 0) |
2429 | priv->param_workaround_interval = 500; | 2428 | priv->param_workaround_interval = 500; |
2429 | else | ||
2430 | priv->param_workaround_interval = modparam_workaround_interval; | ||
2430 | 2431 | ||
2431 | rndis_set_config_parameter_str(dev, "Country", priv->param_country); | 2432 | rndis_set_config_parameter_str(dev, "Country", priv->param_country); |
2432 | rndis_set_config_parameter_str(dev, "FrameBursting", | 2433 | rndis_set_config_parameter_str(dev, "FrameBursting", |
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 904b1a8d0885..57c4ccfab1ee 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c | |||
@@ -484,6 +484,11 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out, | |||
484 | goto unsupported; | 484 | goto unsupported; |
485 | } | 485 | } |
486 | 486 | ||
487 | if (out->boardflags_lo == 0xFFFF) | ||
488 | out->boardflags_lo = 0; /* per specs */ | ||
489 | if (out->boardflags_hi == 0xFFFF) | ||
490 | out->boardflags_hi = 0; /* per specs */ | ||
491 | |||
487 | return 0; | 492 | return 0; |
488 | unsupported: | 493 | unsupported: |
489 | ssb_printk(KERN_WARNING PFX "Unsupported SPROM revision %d " | 494 | ssb_printk(KERN_WARNING PFX "Unsupported SPROM revision %d " |