Commit graph

10567 commits

Author SHA1 Message Date
Daniel Halperin 7dddaf1a36 iwlwifi: Update reclaim flag
The reclaim flag should include REPLY_RX_MPDU_CMD in the list of commands
issued by uCode. This is for safety in case the SEQ_RX_FRAME bit is set
incorrectly.

Signed-off-by: Daniel Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:29 -04:00
Fabrice Bellet 9fe1c50520 iwl3945: iwl3945_mac_get_tsf() should not return zero
The problem fixed here is that iwl3945_mac_get_tsf() returns 0, as the
function is not implemented, and this is considered as a valid value by
the mac layer in mlme.c:1605. The consequence is that the STA in ad-hoc
mode is inserted/removed quite frequently due to IBSS merging.

This patch fixes :
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1781
and https://bugzilla.redhat.com/show_bug.cgi?id=459401

Signed-off-by: Fabrice Bellet <fabrice@bellet.info>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:28 -04:00
Tomas Winkler a96a27f97f iwlwifi: run through spell checker
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:28 -04:00
Tomas Winkler 127901ab69 iwlwifi: refactor tx byte count table usage
This patch drops unreadable usage of IWL_SET/GET_BITS16 in byte count
tables handling
This patch also cleans a bit the byte count table code and adds
WARN_ON traps on invalid values

This patch is pure cleanup, no functional changes.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:27 -04:00
Mohamed Abbas 951891c7ef iwlwifi: clear scanning bits upon failure
In iwl_bg_request_scan function, if we could not send a
scan command it will go to done.
In done it does the right thing to call mac80211 with
scan complete, but the problem is STATUS_SCAN_HW is still
set causing any future scan to fail. Fix by clearing the scanning status
bits if scan fails.

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>
2008-10-31 19:02:26 -04:00
Daniel C. Halperin 60d32215a9 iwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets
The driver does not properly convert rate_n_flags to PLCP index for mimo3
packets. This makes mac80211 drop the packets

Signed-off-by: Daniel C. Halperin <daniel.c.halperin@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:26 -04:00
Tomas Winkler f69f42a6bb iwlwifi: calibration command namespace renaming
Since calibration framework is not HW specific remove 5000 and 4965 prefix
This patch doesn't provide any functional changes only code renaming
and movement

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:25 -04:00
Tomas Winkler 0ef2ca67b1 iwlwifi: parametrize eeprom versions
This patch uses new parameters eeprom_ver and eeprom_calib_ver
to support additional HW.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:24 -04:00
Tomas Winkler ed7fafec5e iwlwifi: don't update TFD free counter for invalid station
This patch makes sure that station table is not accessed
with invalid station id in 4965 TX response path

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:23 -04:00
Tomas Winkler 3fd07a1e5a iwlwifi: refactor TX response flow
This patch utilize 5000 new TX response command
which contains all necessary information and avoids
back referencing to the original TX frame.
It also change handling of software queue tracking
4965 flow is aligned with changes as much as possible.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:23 -04:00
Sujith 8b30b1fe36 mac80211: Re-enable aggregation
Wireless HW without any dedicated queues for aggregation
do not need the ampdu_queues mechanism present right now
in mac80211. Since mac80211 is still incomplete wrt TX MQ
changes, do not allow aggregation sessions for drivers that
set ampdu_queues.

This is only an interim hack until Intel fixes the requeue issue.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:02:14 -04:00
Sujith a4510bf8d9 ath9k: Check if the STA supports HT when initializing rate control
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:55 -04:00
Luis R. Rodriguez 5c020dc6a0 ath9k: Allow user to change tx power when asked
We were also changing tx power even when we were not asked to,
this enforces the change only when we are asked nicely. When
not asked we simply try to use the max power, we don't tx power
at all for rate control.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:54 -04:00
Luis R. Rodriguez f97e40078e ath9k: enable RX interrupt mitigation
This enables hardware interrupt mitigation on RX.
It should alleviate system interrupt load intelligently.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:53 -04:00
Luis R. Rodriguez b139a10a0a ath9k: remove pointless sc_txintrperiod and spin_lock_bh on tx prepare
sc_txintrperiod is currently set to 0 and never updated. We won't
be using this, if anything we will consider using TX interrupt
mitigation but that is different and not yet tested. So remove
sc_txintrperiod and the pointless spin_lock_bh() on tx prepare.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:52 -04:00
John W. Linville 7211801527 wireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflicts
There is quite a lot of overlap in definitions between these headers...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:50 -04:00
John W. Linville 9387b7caf3 wireless: use individual buffers for printing ssid values
Also change escape_ssid to print_ssid to match print_mac semantics.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:50 -04:00
John W. Linville c5d3dce875 wireless: remove NETWORK_EMPTY_ESSID flag
It is unnecessary and of questionable value.  Also remove
is_empty_ssid, as it is also unnecessary.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:48 -04:00
John W. Linville 7e272fcff6 wireless: consolidate on a single escape_essid implementation
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:46 -04:00
Zhaolei cfa3fa405a Fix debugfs_create_*'s error checking method for wireless/rt2x00/
debugfs_create_*() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:45 -04:00
Zhaolei 9b24001db1 Fix debugfs_create_bool's error checking method for wireless/iwlwifi/
debugfs_create_bool() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:44 -04:00
John Daiker 558875112c rt2x00: reduce checkpatch.pl errors
A few changes to reduce checkpatch.pl errors in the rt2x00 driver.  For
the most part, I only fixed cosmetic things, and left the actual 'code
flow' untouched (hopefully)!

Diff is against wireless-testing HEAD.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:40 -04:00
John Daiker 0bbac08f0a ath5k: reduce checkpatch.pl errors
A few changes to reduce checkpatch.pl errors in the ath5k driver.  For
the most part, I only fixed cosmetic things, and left the actual 'code
flow' untouched (hopefully)!

Diff is against wireless-testing HEAD.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:40 -04:00
Larry Finger 8216bfe251 hostap: Fix sparse warnings
A compilation with the command "make C=2 CF="-D__CHECK_ENDIAN__" \
                                drivers/net/wireless/hostap/"

 yields the following warnings:

  CHECK   drivers/net/wireless/hostap/hostap_info.c
drivers/net/wireless/hostap/hostap_info.c:156:43: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:156:43:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:156:43:    got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:294:44: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:294:44:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:294:44:    got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:487:12: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:487:12:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:487:12:    got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:491:12: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:491:12:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:491:12:    got long *<noident>

The warnings are fixed with the following compile-tested fix:

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:38 -04:00
Johannes Berg 50fb2e4572 mac80211: remove rate_control_clear
"Clearing" the rate control algorithm is pointless, none of
the algorithms actually uses this operation and it's not even
invoked properly for all channel switching. Also, there's no
need to since rate control algorithms work per station.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:37 -04:00
Tomas Winkler 65a0667b43 iwlwifi: protect headers from double inclusion
This patch protects iwl-csr.h and iwl-fh.h from double inclusion
by ifndef define endif idiom

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:36 -04:00
John W. Linville 27df605ebe p54: integrate parts of lmac_longbow.h and other parts of stlc45xx
This patch removes most/all? of the "magic" numbers and unknown structure
variables inside the code and replaces them with meaningful prototypes.

(Plus a one line warning fix from Larry Finger <Larry.Finger@lwfinger.net>.)

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:34 -04:00
Christian Lamparter 5e73444e91 p54: borrow some setup code from stlc45xx
This patch initialize all remaining values which are necessary for
SPI firmwares.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:34 -04:00
Christian Lamparter b92f30d65a p54: fix memory management
We have to be careful if multiple "control frames" are passed in a very short intervals to
the device's firmware. As p54_assign_address always put them into same memory location.
To guarantee that this won't happen anymore, we have to treat control frames like normal
data frames in the devices own memory management.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:33 -04:00
Christian Lamparter 9de5776ff3 p54: p54: refactor p54_rx_frame_sent
the long names and the nesting in p54_rx_frame_sent really
became a "line longer than 80 characters" problem.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:33 -04:00
Christian Lamparter 0f1be97891 p54: refactor statistic timer code
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:32 -04:00
Christian Lamparter 0fdd7c5d2d p54: broken out edcf changes
This patch series hopefully increases p54's "longterm" stability.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:31 -04:00
Tomas Winkler b88b15dfbd iwlwifi: tx command must run on same tfd as packet
This patch makes clear that tx command is attached to the same tfd as
the tx packet

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:31 -04:00
Tomas Winkler 499b188303 iwlwifi: fix TX cmd dma unmapping
This patch:
1. fixes command DMA unmapping, this might be visible only
	on platforms where DMA unmapping is no noop such as PPC64 (not tested)
2. attaches correctly high memory part of the host command buffer
3. changes structure of TFD TB
	instead of describing transmit buffer (TB) tuple it describes single
	TB and makes code more readable on price of one unaligned access
4. eliminates using of IWL_GET/SET_BITs for TFD handling
5. renames TFD structures to mach the HW spec
6. reduces iwl_tx_info size by reserving first TB to the host command

This patch should not have any visible effect on x86 32

This patch is rework of
iwlwifi: fix DMA code and bugs from
Johannes Berg <johannes@sipsolutions.net>

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:30 -04:00
Tomas Winkler 76eff18bdc iwlwifi: unify tx antenna toggling
TX antenna toggling is requested for management frames in tx and
scanning. I addition toggling in scanning was incorrect;

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:29 -04:00
Tomas Winkler 961ba60abe iwlwifi: add iwl_cmd_queue_free for readability
This patch adds iwl_cmd_queue_free function and
separate cmd queue freeing from regular tx queue freeing.
This improves readability and adds one more step in
restructuring  of cmd queue handling

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:28 -04:00
Tomas Winkler 3257e5d4eb iwlwifi: remove host commands structures from iwl_cmd
This patch removes host commands structures from iwl_cmd
to make more HW oblivious
tx cmd was left it needs special treatment.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:27 -04:00
Jay Sternberg 56e1261596 iwlwifi: expand error lookup and align output
change desc_lookup from hard coded switch to a simple lookup table and expand
list to include all errors.  Also corrected output using this string so info
is aligned and easier to read when debugging issues.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:26 -04:00
Jay Sternberg 4e062f99af iwlwifi: define firmware file name once
string repeated for definition of ucode firmware file and in preparation for
multiple firmware files need to consolidate location for their definition.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Acked-by: Tomas Winkler <tomas.winler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:26 -04:00
Tim Gardner 5c7f9b7363 ipw2x00: change default policy for auto-associate
Do not attempt association until directed to do so by a user space
application. In particular, this avoids race conditions with
NetworkManager association state.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:24 -04:00
Johannes Berg c12abae333 p54: implement MRR
This implements multi-rate retry in p54. With lots of help
and testing from Christian and the limiting idea from nbd.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:24 -04:00
Johannes Berg e6a9854b05 mac80211/drivers: rewrite the rate control API
So after the previous changes we were still unhappy with how
convoluted the API is and decided to make things simpler for
everybody. This completely changes the rate control API, now
taking into account 802.11n with MCS rates and more control,
most drivers don't support that though.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:23 -04:00
Wang Chen faf3994a9f airo: Kill directly reference of 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.

In this driver, I don't simply use netdev_priv() to replace netdev->priv.

The reason is:
Pointer netdev->priv was changed in this driver, but it shouldn't.
Because the memory was allocated when alloc_netdev() and netdev->priv
should always point to that memory.

So I use netdev->ml_priv to replace netdev->priv.
After replacing, both ai and ai->wifidev->ml_priv point to the same memory.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:22 -04:00
Andrey Yurovsky b706e65b40 ath5k: fix mesh point operation
This patch fixes mesh point operation (thanks to YanBo for pointing
out the problem): make mesh point interfaces start beaconing when
they come up and configure the RX filter in mesh mode so that mesh
beacons and action frames are received.  Add mesh point to the check
in ath5k_add_interface.  Tested with multiple AR5211 cards.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:21 -04:00
Luis R. Rodriguez 6e0e0bf80c ath5k: correct ath5k signal quality
This adjusts ath5k's signal quality reporting taking into
consideration received beacons at an RSSI of 35 should indicate
you can use of 54 Mbps on a single stream card (all ath5k cards)
reliably.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:20 -04:00
Luis R. Rodriguez c49d154a80 ath9k: correct signal quality report
This adjusts ath9k's signal quality reporting taking into
consideration received beacons at an RSSI of 45 should indicate
you can use of MCS 15 rate (144 Mbps) reliably on dual stream card.
Keep in mind mac80211 does not yet have aggregation fixed but this
should still provide more accurate results.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:20 -04:00
Herton Ronaldo Krzesinski f8288317b5 rtl8187: add short slot handling for 8187B
This change adds short slot handling for 8187B variant of rtl8187 chips.
Some things to note about changes done:
* Values used are chosen to met 802.11-2007 spec. This raised a question
  about SIFS value used with 8187L: 0x22 (34) doesn't match any spec
  value. For now just don't change 8187L, but is something to be
  looked at.
* On 8187B, the location of EIFS register is at the same place as BRSR+1
  of struct rtl818x_csr. Unfortunately there is no clean way to
  accomodate 8187B differences currently, just use address of BRSR+1 and
  comment about it. The same thing happens for Ack timeout register,
  that is on CARRIER_SENSE_COUNTER location of 8187L. The eifs and ack
  timeout values are in units of 4us. All these registers information
  was gathered from references being the vendor gpl driver and 8180
  datasheet, unfortunately there is no information about this on 8187B
  datasheet. Also the ack timeout value was inspired by the same
  calculation as done on rt2x00.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:19 -04:00
Herton Ronaldo Krzesinski 64761077f8 rtl8187: adapt for deprecated IEEE80211_CONF_SHORT_SLOT_TIME flag
This updates 8187L handling for short slot after "mac80211: fix short
slot handling". For 8187B, there was no handling done for short slot
timing so nothing done, support for it will come in a following patch.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:18 -04:00
Jiri Slaby da966bcae7 Ath5k: add AP mode
Add support for AP mode. This involves:
- enablement in ath5k_beacon_config -- initialize beacon timer
- add AP to the supported modes in ath5k_add_interface
- handle beacon change even for AP in ath5k_config_interface
- remove useless test for IBSS in ath5k_beacon_update

Note that it doesn't enable the AP mode for the driver. It must
be enabled by NL80211_IFTYPE_AP bit added to interface_modes.

v2:
Fixed opmode constant (IEEE80211_ to NL80211_)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:17 -04:00
Johannes Berg 7eb27af766 p54/rtl8187: fix up the seqno patch
Sorry about that, for some reason I didn't notice that I'd
left some unused variables in there.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:16 -04:00
Johannes Berg ae5eb02641 mac80211: rewrite HT handling
The HT handling has the following deficiencies, which I've
(partially) fixed:
 * it always uses the AP info even if there is no AP,
   hence has no chance of working as an AP
 * it pretends to be HW config, but really is per-BSS
 * channel sanity checking is left to the drivers
 * it generally lets the driver control too much

HT enabling is still wrong with this patch if you have more than
one virtual STA mode interface, but that never happens currently.
Once WDS, IBSS or AP/VLAN gets HT capabilities, it will also be
wrong, see the comment in ieee80211_enable_ht().

Additionally, this fixes a number of bugs:
 * mac80211: ieee80211_set_disassoc doesn't notify the driver any
             more since the refactoring
 * iwl-agn-rs: always uses the HT capabilities from the wrong stuff
               mac80211 gives it rather than the actual peer STA
 * ath9k: a number of bugs resulting from the broken HT API

I'm not entirely happy with putting the HT capabilities into
struct ieee80211_sta as restricted to our own HT TX capabilities,
but I see no cleaner solution for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:16 -04:00
Johannes Berg 9124b07740 mac80211: make retry limits part of hw config
Instead of having a separate callback, use the HW config callback
with a new flag to change retry limits.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:14 -04:00
Johannes Berg 525181891f iwl3945: fix station stuff in RC algorithm
Probably bugs I added.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:14 -04:00
Johannes Berg 94778280fa mac80211: provide sequence numbers
I've come to think that not providing sequence numbers for
the normal STA mode case was a mistake, at least two drivers
now had to implement code they wouldn't otherwise need, and
I believe at76_usb and adm8211 might be broken.

This patch makes mac80211 assign a sequence number to all
those frames that need one except beacons. That means that
if a driver only implements modes that do not do beaconing
it need not worry about the sequence number.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:12 -04:00
Larry Finger 2e20cc3986 p54: Move rx_mtu to struct bootrec_desc
The patch entitled "[PATCH] p54: Fix sparse warnings" added the __le16
variable rx_mtu to struct bootrec, but it could equally well be placed
in the struct bootrec_desc, which overlays the 'data' section of bootrec.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:11 -04:00
Johannes Berg e8975581f6 mac80211: introduce hw config change flags
This makes mac80211 notify the driver which configuration
actually changed, e.g. channel etc.

No driver changes, this is just plumbing, driver authors are
expected to act on this if they want to.

Also remove the HW CONFIG debug printk, it's incorrect, often
we configure something else.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:07 -04:00
Johannes Berg 0f4ac38b59 mac80211: kill hw.conf.antenna_sel_{rx,tx}
Never actually used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:06 -04:00
Johannes Berg d9fe60dea7 802.11: clean up/fix HT support
This patch cleans up a number of things:
 * the unusable definition of the HT capabilities/HT information
   information elements
 * variable names that are hard to understand
 * mac80211: move ieee80211_handle_ht to ht.c and remove the unused
             enable_ht parameter
 * mac80211: fix bug with MCS rate 32 in ieee80211_handle_ht
 * mac80211: fix bug with casting the result of ieee80211_bss_get_ie
             to an information element _contents_ rather than the
             whole element, add size checking (another out-of-bounds
             access bug fixed!)
 * mac80211: remove some unused return values in favour of BUG_ON
             checking
 * a few minor other things

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:06 -04:00
Christian Lamparter 40333e4fb4 p54: honour bss_info_changed's short slot time settings
This patch was made on behalf of Johannes request.
"mac80211 and IEEE80211_CONF_SHORT_SLOT_TIME"

