Age | Commit message (Collapse) | Author |
|
This patch replaces the static rssi auto calibration data
with more precise values out of the device's eeprom.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
There are two places in the rtl8187 code where a routine was returning zero
(OK) when it should have been returning an error.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch moves a good chunk of code from the former statistic update
timer routine into a workqueue, which is kindly provided by mac80211.
Also as a nice side-effect we can lay the foundation for other
essential housekeeping features we want to do in the future.
e.g:
- drain the (clogged) tx_queue.
- initiate bursts.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Rate scaling in agn can be broken because of these two problems
1- the LQ command could not sent, we try to call LQ command before
post association will be rejected, this will cause the driver to
break in rs_tx_status reporting initial rate does not match.
2- In rs_rate_init we can get a value of 12, rate 60, for
last_txrate_idx, this rate only valid in SISO/MIMO mode only
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
When a STA roams back to the same AP before the previous STA entry has
expired, a new STA entry is not added in mac80211. However, a Layer 2
Update frame still needs to be transmitted to update layer 2 devices
about the new location for the STA. Without this, switches may
continue to forward frames to the previous (now incorrect) port when
STA roams between APs.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Padding the 802.11 header to a multiple of 4 bytes needs to be done only for
frames with a body. This fixes a bug where 2 bytes were missing in monitor
mode for ACK frames. Inspired by a patch from Jouni Malinen on ath9k.
Ref: http://bugzilla.kernel.org/show_bug.cgi?id=12101 :
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Fix and clean up the RX status reporting by getting rid of code that
used internal rate tables and ratekbps calculation. The correct value
is now reported with MCS index instead of the old mechanism that
defaulted to using the highest legacy rate.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch adds option for HT-enabled drivers to report HT rates
(HT20/HT40, short GI, MCS index) to mac80211. These rates are
currently not in the rate table, so the rate_idx is used to indicate
MCS index.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Now that HT information is made available to the driver through
config() callback, the channel type can be calculated whenever
setting the channel. Update the rate table accordingly with the new
channel type.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
HT management is done differently for AP and STA modes, unify
to just the ->config() callback since HT is fundamentally a
PHY property and cannot be per-BSS.
Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
the channel type ( NO_HT, HT20, HT40+, HT40- ).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch adds signal strength and transmission bitrate
to the station_info of nl80211.
Signed-off-by: Henning Rogge <rogge@fgan.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The code appears to be dead: nobody call these functions, plus build
breaks when UGETH_FILTERING is enabled:
ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want
ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash':
ucc_geth.c:1856: error: dereferencing pointer to incomplete type
ucc_geth.c:1874: error: dereferencing pointer to incomplete type
ucc_geth.c:1877: warning: return from incompatible pointer type
ucc_geth.c: At top level:
ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash':
ucc_geth.c:1894: error: dereferencing pointer to incomplete type
ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
ucc_geth.c:1909: warning: assignment from incompatible pointer type
ucc_geth.c:1918: error: dereferencing pointer to incomplete type
ucc_geth.c: At top level:
ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash':
ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
ucc_geth.c:1947: warning: assignment from incompatible pointer type
ucc_geth.c:1954: error: dereferencing pointer to incomplete type
ucc_geth.c: At top level:
ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr':
ucc_geth.c:2064: error: dereferencing pointer to incomplete type
ucc_geth.c:2073: error: dereferencing pointer to incomplete type
ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type
make[2]: *** [ucc_geth.o] Error 1
The code is there since the driver was merged, and nobody seem to be
interested in fixing or actually using it. If we ever want the
filtering support, we can always revert the patch and fix it, but so
far it just draws reader's attention.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The driver doesn't check ioremap() return value, and doesn't free the
remapped memory.
This patch fixes it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
No need to call ucc_geth_memclean() so many times, just check for
errors in ucc_geth_open(), and call ucc_geth_stop() in case of errors.
The ucc_geth_stop() may be called anytime and will do the right thing.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
open() routine calls stop() in case of errors, the function will try
to free the requested IRQ. But we don't know if it was actually
requested, so the code might issue bogus free_irq(0, dev) call.
Fix this by rearranging the code so that now request_irq() is the last
call in the open() routine, and move free_irq() into the close().
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The timeout handling code is currently broken in several ways:
- It calls stop() (which frees all the memory and IRQ), and then
calls startup() (which won't re-request IRQ, neither it will
re-init the Fast UCC structure).
- It calls these routines from the softirq context, which is wrong,
since stop() calls free_irq() (which might sleep) and startup()
allocates things with GFP_KERNEL.
- It won't soft-reset the PHY. We need the PHY reset for at least
MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover
from timeouts w/o the reset.
So the patch fixes these problems by implementing the workqueue for the
timeout handling, and there we fully re-open the device via close() and
open() calls. The close/open paths do the right things, and I can see
that the driver actually survive the timeouts.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Currently the routines wait for the various bits w/o an assumption that
bits may never get set. When timeouts happen I see that these bits never
get set and so the routines hang the kernel.
With this patch we'll wait the graceful stop for 100 ms, and then will
simply exit. There is nothing* we can do about that, but it's OK since
we'll do full reset later.
* Well, actually, there is also not-graceful variant for the TX stop,
but specs says that we never should use it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The original message was unhelpful and extremely alarming to our poor
users, despite its charm. Make it less frightening.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Optimize the lightly loaded case, by only synchronizing discards stats
when qlen > 10 indicate potential for drops.
Notice Robert Olsson might disagree with this patch.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Discard packet counter debug statements that can be turned on
at runtime by users to assist debugging of the driver code.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Implementing discard counters for the NIU driver turned out to be more
complicated than first assumed.
The discard counters for the NIU neptune chip are only 16-bit (even
though this is a 64-bit chip). These 16-bit counters can overflow
quickly, especially considering this is a 10Gbit/s ethernet card.
The overflow indication bit is, unfortunatly, not usable as the
counter value does not wrap, but remains at max value 0xFFFF.
Resulting in lost counts until the counter is reset.
The read and reset scheme also poses a problem. Both in theory and in
practice counters can be lost in between reading nr64() and clearing
the counter nw64(). For this reason, the number of counter clearings
nw64() is limited/reduced. On the fast-path the counters are only
syncronized once it exceeds 0x7FFF. When read by userspace, its
syncronized fully.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
A major source of overhead in the enc28j60 driver is the SPI transfers. Each
SPI transfer entails two kernel thread context switches. One major source of
SPI transfers is the enc28j60_set_bank() functions which runs before every
register access. This patch reduces the number of SPI transfers that
enc28j60_set_bank() performs in two ways:
1. removes unnecessary bank switch for the registers that are present in all
banks
2. when switching from banks 0 or 3 to banks 1 or 2 (i.e. only one bit
changes) enc28j60_set_bank() does only one SPI transfer instead of two
According to my tests these changes reduce the number of SPI transfers in
about 25%.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
| commit 3d29b0c33d431ecc69ec778f8c236d382f59a85f
| Author: John W. Linville <linville@tuxdriver.com>
| Date: Fri Oct 31 14:13:12 2008 -0400
|
| netdevice zd1201: Convert directly reference of netdev->priv to netdev_priv()
|
| We have some reasons to kill netdev->priv:
| 1. netdev->priv is equal to netdev_priv().
| 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
| netdev_priv() is more flexible than netdev->priv.
| But we cann't kill netdev->priv, because so many drivers reference to it
| directly.
|
| OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug",
| and I want to kill netdev->priv later, I decided to convert all the direct
| reference of netdev->priv first.
|
| (Original patch posted by Wang Chen <wangchen@cn.fujitsu.com> w/ above
| changelog but using dev->ml_priv. That doesn't seem appropriate
| to me for this driver, so I've revamped it to use netdev_priv()
| instead. -- JWL)
This commit changed the allocation of netdev, but didn't change
the free method of it.
This causes "zd" be used after the memory, which is pointed by "zd", being
freed by free_netdev().
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This reverts commit e061b165c7f4ec5e2e160d990b49011b5b6e5c6a.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This reverts commit 70355602879229c6f8bd694ec9c0814222bc4936.
As pointed out by Mark McLoughlin IP_PKTINFO cmsg data is one
post-queueing user, so this optimization is not valid right
now.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
I also removed some of the unneeded braces in the if condition to
improve readability and a little bit of reformatting.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
They are all defined before used, it's therefore ok to remove
them.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Also remove the pointless comment at the top.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
It helps in maintaining the various partner information values from
the LACPDU. It also removes the pointless comment at the top.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
It generally helps to handle those values in various places, using it
might make the code more readable and gives room for other improvements.
The IEEE standard talks about them as "parameter values".
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The previous code was just a funny way of assigning both values (they
are both of type u8).
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
gfar_poll would declare polling done once the rx queue was empty,
but the tx queue could still have packets left.
Stolen mostly from the e1000 driver.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
No clean up function is executed in the interrupt context by this patch.
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Interface name (ex. eth0) is used as the prefix for the interrupt name,
with _rx, _tx, and _er appended to distinguish multiple interrupts on
the same interface.
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Scatter Gather support in gianfar driver to handle fragmented frames on
the transmit side.
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The patch which fixed gianfar so it drops packets when it runs out
of memory left in the code which frees the skb when it drops packets.
Change the code so that we only free the skb if the new skb was successfully
created.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
And thus when we try to use 'ss -danemi' on these sockets that have no
ccid blocks (data collected using systemtap after I fixed the problem):
dccp_diag_get_info sk=0xffff8801220a3100, dp->dccps_hc_rx_ccid=0x0000000000000000, dp->dccps_hc_tx_ccid=0x0000000000000000
We get an OOPS:
mica.ghostprotocols.net login: BUG: unable to handle kernel NULL pointer
dereferenc0
IP: [<ffffffffa0136082>] dccp_diag_get_info+0x82/0xc0 [dccp_diag]
PGD 12106f067 PUD 122488067 PMD 0
Oops: 0000 [#1] PREEMPT
Fix is trivial, and 'ss -d' is working again:
[root@mica ~]# ss -danemi
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 0 *:5001 *:*
ino:7288 sk:220a3100ffff8801
mem:(r0,w0,f0,t0) cwnd:0 ssthresh:0
[root@mica ~]#
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This implements the Nokia vendor-specific communication device class
function to exchange Phonet messages over USB. This function is already
found in the "PC suite" USB profile of (non-Linux) Nokia handsets.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
GPRS TX flow control won't need to lock the underlying socket anymore.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
A separate xmit lock class supports GPRS over a Phonet pipe over a TUN
device (type ARPHRD_NONE).
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Also leave some room for more 802.11 types.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Use idr technique instead of own implemented cardmaps.
It saves us a number of lines and gives an ability
to use library functions.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
These are now defined in linux/mii.h and the bnx2x driver
defines different values which are shared with hardware
data structures.
So add a "BNX2X_" prefix to these macro names.
Based upon a report from Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
|