aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rsi
AgeCommit message (Collapse)AuthorFilesLines
2017-08-17rsi: handle station connection in AP modePrameela Rani Garnepudi3-26/+110
Station structures are maintained in driver with required fields. When mac80211 callback sta_add is called, driver iterates through list of connected stations to check available index and assigns station id which is important for further communication to that station. Then peer notify frame is send to firmware to inform the firmware about new station connection. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: add beacon changes for AP modePrameela Rani Garnepudi7-14/+152
Mac80211 config parameter BEACON_ENABLE is handled. When VAP capabilities frame with AP mode is configured to firmware, beacon events start coming to host at each PreTBTT. At this time, beacon is taken from mac80211, descriptor is prepared and send to firmware. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: remove interface changes for AP modePrameela Rani Garnepudi1-4/+22
remove_interface callback of mac80211 is handled for AP mode. Same is notified to firmware through vap_capabilities frame with VAP status VAP_DELETE. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: add interface changes for ap modePrameela Rani Garnepudi4-13/+44
AP mode is handled in add_interface callback of mac80211. Also for AP mode, sending rx filter frame to disallow beacons to host is added. Station structures are initialized to NULL. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: advertise ap mode supportPrameela Rani Garnepudi2-1/+37
AP mode support is advertised to cfg80211. Necessary wiphy parameters are initialized. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: RTS threshold configurationKarun Eagalapati4-0/+55
Provision is added for configuring RTS threshold by sending vap dynamic update frame to firmware. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: buffer available interrupt handlingKarun Eagalapati1-5/+6
BUFFER_AVAILABLE interrupt is sent by firmware to indicate change in buffer status. We should check buffer status while handling this interrupt. Currently buffer status is checked only while dequeueing packets. This patch fixes a data traffic stuck problem observed occasionally. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: buffer full check optimizationKarun Eagalapati2-1/+16
We get buffer full event from firmware whenever Tx queue is full Host should stop writing packets after this and resume after buffer free event. Buffer status checking is optimized for once in 4 times if BUFF_FULL condition is not set, otherwise once for every packet. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: rename sdio_read_buffer_status_registerKarun Eagalapati3-12/+5
rsi_sdio_check_buffer_status would be the appropriate name for this function as we are checking hardware buffers availability status. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: add support for U-APSD power saveKarun Eagalapati5-0/+46
This patch adds support for U-APSD power save. Configuration frame is downloaded to firmware with default settings and support is advertised to mac80211 Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: add support for legacy power saveKarun Eagalapati9-3/+309
This patch adds support for legacy power save. Necessary configuration frames are downloaded to firmware when power save is enabled/disabled Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: update set_antenna command framePavani Muthyala2-6/+18
TX command frame set_antenna is modified to use common descriptor structure. Also it's subframe type is set. Signed-off-by: Pavani Muthyala <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: add support for rf-kill functionalityPavani Muthyala1-2/+19
This patch implements rfkill_poll handler. Also, necessary changes are done in interface up and down handler to support rfkill functionality. Signed-off-by: Pavani Muthyala <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-08rsi: fix uninitialized descriptor pointer issuePrameela Rani Garnepudi1-0/+1
This patch fixes the uninitialized descriptor pointer issue in function rsi_send_internal_mgmt_frame(). Descriptor should point to start of the skb data. Reported-by: Dan Carpenter <[email protected]> Fixes: 9a629fafe7d8 ("rsi: immediate wakeup bit and priority for TX command packets") Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: fix static checker warningAmitkumar Karwar1-1/+8
u32 pointer is changed to u16 and filled the value. Problem is solved by using local temporary variable. Below static checker warning was reported. drivers/net/wireless/rsi/rsi_91x_usb.c:400 rsi_usb_master_reg_read() warn: passing casted pointer 'value' to 'rsi_usb_reg_read()' 32 vs 16. Fixes: b97e9b94ad75c ("rsi: Add new host interface operations") Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: check length before USB read/write registerAmitkumar Karwar1-0/+6
These checks are required. Otherwise we may end up getting memory corruption if invalid length is passed. Fixes: b97e9b94ad75c ("rsi: Add new host interface operations") Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: use macro for allocating USB bufferAmitkumar Karwar2-2/+3
4 bytes is fixed size for reading or writing USB register. We will use a macro instead of hardcoding this. Fixes: b97e9b94ad75c ("rsi: Add new host interface operations") Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: regulatory enhancementsPrameela Rani Garnepudi2-12/+45
Below regulatory changes are included this patch * Country code is saved as it will be used in bgscan. * Region codes are mapped according to RSI region codes. * Radar flag settings are moved under the check if 5GHZ band is enabled. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Send rx filter frame to device when interface is downPrameela Rani Garnepudi1-0/+4
When interface is down it is better to stop all RX packets to host. 0xffff will block all packets to host. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Remove internal header from Tx status skbPrameela Rani Garnepudi1-1/+9
Device specific descriptor for each TX packet is prepared on top of skb data address. This descriptor should be pulled out before indicating the TX status to mac80211. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: update tx command frame block/unblock dataPrameela Rani Garnepudi2-7/+22
TX command frame block/unblock data is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: block/unblock data queues as per connection statusPrameela Rani Garnepudi1-0/+5
Data queues should be unblocked after station add notify frame is sent and should be blocked after station delete notify is sent. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: update autorate request command framePrameela Rani Garnepudi1-0/+3
When Short Gaurd Interval is enabled bit 9 is set in rate. Otherwise it should not be set. Added missing 'else' case in this patch. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: set_key enhancementsPrameela Rani Garnepudi1-13/+15
Broadcast bit to be set for broadcast and multicast packets. For remove_key, tx and rx mic need not be filled. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: update set_key command framePrameela Rani Garnepudi2-14/+28
TX command frame set_key is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: update vap capabilities command framePrameela Rani Garnepudi3-29/+49
VAP capablities frame configured to device is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: update set_channel command framePrameela Rani Garnepudi2-25/+35
TX command frame set_channel is modified to use common descriptor structure. Also DFS channel indication to firmware is added in the descriptor for dfs channels configuration. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Update baseband RF programming framePrameela Rani Garnepudi2-11/+25
Baseband RF programming frame configured to device is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Update aggregation parameters command framePrameela Rani Garnepudi2-24/+31
AMPDU aggregation parameters frame configured to device is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Update peer notify command framePrameela Rani Garnepudi2-10/+13
TX command frame peer notify is updated to use common descriptor structure. MPDU density value added to the frame. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: remove unnecessary check for 802.11 management packetPrameela Rani Garnepudi1-30/+24
The function rsi_mgmt_pkt_to_core() is for passing the 802.11 management frames to mac80211. So, it is unnecessary to check again for the frame type 802.11 management in this function. It can be checked before passing to this function. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Update in tx command frame radio capabilitiesPrameela Rani Garnepudi3-28/+48
Radio capabilities frame is updated to use common descriptor structure. Also, few changes to this frame is done like hardware queues are increase to 12 from 8, default channel number is included. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: immediate wakeup bit and priority for TX command packetsPrameela Rani Garnepudi2-0/+4
For all TX command packets immediate wakeup bit needs to be set in descriptor. This will make sure device will wakeup if it is in any sleep state. Priority of the packet is also set. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: add common structures needed for command packetsPrameela Rani Garnepudi1-0/+38
All internal management packets (command packets) use some common fields and some packet specific fields for packet descriptors. This patch adds some common structures which are needed for all command packets. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Rename mutex tx_rxlock to the tx_lock.Karun Eagalapati3-8/+8
We have now added separate lock for Rx. This lock is used to protect tx path only Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: use separate mutex lock for receive threadKarun Eagalapati4-8/+11
Deadlock issue is observed during our stress tests. The root cause for the issue is same lock is used between tx and rx threads. This patch adds a separate mutex lock for rx thread to resolve the problem. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: SDIO Rx packet processing enhancementKarun Eagalapati3-8/+28
Newer firmware sends information about number of blocks through interrupt only. We don't need to read extra register for this. This patch adds needed driver changes for this enhancment. The change here is backward compatible Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: Optimise sdio claim and release hostKarun Eagalapati1-10/+21
SDIO host is already claimed in our interrupt handler. Some lower level APIs claims host while performing SDIO read or write operations. Let's use sdio_irq_task variable to check if we are in interrupt context and claim/release the host accordingly. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: rename variable in_sdio_litefi_irqKarun Eagalapati1-1/+1
The variable in_sdio_litefi_irq is renamed to sdio_irq_task, as it is more relevant here. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: separate function for data packet descriptorPavani Muthyala1-23/+28
Data packet descriptor preparation code is moved a separate function. Signed-off-by: Pavani Muthyala <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: data packet descriptor enhancementsPavani Muthyala3-15/+55
This patch covers some enhancements in data packet descriptor preparation especially for EAPOL, multicast/broadcast packets. Signed-off-by: Pavani Muthyala <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: data packet descriptor code cleanupPavani Muthyala3-21/+36
Currently this descriptor is prepared with the help of __le16 pointer. This patch makes use of a structure to prepare the descriptor in a cleaner way. Signed-off-by: Pavani Muthyala <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: separate function for management packet descriptorPrameela Rani Garnepudi4-52/+98
Management descriptor preparation is move to a separate function as it will be called from a different context in upcoming patches. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: management frame descriptor preparation cleanupPavani Muthyala2-19/+35
Currently this descriptor is prepared with the help of __le16 pointer. This patch makes use of a structure to prepare the descriptor in a cleaner way. Signed-off-by: Pavani Muthyala <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: set immediate wakeup bitKarun Eagalapati1-0/+1
immediate wakeup bit is set while sending internal management frame to the firmware. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: choose correct endpoint based on queue.Karun Eagalapati1-1/+2
Till now only management packets were handled. Let's enhance the logic for choosing endpoint to accommodate other packets. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: rename USB endpoint macrosKarun Eagalapati2-3/+3
These endpoints are for WLAN and BT protocols. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: correct the logic of deriving queue numberAmitkumar Karwar1-1/+1
Maximum valid queue number is 0x5. So anding with 0x7 should be ok here. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: USB tx headroom cleanupKarun Eagalapati1-20/+21
USB headroom is added while submitting the data to URB as per firmware's requirement. This logic is moved to rsi_usb_card_write() so that caller need not worry about it. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-07-28rsi: card reset for USB interfaceKarun Eagalapati2-0/+73
We need to reset the chip in teardown path so that it can work next time when driver is loaded. This patch adds support for this reset configuration for USB. Signed-off-by: Karun Eagalapati <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>