Of course, bss_info_changed provides some more useful data.
e.g.: basic_rates, dtim_period, beacon_int and maybe even more.
Everything can be hooked up if it's necessary.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:05 -04:00
Rami Rosen 5d6924eaf0 mac80211: use HWSIM_STA_MAGIC in hwsim_check_sta_magic() and hwsim_set_sta_magic().
This patch fixes a typo in mac80211_hwsim.c:
use HWSIM_STA_MAGIC in hwsim_check_sta_magic() and hwsim_set_sta_magic()
instead of HWSIM_VIF_MAGIC.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:04 -04:00
Tomas Winkler 3195c1f349 iwlwifi: refactor rxon time command
This patch refactors rxon time command. It removes the usage of union tsf
in favor of u64 value and hopefully makes code more readable.  There are
no functional changes in this patch.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:04 -04:00
Tomas Winkler 5d664a41a0 iwlwifi: take a valid antenna upon rate scale init
This patch selects a valid antennae upon rate scale init. This solves a
SYSASSERT complaining that the driver is setting a non valid antenna in
the LQ CMD.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:03 -04:00
Tomas Winkler be5d56ed88 iwlwifi: make initial calibration set configurable
This patch adds ability to configure initial calibration set. Not all HW
supported by iwlwifi use the same calibration set, XTAL is one example.
Some clean ups are also included in this patch.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:02 -04:00
Harvey Harrison 63779436ab drivers: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-31 00:56:00 -07:00
David S. Miller a1744d3bee Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/p54/p54common.c
2008-10-31 00:17:34 -07:00
David S. Miller 3a8af72249 net: Really remove all of LOOPBACK_TSO code.
As noticed by Saikiran Madugula, commit 7447ef63cf
("loopback: Remove rest of LOOPBACK_TSO code.") got rid of
emulate_large_send_offload() but didn't get rid of the call
site as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-31 00:00:33 -07:00
Randy Dunlap ad1d967c88 net: delete excess kernel-doc notation
Remove excess kernel-doc function parameters from networking header
& driver files:

Warning(include/net/sock.h:946): Excess function parameter or struct member 'sk' description in 'sk_filter_release'
Warning(include/linux/netdevice.h:1545): Excess function parameter or struct member 'cpu' description in 'netif_tx_lock'
Warning(drivers/net/wan/z85230.c:712): Excess function parameter or struct member 'regs' description in 'z8530_interrupt'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-30 23:54:35 -07:00
David S. Miller 194dcdba5a Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-10-30 23:50:18 -07:00
David S. Miller 19b8cba2e8 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-10-30 23:35:23 -07:00
David S. Miller 263e69cbc9 pppoe: Fix socket leak.
Move SKB trim before we lookup the socket so we don't have to
put it on failure.

Based upon an initial patch by Jarek Poplawski and suggestions
from Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-30 23:35:02 -07:00
Trent Piepho bdb59f949d gianfar: Don't reset TBI<->SerDes link if it's already up
The link may be up already via the chip's reset strapping, or though action
of U-Boot, or from the last time the interface was brought up.  Resetting
the link causes it to go down for several seconds.  This can significantly
increase the time from power-on to DHCP completion and a device being
accessible to the network.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:59:53 -04:00
Trent Piepho c132419e56 gianfar: Fix race in TBI/SerDes configuration
The init_phy() function attaches to the PHY, then configures the
SerDes<->TBI link (in SGMII mode).  The TBI is on the MDIO bus with the PHY
(sort of) and is accessed via the gianfar's MDIO registers, using the
functions gfar_local_mdio_read/write(), which don't do any locking.

The previously attached PHY will start a work-queue on a timer, and
probably an irq handler as well, which will talk to the PHY and thus use
the MDIO bus.  This uses phy_read/write(), which have locking, but not
against the gfar_local_mdio versions.

The result is that PHY code will try to use the MDIO bus at the same time
as the SerDes setup code, corrupting the transfers.

Setting up the SerDes before attaching to the PHY will insure that there is
no race between the SerDes code and *our* PHY, but doesn't fix everything.
Typically the PHYs for all gianfar devices are on the same MDIO bus, which
is associated with the first gianfar device.  This means that the first
gianfar's SerDes code could corrupt the MDIO transfers for a different
gianfar's PHY.

The lock used by phy_read/write() is contained in the mii_bus structure,
which is pointed to by the PHY.  This is difficult to access from the
gianfar drivers, as there is no link between a gianfar device and the
mii_bus which shares the same MDIO registers.  As far as the device layer
and drivers are concerned they are two unrelated devices (which happen to
share registers).

Generally all gianfar devices' PHYs will be on the bus associated with the
first gianfar.  But this might not be the case, so simply locking the
gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
code is going to use.

We solve this by having the code that creates the gianfar platform device
look in the device tree for an mdio device that shares the gianfar's
registers.  If one is found the ID of its platform device is saved in the
gianfar's platform data.

A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
ID to search through the platform devices for a gianfar_mdio device with
the right ID.  The platform device's driver data is the mii_bus structure,
which the SerDes setup code can use to lock the current bus.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
CC: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:59:46 -04:00
Arjan van de Ven 275f165fa9 pci: use pci_ioremap_bar() in drivers/net
Use the newly introduced pci_ioremap_bar() function in drivers/net.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:53:48 -04:00
Atsushi Nemoto 842e08bd68 tc35815: Define more Rx status bits
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:53:34 -04:00
Divy Le Ray 04ecb07241 cxgb3 - enable lro control through ethtool
Implement ethtool's get_flags and set_flags methods.
It enables ethtool to control the LRO settings.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:52:51 -04:00
Rafael J. Wysocki bc79fc8409 e100: adapt to the reworked PCI PM
Adapt the e100 driver to the reworked PCI PM

* Use the observation that it is sufficient to call pci_enable_wake()
  once, unless it fails

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Frans Pop <elendil@planet.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:52:26 -04:00
Adrian Bunk 6b1abbaefa The overdue eepro100 removal.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:52:23 -04:00
Rafael J. Wysocki 5177b3240a skge: adapt skge to use reworked PCI PM
Adapt the skge driver to the reworked PCI PM

* Use device_set_wakeup_enable() and friends as needed
* Remove an open-coded reference to the standard PCI PM registers
* Use pci_prepare_to_sleep() and pci_back_from_sleep() in the
  ->suspend() and ->resume() callbacks
* Use the observation that it is sufficient to call pci_enable_wake()
  once, unless it fails

Tested on Asus L5D (Yukon-Lite rev 7).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:52:17 -04:00
David Brownell 71527ef484 at91_ether: request/free GPIO for PHY interrupt
When the at91_ether driver is using a GPIO for its PHY interrupt,
be sure to request (and later, if needed, free) that GPIO.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:47:56 -04:00
Chunbo Luo e83603fd4a amd8111e: fix dma_free_coherent context
Acoording commit aa24886e37,
dma_free_coherent() need irqs enabled.

This patch fix following warning messages:

WARNING: at linux/arch/x86/kernel/pci-dma.c:376 dma_free_coherent+0xaa/0xb0()

Call Trace:
 [<ffffffff8023f80f>] warn_on_slowpath+0x5f/0x90
 [<ffffffff80496ffa>] ? __kfree_skb+0x3a/0xa0
 [<ffffffff802a4723>] ? discard_slab+0x23/0x40
 [<ffffffff8021274a>] dma_free_coherent+0xaa/0xb0
 [<ffffffff8043668f>] amd8111e_close+0x10f/0x1b0
 [<ffffffff8049f3ae>] dev_close+0x5e/0xb0
 [<ffffffff8049efa1>] dev_change_flags+0xa1/0x1e0
 [<ffffffff806b2171>] ic_close_devs+0x36/0x4e
 [<ffffffff806b29ee>] ip_auto_config+0x581/0x10f3
 [<ffffffff803a6e19>] ? kobject_add+0x69/0x90
 [<ffffffff803a698a>] ? kobject_get+0x1a/0x30
 [<ffffffff803a785b>] ? kobject_uevent+0xb/0x10
 [<ffffffff803a6c62>] ? kset_register+0x52/0x60
 [<ffffffff803a6f9b>] ? kset_create_and_add+0x6b/0xa0
 [<ffffffff804e2e74>] ? tcp_ca_find+0x24/0x50
 [<ffffffff806b246d>] ? ip_auto_config+0x0/0x10f3
 [<ffffffff8020903c>] _stext+0x3c/0x150
 [<ffffffff802772d3>] ? register_irq_proc+0xd3/0xf0
 [<ffffffff802f0000>] ? mb_cache_create+0x80/0x1f0
 [<ffffffff80688693>] kernel_init+0x141/0x1b8
 [<ffffffff80688552>] ? kernel_init+0x0/0x1b8
 [<ffffffff8020d609>] child_rip+0xa/0x11
 [<ffffffff80688552>] ? kernel_init+0x0/0x1b8
 [<ffffffff80688552>] ? kernel_init+0x0/0x1b8
 [<ffffffff8020d5ff>] ? child_rip+0x0/0x11

Signed-off-by: Chunbo Luo <chunbo.luo@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:47:43 -04:00
Jay Cliburn dc5596d920 atl1: fix vlan tag regression
Commit 401c0aabec introduced a regression
in the atl1 driver by storing the VLAN tag in the wrong TX descriptor
field.

This patch causes the VLAN tag to be stored in its proper location.

Tested-by: Ramon Casellas <ramon.casellas@cttc.es>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:46:34 -04:00
Mike Frysinger 51ac3beffd SMC91x: delete unused local variable "lp"
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:46:20 -04:00
Brice Goglin 6824a105d4 myri10ge: fix stop/go mmio ordering
Use mmiowb() to ensure "stop" and "go" commands are sent in order on ia64.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:46:15 -04:00
Andy Gospodarek ce39a800ea bonding: fix panic when taking bond interface down before removing module
A panic was discovered with bonding when using mode 5 or 6 and trying to
remove the slaves from the bond after the interface was taken down.
When calling 'ifconfig bond0 down' the following happens:

    bond_close()
        bond_alb_deinitialize()
            tlb_deinitialize()
		kfree(bond_info->tx_hashtbl)
                bond_info->tx_hashtbl = NULL

Unfortunately if there are still slaves in the bond, when removing the
module the following happens:

    bonding_exit()
        bond_free_all()
            bond_release_all()
                bond_alb_deinit_slave()
                    tlb_clear_slave()
                        tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl
			u32 next_index = tx_hash_table[index].next

As you might guess we panic when trying to access a few entries into the
table that no longer exists.

I experimented with several options (like moving the calls to
tlb_deinitialize somewhere else), but it really makes the most sense to
be part of the bond_close routine.  It also didn't seem logical move
tlb_clear_slave around too much, so the simplest option seems to add a
check in tlb_clear_slave to make sure we haven't already wiped the
tx_hashtbl away before searching for all the non-existent hash-table
entries that used to point to the slave as the output interface.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:46:12 -04:00
Jay Vosburgh a434e43f3d bonding: Clean up resource leaks
This patch reworks the resource free logic performed at the time
a bonding device is released.  This (a) closes two resource leaks, one
for workqueues and one for multicast lists, and (b) improves commonality
of code between the "destroy one" and "destroy all" paths by performing
final free activity via destructor instead of explicitly (and differently)
in each path.

"Sean E. Millichamp" <sean@bruenor.org> reported the workqueue
leak, and included a different patch.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:46:04 -04:00
Jay Vosburgh fba4acda35 bonding: fix miimon failure counter
During the rework of the mii monitor for:

  commit f0c76d6177
  Author: Jay Vosburgh <fubar@us.ibm.com>
  Date:   Wed Jul 2 18:21:58 2008 -0700

    bonding: refactor mii monitor

I left out the increment of the link failure counter.  This
patch corrects that omission.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:45:51 -04:00
Harvey Harrison 8cf14e3837 net: easy removals of HIPQUAD using %pI4 format
As a bonus, removes some unnecessary byteswapping.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29 22:43:33 -07:00
Stephen Hemminger 9edb8bb68b macvlan: add support for ethtool get settings
If macvlan's are used, it is useful to propgate speed and other settings
from underlying device up for application usage.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29 15:31:53 -07:00
Bob Copeland 063279062a ath5k: honor FIF_BCN_PRBRESP_PROMISC in STA mode
We were setting RX_FILTER_BEACON even after entering STA mode,
which leads to a lot of unnecessary wakeups.  This should fix the
bug "Ath5k driver has too many interrupts per second at idle" at
http://bugzilla.kernel.org/show_bug.cgi?id=11749.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:35 -04:00
Elias Oltmanns 7d19267b8d ath5k: Fix reset sequence for AR5212 in general and RF5111 in particular
Take care to handle register 0xa228 exactly as in the HAL released by
Atheros. This change is required to make ath5k work again on my system
since commit 2203d6be (ath5k: Misc hw_reset updates), thus fixing a
regression in 2.6.27 and therefore hopefully eligible for inclusion into
a stable release.

v2: Only overwrite initial register values on later revisions of AR5212
    chips.
v3: Use standard macros to manipulate the register.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:35 -04:00
Ivo van Doorn 5dc5340cfc rt2x00: Fix build error when mac80211=M rt2x00=Y
Make menuconfig RT2X00 a tristate instead of boolean,
otherwise we do not correctly inherit the mac80211 value
on which RT2X00 depends, and makes it possible to
compile rt2x00 into the kernel while mac80211 is a
module.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:35 -04:00
Bob Copeland 85519a65fd ath5k: correct misspelling in debug help
Change "mamagement" to "management"

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:35 -04:00
Johannes Berg 48735d8d8b libertas: fix buffer overrun
If somebody sends an invalid beacon/probe response, that can trash the
whole BSS descriptor. The descriptor is, luckily, large enough so that
it cannot scribble past the end of it; it's well above 400 bytes long.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.24-2.6.27, bug present in some form since driver was added (2.6.22)]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:35 -04:00
Holger Schurig 87bf24f3d2 libertas: remove two libertas sparse warning
Johannes Berg detected this two sparse warnings:

drivers/net/wireless/libertas/cmd.c:609:16: warning: cast to restricted __le16
drivers/net/wireless/libertas/cmd.c:611:16: warning: cast to restricted __le16

... but cmd.minlevel is "s8", so we can access it directly and hope
for the sign-extension-code in the compiler to convert that to the
"s16" type.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:34 -04:00
Tomas Winkler 10d0bd5696 iwlwifi: fix suspend to RAM in iwlwifi
This patch fixes suspend to RAM after by moving
notify_mac out of iwlwifi mutex

http://bugzilla.kernel.org/show_bug.cgi?id=11845

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Carlos R. Mafra <crmafra2@gmail.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-29 17:54:34 -04:00
Harvey Harrison 5b095d9892 net: replace %p6 with %pI6
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29 12:52:50 -07:00
Jesper Nilsson 556dcee7b8 [CRIS] Move header files from include to arch/cris/include.
Change all users of header files to correct path.
Remove some unneeded headers for arch-v32.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-10-29 17:29:44 +01:00
Harvey Harrison 8867cd7c86 infiniband: use %p6 for printing message ids
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28 23:02:35 -07:00
Daniel Lezcano 3717746ef8 veth: remove unused list
The veth network device is stored in a list in the netdev private.
AFAICS, this list is never used so I removed this list from the code.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28 23:02:33 -07:00
Daniel Lezcano bb7bba3d56 veth: Remove useless veth field
The veth private structure contains a netdev pointer refering to its peer.
This field is never used and it is pointless because if we can access,
the veth_priv, that means we already have the netdev which is stored
in veth_priv->dev.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28 23:02:33 -07:00
Chris Friesen 48e5ecae69 amd8111e: Fix rx return code
The amd8111e rx poll routine currently mishandles the case when we
process exactly the number of packets specified in the budget.

This patch is basically as suggested by David Miller.

Signed-off-by: Chris Friesen <cfriesen@nortel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28 15:50:54 -07:00
David S. Miller b3ed4bc082 Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-10-28 11:01:07 -07:00
Johannes Berg 7c510e4b73 net: convert more to %pM
A number of places still use %02x:...:%02x because it's
in debug statements or for no real reason. Make a few
of them use %pM.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-27 17:47:26 -07:00
Johannes Berg e174961ca1 net: convert print_mac to %pM
This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.

I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-27 17:06:18 -07:00
Christian Lamparter f2c2e25554 p54: fix build warnings
On Saturday 25 October 2008 10:24:10 Johannes Berg wrote:
> just FYI in case you haven't seen them. the p54 one looks like a genuine
> problem.
>
> drivers/net/wireless/p54/p54common.c: In function ‘p54_parse_eeprom’:
> drivers/net/wireless/p54/p54common.c:325: warning: ‘synth’ may be used uninitialized in this function

There you go. Yes, it is a genuine problem, if the device's eeprom is screwed really up.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27 17:46:11 -04:00
Elias Oltmanns bc1b32d6bd ath5k: Reset key cache on interface up, thus fixing resume
After a s2ram / resume cycle, resetting the key cache does not work
unless it is deferred until after the hardware has been reinitialised by
a call to ath5k_hw_reset(). This fixes a regression introduced by
"ath5k: fix suspend-related oops on rmmod".

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27 17:46:11 -04:00
Christian Lamparter 35961627d3 p54: fix misbehavings when firmware can't be found
This patch fixes a double-free error in p54pci
( http://bugzilla.kernel.org/show_bug.cgi?id=11782 )

Trying to free already-free IRQ 10
Pid: 108, comm: pccardd Not tainted 2.6.27-05577-g0cfd810-dirty #1
Call Trace:
 [<c01265dc>] free_irq+0xad/0xb9
 [<c01050dd>] dma_generic_alloc_coherent+0x0/0xd7
 [<c01ba8e6>] p54p_stop+0x4a/0x1fa
 [<c01050dd>] dma_generic_alloc_coherent+0x0/0xd7
 [<c02348c5>] p54p_probe+0x23e/0x302

Tested-by: Sean Young
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27 17:46:10 -04:00
Peter Korsgaard 753dcfeecc dm9601: runtime mac address change support
Implement set_mac_address for runtime mac address change.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 15:13:29 -04:00
Sven Hartge 07b5f6a6fd via-velocity: use driver string instead of dev->name before register_netdev()
This patch corrects a message bug in the via-velocity driver which
bothered me for some time.

The messages printed during device init look like the following:

[    8.486422] eth%d: set value of parameter Wake On Lan options to 0
                  ^^!
[    8.487340] eth0: VIA Networking Velocity Family Gigabit Ethernet Adapter

Note the unresolved format string.

dev->name is unavailable before register_netdev, so use
dev_driver_string(&pdev->dev), which is also consistent with other
drivers.

"char *devname" parameters had to be converted to "const char *devname" to
be consistent with dev_driver_string return value.

Signed-off-by: Sven Hartge <sven@svenhartge.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 15:12:02 -04:00
Jeff Garzik 404b12c10d drivers/net/wan/syncppp: Fix unused-var warnings
Fix !CONFIG_INET warnings.

Spotted, and original patch authored by: Manish Katiyar <mkatiyar@gmail.com>

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 15:06:51 -04:00
Yevgeny Petrilin e65b95915d mlx4: Setting the correct offset for default mac address
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 14:50:03 -04:00
Huang Weiyi 9de14eb59d mlx4_en: remove duplicated #include
Removed duplicated #include <linux/cpumask.h> in
drivers/net/mlx4/en_main.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 14:50:00 -04:00
Josh Boyer c778e11d68 ibm_newemac: Fix typo in flow control config option
The recent build fix for ibm_newemac has a typo in the config
option #ifdef used for disabling flow control.  This corrects
it to the proper Kconfig option name.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 14:49:58 -04:00
Thomas Klein 3fd09c45bf ehea: Detect 16GB hugepages for firmware restriction
All kernel memory which is used for kernel/hardware data transfer must
be registered with firmware using "memory regions". 16GB hugepages
may not be part of a memory region due to firmware restrictions.
This patch modifies the walk_memory_resource callback fn to filter
hugepages and add only standard memory to the busmap which is later
on used for MR registration.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 14:49:55 -04:00
FUJITA Tomonori 74d5e8acd9 dmfe: check pci_alloc_consistent errors
We need to check the address that pci_alloc_consistent() returns since
it might fail.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27 14:49:02 -04:00
Sergio Luis b700a98c70 libertas: free sk_buff with kfree_skb
free sk_buff with kfree_skb, instead of kree
 
Signed-off-by: Sergio Luis <sergio@larces.uece.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-26 23:09:27 -07:00
Francois Romieu e383d56487 r8169: revert "read MAC address from EEPROM on init"
This reverts commit 7bf6bf4803.

The code has both a short existence and an increasing track of failures
despite some work to amend it for -rc1.  It is not just a matter of
reading the eeprom: sometimes the eeprom is read correctly, then the mac
address is not written correctly back into the mac registers.

Some chipsets seem to work reliably but it is not clear at this point if
the code can simply be made to work on a per-chipset basis and post -rc1
is not the place where I want to experiment these things.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26 09:35:05 -07:00
Linus Torvalds 2242d5eff1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
  tcp: Restore ordering of TCP options for the sake of inter-operability
  net: Fix disjunct computation of netdev features
  sctp: Fix to handle SHUTDOWN in SHUTDOWN_RECEIVED state
  sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING state
  sctp: Add check for the TSN field of the SHUTDOWN chunk
  sctp: Drop ICMP packet too big message with MTU larger than current PMTU
  p54: enable 2.4/5GHz spectrum by eeprom bits.
  orinoco: reduce stack usage in firmware download path
  ath5k: fix suspend-related oops on rmmod
  [netdrvr] fec_mpc52xx: Implement polling, to make netconsole work.
  qlge: Fix MSI/legacy single interrupt bug.
  smc911x: Make the driver safer on SMP
  smc911x: Add IRQ polarity configuration
  smc911x: Allow Kconfig dependency on ARM
  sis190: add identifier for Atheros AR8021 PHY
  8139x: reduce message severity on driver overlap
  igb: add IGB_DCA instead of selecting INTEL_IOATDMA
  igb: fix tx data corruption with transition to L0s on 82575
  ehea: Fix memory hotplug support
  netdev: DM9000: remove BLACKFIN hacking in DM9000 netdev driver
  ...
2008-10-23 19:19:54 -07:00
Linus Torvalds 5a439c5657 Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
  xtensa: Add config files for Diamond 232L - Rev B processor variant
  xtensa: Fix io regions
  xtensa: Add support for the Sonic Ethernet device for the XT2000 board.
  xtensa: replace remaining __FUNCTION__ occurrences
  xtensa: use newer __SPIN_LOCK_UNLOCKED macro
  XTENSA: warn about including <asm/rwsem.h> directly.
2008-10-23 09:16:56 -07:00
Linus Torvalds 9bf9b2f3ad Merge git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (53 commits)
  powerpc: Support for relocatable kdump kernel
  powerpc: Don't use a 16G page if beyond mem= limits
  powerpc: Add del_node() for early boot code to prune inapplicable devices.
  powerpc: Further compile fixup for STRICT_MM_TYPECHECKS
  powerpc: Remove empty #else from signal_64.c
  powerpc: Move memory size print into common show_cpuinfo for 32-bit
  hvc_console: Remove __devexit annotation of hvc_remove()
  hvc_console: Add support for tty window resizing
  hvc_console: Fix loop if put_char() returns 0
  hvc_console: Add tty driver flag TTY_DRIVER_RESET_TERMIOS
  hvc_console: Add a hangup notifier for backends
  powerpc/83xx: Add DS1339 RTC support for MPC8349E-mITX boards .dts
  powerpc/83xx: Add support for MCU microcontroller in .dts files
  powerpc/85xx: Move mpc8572ds.dts to address-cells/size-cells = <2>
  of/spi: Support specifying chip select as active high via device tree
  powerpc: Remove device_type = "board_control" properties in .dts files
  i2c-cpm: Suppress autoprobing for devices
  powerpc/85xx: Fix mpc8536ds dma interrupt numbers
  powerpc/85xx: Enable enhanced functions for 8536 TSEC
  powerpc: Delete unused prom_strtoul and prom_memparse
  ...
2008-10-23 08:28:25 -07:00
Linus Torvalds 724bdd097e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Reject dynamic memory add/remove when ehca adapter is present
  IB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter
  IPoIB: Set netdev offload features properly for child (VLAN) interfaces
  IPoIB: Clean up ethtool support
  mlx4_core: Add Ethernet PCI device IDs
  mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC
  mlx4_core: Multiple port type support
  mlx4_core: Ethernet MAC/VLAN management
  mlx4_core: Get ethernet MTU and default address from firmware
  mlx4_core: Support multiple pre-reserved QP regions
  Update NetEffect maintainer emails to Intel emails
  RDMA/cxgb3: Remove cmid reference on tid allocation failures
  IB/mad: Use krealloc() to resize snoop table
  IPoIB: Always initialize poll_timer to avoid crash on unload
  IB/ehca: Don't allow creating UC QP with SRQ
  mlx4_core: Add QP range reservation support
  RDMA/ucma: Test ucma_alloc_multicast() return against NULL, not with IS_ERR()
2008-10-23 08:16:03 -07:00
Herbert Xu b63365a2d6 net: Fix disjunct computation of netdev features
My change

    commit e2a6b85247
    net: Enable TSO if supported by at least one device

didn't do what was intended because the netdev_compute_features
function was designed for conjunctions.  So what happened was that
it would simply take the TSO status of the last constituent device.

This patch extends it to support both conjunctions and disjunctions
under the new name of netdev_increment_features.

It also adds a new function netdev_fix_features which does the
sanity checking that usually occurs upon registration.  This ensures
that the computation doesn't result in an illegal combination
since this checking is absent when the change is initiated via
ethtool.

The two users of netdev_compute_features have been converted.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-23 01:11:29 -07:00
David S. Miller dcc51417e5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-10-23 00:44:04 -07:00
Yevgeny Petrilin 57893d1cff mlx4_core: Add Ethernet PCI device IDs
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-10-22 15:48:03 -07:00
Yevgeny Petrilin c27a02cd94 mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC
The Mellanox ConnectX can operate as an InfiniBand adapter, as an
Ethernet NIC, or as a Fibre Channel (FC) HBA.  The kernel has a
low-level driver, mlx4_core, which handles multiplexing access to the
device, and there is also already an InfiniBad driver, mlx4_ib.

This patch adds a new driver, mlx4_en, which implements a standard
Ethernet NIC driver.

Signed-off-by: Liran Liss <liranl@mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-10-22 15:47:49 -07:00
Yevgeny Petrilin 7ff93f8b7e mlx4_core: Multiple port type support
Multi-protocol adapters support different port types.  Each consumer
of mlx4_core queries for supported port types; in particular mlx4_ib
can no longer assume that all physical ports belong to it.  Port type
is configured through a sysfs interface.  When the type of a port is
changed, all mlx4 interfaces are unregistered, and then registered
again with the new port types.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-10-22 15:38:42 -07:00
Christian Lamparter 4cc683c9ad p54: enable 2.4/5GHz spectrum by eeprom bits.
Badness at /home/proski/src/linux-2.6/net/mac80211/rx.c:2200
NIP: c02bc850 LR: c02ab268 CTR: 00000000
REGS: ef01fcc0 TRAP: 0700   Tainted: G        W  (2.6.27-wl)
MSR: 00029032 <EE,ME,IR,DR>  CR: 22004084  XER: 20000000
TASK = c1a58800[1778] 'p54pci' THREAD: ef01e000
[...]
NIP [c02bc850] __ieee80211_rx+0x17c/0x638
LR [c02ab268] ieee80211_tasklet_handler+0x104/0x120
Call Trace:
[ef01fd70] [c1a0c020] 0xc1a0c020 (unreliable)
[ef01fdb0] [c02ab268] ieee80211_tasklet_handler+0x104/0x120
[...]

the problem was that some older cards are mis-identified and didn't support
5GHz rates, while they have the right MAC & Synth chip.

This patch changes the way how p54 decides if it should enable 11a channels
or not.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-22 18:11:04 -04:00
Andrey Borzenkov 7045825993 orinoco: reduce stack usage in firmware download path
orinoco_dl_firmware and symbol_dl_mage allocate large local
variables (1K); at least orinoco fails with panic or hung
kernel if 4K stacks is enabled.

Allocate large buffers dynamically at run time.

Tested-By: Andrey Borzenkov <arvidjaar@mail.ru> for Agere case

Signed-off-by: Andrey Borzenkov < arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-22 18:09:32 -04:00
Bob Copeland 8bdd5b9c6b ath5k: fix suspend-related oops on rmmod
Based on a patch by Elias Oltmanns, we call ath5k_init in resume even
if we didn't previously open the device.  Besides starting up the
device unnecessarily, this also causes an oops on rmmod because
mac80211 will not invoke ath5k_stop and softirqs are left running after
the module has been unloaded.  Add a new state bit, ATH_STAT_STARTED,
to indicate that we have been started up.

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-22 18:09:32 -04:00
Yevgeny Petrilin 2a2336f822 mlx4_core: Ethernet MAC/VLAN management
Add support for managing MAC and VLAN filters for each port.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Oren Duer <oren@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-10-22 11:44:46 -07:00
Yevgeny Petrilin b79acb49de mlx4_core: Get ethernet MTU and default address from firmware
Get maximum ethernet MTU and default MAC address from the firmware
QUERY_DEV_CAP command.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-10-22 10:56:48 -07:00
Yevgeny Petrilin 93fc9e1bb6 mlx4_core: Support multiple pre-reserved QP regions
For ethernet support, we need to reserve QPs for the ethernet and
fibre channel driver.  The QPs are reserved at the end of the QP
table.  (This way we assure that they are aligned to their size)

We need to consider these reserved ranges in bitmap creation, so we
extend the mlx4 bitmap utility functions to allow reserved ranges at
both the bottom and the top of the range.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-10-22 10:25:29 -07:00
Jon Smirl bd28bdb18f [netdrvr] fec_mpc52xx: Implement polling, to make netconsole work.
Implement polling for 5200FEC to make netconsole work. Tested on
Phytec pcm030 and Efika.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:26:49 -04:00
Ron Mercer bb0d215c8f qlge: Fix MSI/legacy single interrupt bug.
The chip can issue spurious interrupts for single interrupt
modes. We use disable to clear the condition and allow processing to
continue. Also got rid of legacy specific code since it now needs to
be done on MSI single irq also.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:00:49 -04:00
Catalin Marinas b891a9023b smc911x: Make the driver safer on SMP
This patch extends the critical regions covered by lp->lock to make it
safer on SMP. The main failure point was the smc911x_hard_start_xmit
function being called from different CPUs. It was tested on the ARM SMP
platforms.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:00:41 -04:00
Catalin Marinas 319edafef6 smc911x: Add IRQ polarity configuration
Platforms like ARM Ltd's RealView require the IRQ polarity bit to be set
for the SMC9118 chip. This patch allows the dynamic configuration via
the smc911x_platdata structure.

This patch also changes the smc91x_platdata structure name to the
correct smc911x_platdata in the smc911x_drv_probe() function.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:00:38 -04:00
Catalin Marinas bd2c4972ff smc911x: Allow Kconfig dependency on ARM
Since more ARM platforms use this device, it is easier to add a
dependency on ARM rather than individual platforms.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:00:36 -04:00
Francois Romieu 708f6e27c3 sis190: add identifier for Atheros AR8021 PHY
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=10994

Contributed by pablomme@googlemail.com, coenraad@wish.org.za
and a few others.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:00:34 -04:00
Stephen Hemminger de4549cae0 8139x: reduce message severity on driver overlap
The 8139 drivers are a source of error messages that confuse users.

Since this device can not be disambiguated by normal PCI device
id's two drivers match the same info. But the module utilities
seem to correctly handle this overlap, they try one driver, then
if that doesn't load try the other. Therefore there is no need for
a message to be logged with error level severity, just using info
level instead. Can't be completely silent because user might have
configure one driver and forgot the other one.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 07:00:28 -04:00
Jeff Kirsher 421e02f0e9 igb: add IGB_DCA instead of selecting INTEL_IOATDMA
Add a bool IGB_DCA defined to y if IGB and DCA are enabled, but IGB isn't y while DCA=m.  And thus remove the need to select INTEL_IOATDMA when IGB is enabled, so that non-x86 architectures can build the igb driver.
Based on work/patch from Brice Goglin <brice@myri.com>

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:54:07 -04:00
Alexander Duyck c54106bb38 igb: fix tx data corruption with transition to L0s on 82575
The 82575 has an issue in which the DMA will go out of sync if the link
partner goes into an L0s state.  To prevent this we set the pci-e link
partner capability bits to disable the L0s transition on the hw.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:53:59 -04:00
Hannes Hering d4f12daf7b ehea: Fix memory hotplug support
This patch implements the memory notifier to update the busmap
instantly instead of rebuilding the whole map. This is necessary
because walk_memory_resource provides different information than
required during memory hotplug.

Signed-off-by: Hannes Hering <hering2@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:17 -04:00
Bryan Wu 93fbaae188 netdev: DM9000: remove BLACKFIN hacking in DM9000 netdev driver
remove integer casting in the read/write IO accessors,
because Blackfin now provides those functions

Tested-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:15 -04:00
Roland Dreier 6d329af996 cxgb3: Fix kernel crash caused by uninitialized l2t_entry.arpq
Commit 147e70e6 ("cxgb3: Use SKB list interfaces instead of home-grown
implementation.") causes a crash in t3_l2t_send_slow() when an iWARP
connection request is received.  This is because the new l2t_entry.arpq
skb queue is never initialized, and therefore trying to add an skb to
it causes a NULL dereference.  With the old code there was no need to
initialize the queues because the l2t_entry structures were zeroed,
and the code used NULL to mean empty.

Fix this by adding __skb_queue_head_init() when all the l2t_entry
structures get allocated.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:14 -04:00
Dmitry Baryshkov d766a4eda6 SMC911x: unbreak PXA builds
Currently SMC911x driver is broken on ARM/PXA builds.
Unbreak such configurations.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:13 -04:00
Brice Goglin 051d36f3fb myri10ge: disable NAPI on failure to setup the interface
Disable NAPI if a failure occurs when setting up the interface. Leaving
it enabled could cause a BUG the next time an ifconfig up is issued.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:11 -04:00
Atsushi Nemoto cde0d910b9 net: Make SMC91X selectable on other MIPS boards
RBTX4939 board has SMC91X chip and there can be other MIPS boards with
that chip.  Make SMC91X selectable on all MIPS board would be better than
enumerating each boards in Kconfig.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: jeff@garzik.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:10 -04:00
roel kluin ced1cbacc0 AX88796: ax_probe() fix irq assignment
dev->irq is unsigned

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:08 -04:00
roel kluin d51894f497 gianfar: fix handle errors returned by platform_get_irq*()
platform_get_irq*() returns on -ENXIO when the resource cannot be
found, but this remains unnoticed if stored in an unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-22 06:22:07 -04:00
Francois Romieu e1564ec938 r8169: checks against wrong mac addresse init
Checking the signature of the eeprom and the validity of the
MAC address should be enough to filter out the bad addresses
observed so far.

Contributed by Ivan Vecera and Martin Capitanio.

Tested on 8102el, 8168b and 8169 for a start.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2008-10-22 06:22:06 -04:00
Francois Romieu cd926c7330 r8169: verbose mac address init
I prefer the debug information to be displayed until
the issue is properly handled.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2008-10-22 06:22:04 -04:00
Chris Zankel 74f2a5f0ef xtensa: Add support for the Sonic Ethernet device for the XT2000 board.
Add support for the on-board Sonic Ethernet device for the XT2000
evaluation board.

Signed-off-by: Chris Zankel <chris@zankel.net>
2008-10-21 07:58:06 -07:00
Benjamin Herrenschmidt a02efb906d Merge commit 'origin' into master
Manual merge of:

	arch/powerpc/Kconfig
	arch/powerpc/include/asm/page.h
2008-10-21 15:52:04 +11:00
Benjamin Herrenschmidt c1075fb7ec Merge commit 'gcl/gcl-next' 2008-10-21 13:14:33 +11:00
Josh Boyer 1ff0fcfcb1 ibm_newemac: Fix new MAL feature handling
Support for new features needed by the PPC 405EZ boards
introduced some errors in the MAL and EMAC feature handling.
This broke 'allmodconfig' builds as CONFIG_PPC_DCR_NATIVE is
not set for those.

This patch fixes these errors by wrapping the code in the
appropriate #ifdefs.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-10-20 19:59:54 -04:00
Harvey Harrison 653c031683 misc: replace remaining __FUNCTION__ with __func__
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 16:17:42 -07:00
Linus Torvalds 9301975ec2 Merge branch 'genirq-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
This merges branches irq/genirq, irq/sparseirq-v4, timers/hpet-percpu
and x86/uv.

The sparseirq branch is just preliminary groundwork: no sparse IRQs are
actually implemented by this tree anymore - just the new APIs are added
while keeping the old way intact as well (the new APIs map 1:1 to
irq_desc[]).  The 'real' sparse IRQ support will then be a relatively
small patch ontop of this - with a v2.6.29 merge target.

* 'genirq-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (178 commits)
  genirq: improve include files
  intr_remapping: fix typo
  io_apic: make irq_mis_count available on 64-bit too
  genirq: fix name space collisions of nr_irqs in arch/*
  genirq: fix name space collision of nr_irqs in autoprobe.c
  genirq: use iterators for irq_desc loops
  proc: fixup irq iterator
  genirq: add reverse iterator for irq_desc
  x86: move ack_bad_irq() to irq.c
  x86: unify show_interrupts() and proc helpers
  x86: cleanup show_interrupts
  genirq: cleanup the sparseirq modifications
  genirq: remove artifacts from sparseirq removal
  genirq: revert dynarray
  genirq: remove irq_to_desc_alloc
  genirq: remove sparse irq code
  genirq: use inline function for irq_to_desc
  genirq: consolidate nr_irqs and for_each_irq_desc()
  x86: remove sparse irq from Kconfig
  genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n
  ...
2008-10-20 13:23:01 -07:00
Paul Mundt 4cb40f795a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	Documentation/kernel-parameters.txt
	arch/sh/include/asm/elf.h
2008-10-20 11:17:52 +09:00
Greg Kroah-Hartman 880c9c66a6 USB: remove info() macro from usb network drivers
USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:41:10 -07:00
Greg Kroah-Hartman 4dc8994806 USB: remove warn() macro from usb net drivers
USB should not be having it's own printk macros, so remove warn() and
use the system-wide standard of dev_warn() wherever possible.  In the
few places that will not work out, use a basic printk().

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:41:08 -07:00
Linus Torvalds b225ee5bed Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)
  ipv4: Add a missing rcu_assign_pointer() in routing cache.
  [netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit
  xen-netfront: Avoid unaligned accesses to IP header
  lmc: copy_*_user under spinlock
  [netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA
2008-10-17 08:58:52 -07:00
Linus Torvalds c813b4e16e Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits)
  UIO: Fix mapping of logical and virtual memory
  UIO: add automata sercos3 pci card support
  UIO: Change driver name of uio_pdrv
  UIO: Add alignment warnings for uio-mem
  Driver core: add bus_sort_breadthfirst() function
  NET: convert the phy_device file to use bus_find_device_by_name
  kobject: Cleanup kobject_rename and !CONFIG_SYSFS
  kobject: Fix kobject_rename and !CONFIG_SYSFS
  sysfs: Make dir and name args to sysfs_notify() const
  platform: add new device registration helper
  sysfs: use ilookup5() instead of ilookup5_nowait()
  PNP: create device attributes via default device attributes
  Driver core: make bus_find_device_by_name() more robust
  usb: turn dev_warn+WARN_ON combos into dev_WARN
  debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
  debug: Introduce a dev_WARN() function
  sysfs: fix deadlock
  device model: Do a quickcheck for driver binding before doing an expensive check
  Driver core: Fix cleanup in device_create_vargs().
  Driver core: Clarify device cleanup.
  ...
2008-10-16 12:40:26 -07:00
Linus Torvalds c8d8a2321f Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: remove CONFIG_KMOD in comment after #endif
  remove CONFIG_KMOD from fs
  remove CONFIG_KMOD from drivers

Manually fix conflict due to include cleanups in drivers/md/md.c
2008-10-16 12:38:34 -07:00
Linus Torvalds cb23832e39 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
  decnet: Fix compiler warning in dn_dev.c
  IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option
  net/802/fc.c: Fix compilation warnings
  netns: correct mib stats in ip6_route_me_harder()
  netns: fix net_generic array leak
  rt2x00: fix regression introduced by "mac80211: free up 2 bytes in skb->cb"
  rtl8187: Add USB ID for Belkin F5D7050 with RTL8187B chip
  p54usb: Device ID updates
  mac80211: fixme for kernel-doc
  ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
  libertas : Remove unused variable warning for "old_channel" from cmd.c
  mac80211: Fix scan RX processing oops
  orinoco: fix unsafe locking in spectrum_cs_suspend
  orinoco: fix unsafe locking in orinoco_cs_resume
  cfg80211: fix debugfs error handling
  mac80211: fix debugfs netdev rename
  iwlwifi: fix ct kill configuration for 5350
  mac80211: fix HT information element parsing
  p54: Fix compilation problem on PPC
  mac80211: fix debugfs lockup
  ...
2008-10-16 11:26:26 -07:00
Julia Lawall 435263702e drivers/net/xen-netfront.c: Use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 11:21:52 -07:00
Francois Cami e1f8e87449 Remove Andrew Morton's old email accounts
People can use the real name an an index into MAINTAINERS to find the
current email address.

Signed-off-by: Francois Cami <francois.cami@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 11:21:32 -07:00
Greg Kroah-Hartman 26853ab6f9 NET: convert the phy_device file to use bus_find_device_by_name
The driver core now has this helper function, so might as well use it
instead of forcing the phy code to roll their own version.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16 09:24:52 -07:00
Greg Kroah-Hartman 6e05d6c467 device create: net: convert device_create_drvdata to device_create
Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16 09:24:43 -07:00
Johannes Berg a65e5d782f remove CONFIG_KMOD from drivers
Straight forward conversions to CONFIG_MODULE; many drivers
include <linux/kmod.h> conditionally and then don't have any
other conditional code so remove it from those.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: video4linux-list@redhat.com
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-ppp@vger.kernel.org
Cc: dm-devel@redhat.com
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-10-17 02:38:35 +11:00
Yinghai Lu 60e4ad7a72 drivers/net: use nr_irqs
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-16 16:52:05 +02:00
Alan Cox dc976c09da [netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit
For whatever value of 'OK' can be applied to the use of token ring. Seems
the 32bit to 64bit cleanups missed re-enabling the pcmcia driver

Closes #7133 and also reviewed the code in question

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-16 05:40:16 -04:00
Isaku Yamahata 617a20bbd0 xen-netfront: Avoid unaligned accesses to IP header
Align ip header to a 16 byte boundary to avoid unaligned
access like other drivers.
Without this patch, xen-netfront doesn't work well on ia64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-16 05:11:07 -04:00
Alan Cox 8ab7b66796 lmc: copy_*_user under spinlock
Not sure anyone uses this driver any more, maybe we should just drop it ?
Code is still foul but at least a fraction less broken.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-16 05:11:00 -04:00
Jeff Garzik 5dd2d33228 [netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA
We cannot select INTEL_IOATDMA in Kconfig as soon as MYRI10GE or IXGBE
is enabled since the former is not available on all architectures.

Just use a Kconfig bool {IXGBE,MYRI10GE}_DCA set to =y when DCA
support can actually be built.

[myri10ge portion written and signed-off-by] Brice Goglin <brice@myri.com>

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-16 05:09:31 -04:00
Wolfram Sang 51d9861e9e powerpc/mpc5200: Refactor FEC mdio read/write routines
Read & write functions now call a generic transfer function, so identical
code in both routines could be eliminated. The result is easier to maintain
and smaller in source and binary code. Also, fix some checkpatch warnings.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-10-15 11:10:00 -06:00
Felix Fietkau 8713a7ccd8 rt2x00: fix regression introduced by "mac80211: free up 2 bytes in skb->cb"
The hw_key pointer is used (and obviously NULL) after skb->cb is
memset to 0. This patch grabs the iv_len before the memset call.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 21:12:39 -04:00
Florent Fourcot eaca90dab6 rtl8187: Add USB ID for Belkin F5D7050 with RTL8187B chip
The Belkin F5D7050rev5000de (id 050d:705e) has the Realtek RTL8187B chip
and works with the 2.6.27 driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 21:12:38 -04:00
Christian Lamparter ec366eba3b p54usb: Device ID updates
This patch updates p54usb's device list.
It adds the ID for SMC 2862W-G v2 and marks the
"Spinnaker Proto board" as a first generation device.

Reported-by: <jafg666@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 21:12:38 -04:00
Johannes Berg 4233df6b74 ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
As I've reported, ath9k currently fails utterly when fragmentation
is enabled. This makes ath9k "support" hardware fragmentation by
not supporting fragmentation at all to avoid the double-free issue.
The patch also changes mac80211 to report errors from the driver
operation to userspace.

That hack in ath9k should be removed once the rate control algorithm
it has is fixed, and we can at that time consider removing the hw
fragmentation support entirely since it's not used by any driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 21:12:37 -04:00
Manish Katiyar 96d46d5d79 libertas : Remove unused variable warning for "old_channel" from cmd.c
Below patch removes the following warning during compilation.

drivers/net/wireless/libertas/cmd.c:826: warning: unused variable 'old_channel'

Signed-off-by : Manish Katiyar <mkatiyar@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 21:12:03 -04:00
David Kilroy c25bab54fe orinoco: fix unsafe locking in spectrum_cs_suspend
A similar problem was highlighted in the orinoco_cs driver by lockdep.
This patch fixes the spectrum_cs driver.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 21:08:11 -04:00
Andrey Borzenkov 552a71515e orinoco: fix unsafe locking in orinoco_cs_resume
[ 6972.562035] =================================
[ 6972.562040] [ INFO: inconsistent lock state ]
[ 6972.562048] 2.6.27-1avb #17
[ 6972.562053] ---------------------------------
[ 6972.562060] inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
[ 6972.562068] pm-suspend/17062 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 6972.562076]  (&priv->lock){++..}, at: [<dfd4f05b>] orinoco_cs_resume+0x5b/0xd0 [orinoco_cs]
[ 6972.562122] {in-hardirq-W} state was registered at:
[ 6972.562128]   [<c013ea6b>] __lock_acquire+0x6cb/0x1640
[ 6972.562171]   [<c013fa3c>] lock_acquire+0x5c/0x80
[ 6972.562181]   [<c02f6e39>] _spin_lock_irqsave+0x49/0x80
[ 6972.562210]   [<dfd6425d>] orinoco_interrupt+0x4d/0x16d0 [orinoco]
[ 6972.562257]   [<c015a2b1>] handle_IRQ_event+0x31/0x60
[ 6972.562278]   [<c015b73e>] handle_level_irq+0x6e/0xe0
[ 6972.562291]   [<c0104b20>] do_IRQ+0xb0/0x130
[ 6972.562313]   [<ffffffff>] 0xffffffff

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 20:49:02 -04:00
Tomas Winkler d5d7c58481 iwlwifi: fix ct kill configuration for 5350
This patch fixes ct kill configuration for 5350. Temperature units that
HW expects are in Celsius not in kelvins.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 20:47:30 -04:00
Larry Finger 3eadd751eb p54: Fix compilation problem on PPC
The commit entitled "p54: Fix sparse warnings" introduced a compile
error on PPC architecture. Thanks to Johannes Berg
<johannes@sipsolutions.net> for reporting this problem.

Signed-off-by: <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 20:47:03 -04:00
Rami Rosen 45527c2c4f iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG is not set.
When CONFIG_IWLWIFI_DEBUG is not set and CONFIG_IWLWIFI is set,
we get this compilation warning:
/wireless-next-2.6/drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In
function 'rs_free_sta':
/wireless-next-2.6/drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2425:
warning: unused variable 'priv'

This patch fixes it by adding __maybe_unused attribute.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 20:46:26 -04:00
Benjamin Herrenschmidt 6dc6472581 Merge commit 'origin'
Manual fixup of conflicts on:

	arch/powerpc/include/asm/dcr-regs.h
	drivers/net/ibm_newemac/core.h
2008-10-15 11:31:54 +11:00
John W. Linville 746db51039 rtl8187: add device ID 0bda:8198
Reported by zOOmER.gm@gmail.com to work here:

	http://bugzilla.kernel.org/show_bug.cgi?id=11728

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-14 20:29:59 -04:00
Linus Torvalds 43096597a4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  qlge: Fix page size ifdef test.
  net: Rationalise email address: Network Specific Parts
  dsa: fix compile bug on s390
  netns: mib6 section fixlet
  enic: Fix Kconfig headline description
  de2104x: wrong MAC address fix
  s390: claw compile fixlet
  net: export genphy_restart_aneg
  cxgb3: extend copyrights to 2008
  cxgb3: update driver version
  net/phy: add missing kernel-doc
  pktgen: fix skb leak in case of failure
  mISDN/dsp_cmx.c: fix size checks
  misdn: use nonseekable_open()
  net: fix driver build errors due to missing net/ip6_checksum.h include
2008-10-14 10:28:49 -07:00
Ron Mercer 4850137170 qlge: Fix page size ifdef test.
This ASIC does support all page sizes. For 4k and 8k page size the TX
control block needs an external scatter gather list.  For page sizes
larger than 8k the max frags is satisfied by the original TX control
block.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 22:55:59 -07:00
Alan Cox 113aa838ec net: Rationalise email address: Network Specific Parts
Clean up the various different email addresses of mine listed in the code
to a single current and valid address. As Dave says his network merges
for 2.6.28 are now done this seems a good point to send them in where
they won't risk disrupting real changes.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 19:01:08 -07:00
Roland Dreier eb8a4cb6df enic: Fix Kconfig headline description
I don't think the enic driver has anything to do with Mark Everett
(http://en.wikipedia.org/wiki/A_Man_Called_E).  Fix the Kconfig
description.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:53:05 -07:00
Martin Langer bc0da3fcec de2104x: wrong MAC address fix
The de2104x returns sometimes a wrong MAC address. The wrong one is
like the original one, but it comes with an one byte shift. I found
this bug on an older alpha ev5 cpu. More details are available in Gentoo
bugreport #240718.

It seems the hardware is sometimes a little bit too slow for an
immediate access. This patch solves the problem by introducing a small
udelay.

Signed-off-by: Martin Langer <martin-langer@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:49:38 -07:00
Adrian Bunk 892871dcc3 net: export genphy_restart_aneg
This patch fixes the following build error caused by
commit ed94493fb3
(mv643xx_eth: convert to phylib):

<--  snip  -->

...
  Building modules, stage 2.
  MODPOST 1280 modules
ERROR: "genphy_restart_aneg" [drivers/net/mv643xx_eth.ko] undefined!
...
make[2]: *** [__modpost] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:48:09 -07:00
Divy Le Ray a02d44a02b cxgb3: extend copyrights to 2008
Update copyright banner to 2008.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:47:30 -07:00
Divy Le Ray fe642ebc2d cxgb3: update driver version
Add a field to the driver versioning info.
Update version to 1.1.0.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:47:02 -07:00
Randy Dunlap 78c36b15a0 net/phy: add missing kernel-doc
Fix kernel-doc warning, missing description:

Warning(lin2627-g3-kdocfixes//drivers/net/phy/mdio_bus.c:63): No description found for parameter 'd'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:46:22 -07:00
Kamalesh Babulal b7c6bfb710 net: fix driver build errors due to missing net/ip6_checksum.h include
2.6.27-git2 kernel build fails with allyesconfig on powerpc with 
build error 

<introduced by commit 01f2e4ead2c51226ed1283ef6a8388ca6f4cff8f> 

CC    drivers/net/enic/enic_main.o
drivers/net/enic/enic_main.c: In function ‘enic_queue_wq_skb_tso’:
drivers/net/enic/enic_main.c:576: error: implicit declaration of function ‘csum_ipv6_magic’
make[3]: *** [drivers/net/enic/enic_main.o] Error 1

<introduced by commit c4e84bde1d595d857d3c74b49b9c45cc770df792>

drivers/net/qlge/qlge_main.c: In function ‘ql_tso’:
drivers/net/qlge/qlge_main.c:1862: error: implicit declaration of function ‘csum_ipv6_magic’
make[3]: *** [drivers/net/qlge/qlge_main.o] Error 1
  
<introduced by commit 95252236e73e789dd186ce796a2abc60b3a61ebe>

drivers/net/jme.c: In function ‘jme_tx_tso’:
drivers/net/jme.c:1784: error: implicit declaration of function ‘csum_ipv6_magic’
make[2]: *** [drivers/net/jme.o] Error 1

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13 18:41:01 -07:00
Linus Torvalds 2be4ff2f08 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits)
  pcmcia: ioctl-internal definitions
  pcmcia: cistpl header cleanup
  pcmcia: remove unused argument to pcmcia_parse_tuple()
  pcmcia: card services header cleanup
  pcmcia: device_id header cleanup
  pcmcia: encapsulate ioaddr_t
  pcmcia: cleanup device driver header file
  pcmcia: cleanup socket services header file
  pcmcia: merge ds_internal.h into cs_internal.h
  pcmcia: cleanup cs_internal.h
  pcmcia: cs_internal.h is internal
  pcmcia: use dev_printk for cs_error()
  pcmcia: remove CS_ error codes alltogether
  pcmcia: deprecate CS_BAD_TUPLE
  pcmcia: deprecate CS_BAD_ARGS
  pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZE
  pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE
  pcmcia: deprecate CS_NO_MORE_ITEMS
  pcmcia: deprecate CS_IN_USE
  pcmcia: deprecate CS_CONFIGURATION_LOCKED
  ...

Fix trivial conflict in drivers/pcmcia/ds.c manually
2008-10-13 14:12:40 -07:00
Linus Torvalds fffdedef69 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net/mac80211/rx.c: fix build error
  acpi: Make ACPI_TOSHIBA depend on INPUT.
  net/bfin_mac.c MDIO namespace fixes
  jme: remove unused #include <version.h>
  netfilter: remove unused #include <version.h>
  net: Fix off-by-one in skb_dma_map
  smc911x: Add support for LAN921{5,7,8} chips from SMSC
  qlge: remove duplicated #include
  wireless: remove duplicated #include
  net/au1000_eth.c MDIO namespace fixes
  net/tc35815.c: fix compilation
  sky2: Fix WOL regression
  r8169: NULL pointer dereference on r8169 load
2008-10-13 10:08:08 -07:00
Alan Cox 7d7b93c145 tty: kref the tty driver object
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13 09:51:42 -07:00