summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtlwifi/pci.c
AgeCommit message (Collapse)Author
2011-08-01rtlwifi: Fix kernel oops on ARM SOCLarry Finger
This driver uses information from the self member of the pci_bus struct to get information regarding the bridge to which the PCIe device is attached. Unfortunately, this member is not established on all architectures, which leads to a kernel oops. Skipping the entire block that uses the self member to determine the bridge vendor will only affect RTL8192DE devices as that driver sets the ASPM support flag differently when the bridge vendor is Intel. If the self member is available, there is no functional change. This patch fixes Bugzilla No. 40212. Reported-by: Hubert Liao <liao.hubertt@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> [back to 2.6.38] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05rtlwifi: rtl8192{ce,cu,se} Remove irq_enabledMike McCormack
This should be unnecessary if synchronize_irq is used. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29rtlwifi: use PCI_VENDOR_ID_*Jon Mason
Use PCI_VENDOR_ID_* from pci_ids.h instead of creating #define locally. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29rtlwifi: remove unnecessary read of PCI_CAP_ID_EXPJon Mason
The PCIE capability offset is saved during PCI bus walking. It will remove an unnecessary search in the PCI configuration space if this value is referenced instead of reacquiring it. Also, remove unnecessary and unused #defines for PCI. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-28Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-tx.c
2011-06-20rtlwifi: Fix typo in variable nameMike McCormack
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>
2011-06-20rtlwifi: rtl8192se: Handle duplicate PCI ID 0x10ec:0x8192 conflict with ↵Larry Finger
r8192e_pci There are two devices with PCI ID 0x10ec:0x8192, namely RTL8192E and RTL8192SE. The method of distinguishing them is by the revision ID at offset 0x8 of the PCI configuration space. If the value is 0x10, then the device uses rtl8192se for a driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10rtlwifi: Factor out code to receive one packetMike McCormack
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10rtlwifi: Free skb in one placeMike McCormack
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10rtlwifi: Resubmit skbs with bad CRC earlyMike McCormack
Once we realize a bad packet was received, don't waste time unmapping it, freeing it, then allocation a new skb and mapping it, just resubmit the existing skb. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10rtlwifi: Remove unnecessary indentMike McCormack
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-rxon.c drivers/net/wireless/rtlwifi/pci.c
2011-06-07rtlwifi: Avoid modifying skbs that are resubmittedMike McCormack
In the case we fail to allocate a new skb, the old skb should be resubmitted unmodified. Fixes bug introduced in a9e12869758430424804. 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>
2011-06-07rtlwifi: Fix logic in rx_interruptMike McCormack
Should pass along packet if there's no CRC and no hardware error. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03rtlwifi: Fix logic in rx_interruptMike McCormack
Should pass along packet if there's no CRC and no hardware error. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03rtlwifi: Assign rx buffer ownership to hardware lastMike McCormack
Ownership of an rx buffer should only be given to the hardware after all other changes are written, otherwise there's a potential race. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03rtlwifi: Run IPS leave work in a taskletMike McCormack
This removes the need to use IRQ safe spinlocks in many places. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03rtlwifi: Store loop index in local variableMike McCormack
_rtl_pci_rx_interrupt uses rtlpci->rx_ring[rx_queue_idx].idx a few times, so store it in a separate variable. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-26rtlwifi: Use order 2 RX buffer allocation only if necessaryLarry Finger
Although a previous fix handles the kernel panics that result from failure to allocate a new RX buffer, memory fragmentation can be reduced if the amsdu_8k capability is disabled as new buffers need only be of O(0), not O(2). Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-26rtlwifi: Fix kernel panic resulting from RX buffer allocation failureLarry Finger
To handle amsdu_8k capability, the PCI routine of this driver must allocate receive buffers of order 2. Under heavy load, this causes fragmentation of memory. The present code releases the current buffer before checking to see if a new one is availble. Recovery from allocation failures is not possible, which results in kernel panics. The fix is to reorder the code to check that a new buffer can be allocated before the old one is released. If not possible, the received frame is dropped and the old one is reused. Without this change, it is impossible to transfer a 2 GB file without a kernel panic. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [2.6.{37,38,39}] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-10rtlwifi: rtl8192se: Remove need to disable ASPMChaoming Li
When this driver was initially submitted, the system would crash unless ASPM was disabled. This problem has been fixed. This patch also adds a printk that outputs the name of the firmware file that is used. 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>
2011-05-02rtlwifi: Fix typo in pci.cLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26rtlwifi: rtl8192ce: rtl8192cu: Fix most sparse warningsLarry Finger
Fix most sparse warnings in rtlwifi, rtl8192ce and rtl8192cu drivers. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26rtlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify ↵Chaoming_Li
rtl8192cu for addition of rtl8192se and rtl8192de Change rtl8192ce routines phy and trx for addition of RTL8192SE and RTL8192DE. In addition, make necessary modifications to rtl8192cu. This patch also removes the temporary patches needed to enable intermediate steps to build without error. 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>
2011-04-26rtlwifi: Convert usb routines for addition of rtl8192se and rtl8192deChaoming_Li
Convert usb routines for addition of RTL8192SE and RTL8192DE code 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>
2011-04-26rtlwifi: Convert pci routines for addition of rtl8192se and rtl8192deChaoming_Li
Convert pci routines for addition of RTL8192SE and RTL8192DE code These changes allow the upper-level driver to specify the BAR to be used as it is different for rtl8192se than for the others. 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>
2011-04-26rtlwifi: Change base routines for addition of rtl8192se and rtl8192deChaoming_Li
Change base routines for addition of RTL8192SE and RTL8192DE code. Additional files are modified 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>
2011-04-12rtlwifi: rtl8192ce: Fix LED initializationChaoming Li
Driver rtl8192ce does not initialize the LED correctly. 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>
2011-04-04rtlwifi: Remove unused/unneeded variablesLarry Finger
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>
2011-02-28net: use pci_dev->revision, againSergei Shtylyov
Several more network drivers that read the device's revision ID from the PCI configuration register were merged after the commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all drivers to use pci_device->revision), so it's time to do another pass of conversion to using the 'revision' field of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-21rtlwifi: rtl8192ce: Fix endian warningsLarry Finger
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>
2011-02-21rtlwifi: Modify some rtl8192ce routines for merging rtl8192cuLarry Finger
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>
2011-02-11rtlwifi: Modify core routinesLarry Finger
The rtlwifi core needs some changes before inclusion of a driver for the RTL8192CU USB device. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: <chaoming_li@realsil.com.cn> Signed-off-by: <george0505@realtek.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-21rtlwifi: Fix possible NULL dereferenceJesper Juhl
In drivers/net/wireless/rtlwifi/pci.c::_rtl_pci_rx_interrupt() we call dev_alloc_skb(), which may fail and return NULL, but we do not check the returned value against NULL before dereferencing the returned pointer. This may lead to a NULL pointer dereference which means we'll crash - not good. In a separate call to dev_alloc_skb(), the debug level is changed so that the failure message will always be logged. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22rtlwifi: Fix large packet issueChaoming Li
An RX buffer is set to 9100 bytes to receive 8K AMSDU; however, an skb of this size fails in the kernel. 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>
2010-12-22rtlwifi: Use pci_pcie_cap()Hauke Mehrtens
Use function pci_pcie_cap() instead of accessing struct member directly. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15rtl8192ce: Add new driverLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>