Unfortunately, the result was that mac80211 didn't see all the beacons
it actually wanted to see. This caused lost associations.
Hopefully we can revisit this when mac80211 is less greedy about seeing
beacons directly...
This reverts commit 063279062a.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.
Drivers need not do it any more.
Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.
Signed-off-by: David S. Miller <davem@davemloft.net>
It was being discussed where we would put this, but now it found a home
so use its define.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw_keyreset returns true in either branch.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
If card is using downloadable firmware (like Agere 9.x), firmware has
to be reloaded during resume. It is not possible to use request_firmware
for that, because tasks are still frozen, so request_firmware will
just timeout and fail. So cache firmware image in memory for later
reuse in ->resume method.
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
On resume card state is likely lost so we have to reload firmware
again.
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
*Properly get/set all available ISR/IMR values and review common/uncommon bits
*Better handling of per-txq interrupts (we can now resolve what q is generating
each interrupt -this will help in debuging wme later)
*Some minor updates from legacy-hal
*Properly handle RXNOFRM and TXNOFRM interrupt masking (even when we don't set
them on IMR they keep showing up, so we disable them by zeroing AR5K_RXNOFRM
and AR5K_TXNOFRM registers). This doesn't exist on legacy-hal but i've tested
it on various cards and it works fine.
Changes-Licensed-under: ISC
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The code needs to be split out and cleaned up, so as a
first step remove the capability, to add it back in a
subsequent patch as a separate function. Also remove the
publically facing return value of the function and the
wiphy argument. A number of internal functions go from
being generic helpers to just being used for alpha2
setting.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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.
...
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>
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>
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>
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>
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>
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>
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>
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>