summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/core.c
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: pass queue bitmap to flush operationJohannes Berg2013-03-181-1/+1
| | | | | | | | | | There are a number of situations in which mac80211 only really needs to flush queues for one virtual interface, and in fact during this frames might be transmitted on other virtual interfaces. Calculate and pass a queue bitmap to the driver so it knows which queues to flush. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: split TX aggregation stop actionJohannes Berg2013-01-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When TX aggregation is stopped, there are a few different cases: - connection with the peer was dropped - session stop was requested locally - session stop was requested by the peer - connection was dropped while a session is stopping The behaviour in these cases should be different, if the connection is dropped then the driver should drop all frames, otherwise the frames may continue to be transmitted, aggregated in the case of a locally requested session stop or unaggregated in the case of the peer requesting session stop. Split these different cases so that the driver can act accordingly; however, treat local and remote stop the same way and ask the driver to not send frames as aggregated packets any more. In the case of connection drop, the stop callback the driver is otherwise supposed to call is no longer required. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rtlwifi: use eth_zero_addr() to assign zero addressWei Yongjun2012-11-161-3/+2
| | | | | | | | Using eth_zero_addr() to assign zero address insetad of memset() or an inefficient copy from a static array. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: move TX station pointer and restructure TXThomas Huehn2012-07-311-3/+5
| | | | | | | | | | | | | | Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [reworded commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wireless: Remove casts to same typeJoe Perches2012-06-061-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p Neatened the mwifiex_deauthenticate_infra function which was doing odd things with array pointers and not using is_zero_ether_addr. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: Remove extra debugging message accidentally left inLarry Finger2012-02-061-3/+1
| | | | | | | | | In commit b0302aba812bcc39291cdab9ad7e37008f352a91, an extra debugging message that is spamming the logs was not deleted before submission. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Convert to asynchronous firmware loadLarry Finger2012-01-301-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | This patch addresses a kernel bugzilla report and two recent mail threads. The kernel bugzilla report is https://bugzilla.kernel.org/show_bug.cgi?id=42632, which reports a udev timeout on boot. The first mail thread, which was on LKML (http://lkml.indiana.edu/hypermail/ linux/kernel/1112.3/00965.html) was for a WARNING that occurs after a suspend/resume cycle for rtl8192cu. The scond mail thread (http://marc.info/?l=linux-wireless&m=132655490826766&w=2) concerned changes in udev that break drivers that delay while firmware is loaded on modprobe. This patch converts all rtlwifi-based drivers to use the asynchronous firmware loading mechanism. Drivers rtl8192ce, rtl8192cu and rtl8192de share a common callback routine. Driver rtl8192se needs different handling of the firmware, thus it has its own code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: make beacon filtering per virtual interfaceJohannes Berg2012-01-271-0/+2
| | | | | | | | | | | | Due to firmware limitations, we may not be able to support beacon filtering on all virtual interfaces. To allow this in mac80211, introduce per-interface driver capability flags that the driver sets when an interface is added. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Update copyright datesLarry Finger2012-01-241-1/+1
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Convert RT_ASSERT macro to use ##__VA_ARGS__Joe Perches2012-01-241-2/+2
| | | | | | | | | | | | | | | | | | | Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RT_ASSERT parentheses. Align arguments. Coalesce formats. Remove unnecessary __func__ use as the macro uses it. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 588901 55333 127216 771450 bc57a drivers/net/wireless/rtlwifi/built-in.o.new 590002 55333 127560 772895 bcb1f drivers/net/wireless/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Convert RT_TRACE macro to use ##__VA_ARGS__Joe Perches2012-01-241-61/+59
| | | | | | | | | | | | | | | | | | | | | | Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RT_TRACE parentheses. Miscellaneous typo and grammar fixes. Add missing newlines to formats. Remove duplicate KERN_DEBUG prefixes. Coalesce formats. Align arguments. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.new 607022 55333 138720 801075 c3933 drivers/net/wireless/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: pass vif param to conf_tx() callbackEliad Peller2011-10-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | tx params should be configured per interface. add ieee80211_vif param to the conf_tx callback, and change all the drivers that use this callback. The following spatch was used: @rule1@ struct ieee80211_ops ops; identifier conf_tx_op; @@ ops.conf_tx = conf_tx_op; @rule2@ identifier rule1.conf_tx_op; identifier hw, queue, params; @@ conf_tx_op ( - struct ieee80211_hw *hw, + struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, const struct ieee80211_tx_queue_params *params) {...} Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add ieee80211_vif param to tsf functionsEliad Peller2011-09-271-3/+5
| | | | | | | | | | | TSF can be kept per vif. Add ieee80211_vif param to set/get/reset_tsf, and move the debugfs entries to the per-vif directory. Update all the drivers that implement these callbacks. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix problem when switching connectionsGeorge2011-09-131-0/+8
| | | | | | | | | | The driver fails to clear encryption keys making it impossible to switch connections. Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> [2.6.39+] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: rtlwifi: throw away MAC_FMT and use %pM insteadAndy Shevchenko2011-07-201-3/+3
| | | | | | Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with trueMike McCormack2011-06-201-2/+2
| | | | | | | | | These are a potential source of confusion, as most C code treats all non-zero values as true. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix typo in variable nameMike McCormack2011-06-201-2/+2
| | | | | | | | offchan_deley should be offchan_delay Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix warnings on parisc archLarry Finger2011-06-101-2/+2
| | | | | | | | | | In "Build regressions/improvements in v3.0-rc2", Geert Uytterhoeven reports a number of warnings that occur for parisc builds of rtlwifi and dependents. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2011-05-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) b43: fix comment typo reqest -> request Haavard Skinnemoen has left Atmel cris: typo in mach-fs Makefile Kconfig: fix copy/paste-ism for dell-wmi-aio driver doc: timers-howto: fix a typo ("unsgined") perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course'). treewide: fix a few typos in comments regulator: change debug statement be consistent with the style of the rest Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations" audit: acquire creds selectively to reduce atomic op overhead rtlwifi: don't touch with treewide double semicolon removal treewide: cleanup continuations and remove logging message whitespace ath9k_hw: don't touch with treewide double semicolon removal include/linux/leds-regulator.h: fix syntax in example code tty: fix typo in descripton of tty_termios_encode_baud_rate xtensa: remove obsolete BKL kernel option from defconfig m68k: fix comment typo 'occcured' arch:Kconfig.locks Remove unused config option. treewide: remove extra semicolons ...
| * treewide: remove extra semicolonsJustin P. Mattock2011-04-101-1/+1
| | | | | | | | | | Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | rtlwifi: Convert core routines for addition of rtl8192se and rtl8192deChaoming_Li2011-04-261-148/+260
| | | | | | | | | | | | | | | | | | | | Convert core routines for addition of RTL8192SE and RTL8192DE code. Additional files are changed to allow compilation. Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | rtlwifi: Remove unused/unneeded variablesLarry Finger2011-04-041-5/+3
|/ | | | | | | Remove some unused variables and correct spelling errors. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Add the missing rcu_read_lock/unlockAlessio Igor Bogani2011-02-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =================================================== [ INFO: suspicious rcu_dereference_check() usage. ] --------------------------------------------------- net/mac80211/sta_info.c:125 invoked rcu_dereference_check() without protection! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 0 5 locks held by wpa_supplicant/468: #0: (rtnl_mutex){+.+.+.}, at: [<c1465d84>] rtnl_lock+0x14/0x20 #1: (&rdev->mtx){+.+.+.}, at: [<f84b8c2b>] cfg80211_mgd_wext_siwfreq+0x6b/0x170 [cfg80211] #2: (&rdev->devlist_mtx){+.+.+.}, at: [<f84b8c37>] cfg80211_mgd_wext_siwfreq+0x77/0x170 [cfg80211] #3: (&wdev->mtx){+.+.+.}, at: [<f84b8c44>] cfg80211_mgd_wext_siwfreq+0x84/0x170 [cfg80211] #4: (&rtlpriv->locks.conf_mutex){+.+.+.}, at: [<f8506476>] rtl_op_bss_info_changed+0x26/0xc10 [rtlwifi] stack backtrace: Pid: 468, comm: wpa_supplicant Not tainted 2.6.38-rc6+ #79 Call Trace: [<c108806a>] ? lockdep_rcu_dereference+0xaa/0xb0 [<f8523d2c>] ? sta_info_get_bss+0x19c/0x1b0 [mac80211] [<f8523d62>] ? ieee80211_find_sta+0x22/0x40 [mac80211] [<f850661c>] ? rtl_op_bss_info_changed+0x1cc/0xc10 [rtlwifi] [<c153671c>] ? __mutex_unlock_slowpath+0x14c/0x160 [<c153673d>] ? mutex_unlock+0xd/0x10 [<f8507180>] ? rtl_op_config+0x120/0x310 [rtlwifi] [<c10896db>] ? trace_hardirqs_on+0xb/0x10 [<f8522169>] ? ieee80211_bss_info_change_notify+0xf9/0x1f0 [mac80211] [<f8506450>] ? rtl_op_bss_info_changed+0x0/0xc10 [rtlwifi] [<f853646f>] ? ieee80211_set_channel+0xbf/0xd0 [mac80211] [<f84b5f41>] ? cfg80211_set_freq+0x121/0x180 [cfg80211] [<f85363b0>] ? ieee80211_set_channel+0x0/0xd0 [mac80211] [<f84b8ceb>] ? cfg80211_mgd_wext_siwfreq+0x12b/0x170 [cfg80211] [<f84b87eb>] ? cfg80211_wext_siwfreq+0x9b/0x100 [cfg80211] [<c153b98b>] ? sub_preempt_count+0x7b/0xb0 [<c150f874>] ? ioctl_standard_call+0x74/0x3b0 [<c1465d84>] ? rtnl_lock+0x14/0x20 [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211] [<c14568bd>] ? __dev_get_by_name+0x8d/0xb0 [<c150fddb>] ? wext_handle_ioctl+0x16b/0x180 [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211] [<c145bc7a>] ? dev_ioctl+0x5ba/0x720 [<c108a947>] ? __lock_acquire+0x3e7/0x19b0 [<c1443b0b>] ? sock_ioctl+0x1eb/0x290 [<c108bfa5>] ? lock_release_non_nested+0x95/0x2f0 [<c1443920>] ? sock_ioctl+0x0/0x290 [<c114d74d>] ? do_vfs_ioctl+0x7d/0x5c0 [<c1112232>] ? might_fault+0x62/0xb0 [<c113e3c6>] ? fget_light+0x226/0x390 [<c1112278>] ? might_fault+0xa8/0xb0 [<c114dd17>] ? sys_ioctl+0x87/0x90 [<c1002f9f>] ? sysenter_do_call+0x12/0x38 This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: Alessio Igor Bogani <abogani@kernel.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: make tx() operation return voidJohannes Berg2011-02-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192ce: Fix endian warningsLarry Finger2011-02-211-3/+3
| | | | | | | | Drivers rtlwifi, and rtl8192ce generate a large number of sparse warnings. This patch fixes most of them. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Modify some rtl8192ce routines for merging rtl8192cuLarry Finger2011-02-211-4/+4
| | | | | | | | Modify some rtl8192ce routines for merging with rtl8192cu. In addition, remove some usage of Hungarian notation. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: track receiver's aggregation reorder buffer sizeJohannes Berg2011-01-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | The aggregation code currently doesn't implement the buffer size negotiation. It will always request a max buffer size (which is fine, if a little pointless, as the mac80211 code doesn't know and might just use 0 instead), but if the peer requests a smaller size it isn't possible to honour this request. In order to fix this, look at the buffer size in the addBA response frame, keep track of it and pass it to the driver in the ampdu_action callback when called with the IEEE80211_AMPDU_TX_OPERATIONAL action. That way the driver can limit the number of subframes in aggregates appropriately. Note that this doesn't fix any drivers apart from the addition of the new argument -- they all need to be updated separately to use this variable! Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Switch locking from semaphores to mutexesLarry Finger2010-12-161-16/+16
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtl8192ce: Add new driverLarry Finger2010-12-151-0/+1029
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud