summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
AgeCommit message (Collapse)Author
2016-09-19iwlwifi: move to wide ID for all commandsSara Sharon
Due to firmware design considerations, move to wide ID for all commands. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-09-16iwlwifi: introduce trans API to get byte count tableSara Sharon
In future HW the byte count table address will be configured by ucode per queue. Add API to expose the byte count table to the opmode Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-09-15iwlwifi: pcie: introduce new tfd and tb formatsSara Sharon
New hardware supports bigger TFDs and TBs. Introduce the new formats and adjust defines and code relying on old format. Changing the actual TFD allocation is trickier and deferred to the next patch. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: move iwl_drv to be shared across transportsSara Sharon
All transports has this structure. By moving it to be shared, we can get rid of casting to the specific transport in probe and remove. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: decouple PCIe transport from mac80211Johannes Berg
The PCIe transport needs to store two pointers in each TX SKB, and currently assumes mac80211's ieee80211_tx_info is present in the CB to do that. In order to remove that assumption, have the opmodes pass in the offset to where the pointers can be stored in the CB and use the offset in the PCIe code. To make the disentanglement complete, remove mac80211.h includes from everywhere in the generic iwlwifi code. This required adding an include of cfg80211.h in one place. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: mvm: support dqa queue sharingLiad Kaufman
Support DQA queue sharing when no free queue exists for allocation to a STA that already exists. This means that a single queue will serve more than a single TID (although the RA will be the same for all TIDs served). We try to choose the lowest AC possible, to ensure the shared queues have the lowest possible combined AC requirements. The queue to share is chosen only from the same RA's DATA queues as follows (in descending priority): 1. An AC_BE queue 2. Same AC queue 3. Highest AC queue that is lower than new AC 4. Any existing AC (there always is at least 1 DATA queue) If any aggregations existed for any of the TIDs of the shared queue - they are stopped (the FW is notified), but no delBA is sent. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: pcie: make sure packet arrived to destined queueSara Sharon
Add a warning in case packet didn't end up in the HW destined queue. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-01iwlwifi: mvm: update mpdu metadata APISara Sharon
rx_phy notification is no longer sent in devices with multiple rx queues. All the needed data is now set in the metadata - update code accordingly to reflect all the features as in the previous RX path. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-05-10iwlwifi: allow combining different phy images with mac imagesHaim Dreyfuss
Currently there is one to one function between device id to it's ucode. The new generation devices allows to combine different phy and mac images. Now we have two different ucode images with the same device id. Read RF ID to identify phy image and overwrite it if needed. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-03-30iwlwifi: trans: fix iwl_trans_txq_scd_cfg.sta_id signLiad Kaufman
For some reason, this was defined as a signed variable. Make it unsigned. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-27iwlwifi: pcie: add pm_prepare and pm_complete opsLuca Coelho
With these ops, we can know when we are about to enter system suspend. This allows us to exit D0i3 state before entering suspend. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01iwlwifi: various comments and code cleanupsEmmanuel Grumbach
No need to include net/ip6_checksum.h twice. Remove TODOs. Remove trailing space. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01iwlwifi: mvm: Do not switch to D3 image on suspendMatti Gottlieb
Currently when the driver is configured with wowlan parameters, and enters D3 mode, the driver switches the FW image to D3, and when it exists suspend, it reloads the D0 image. If the firmware supports the consolidation of the D0 & D3 images there is no need to load the D3 image on suspend, and no need to reload the D0 image on resume. Do not switch images on suspend / resume, for firmwares that support consolidated images. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-01iwlwifi: pcie: add RTPM support when wifi is enabledLuciano Coelho
Enable runtime power management (RTPM) for PCIe devices and implement the corresponding functions to enable D0i3 mode when the device is idle. Additionally, remove some unnecessary #ifdef's because the RTPM code will not be called if runtime PM is not configured. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-01-07iwlwifi: mvm: constify the parameters of a few functions in fw-dbg.cEmmanuel Grumbach
The debug functions of fw-dbg.c don't really need to modify the trigger and the description they receive as a parameter. Constify the pointers. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-21iwlwifi: bail out in case of bad trans stateEliad Peller
In case of bad trans state (i.e. fw is not loaded) bail out immediately instead of calling the trans, which might not be fully initialized yet. Also add WARN_ON_ONCE to help debugging where the errorneous call is coming from. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-21iwlwifi: remove unused parameter from grab_nic_accessEmmanuel Grumbach
All the callers used silent = false. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-20iwlwifi: pcie: build an A-MSDU using TSO coreEmmanuel Grumbach
When the op_mode sends an skb whose payload is bigger than MSS, PCIe will create an A-MSDU out of it. PCIe assumes that the skb that is coming from the op_mode can fit in one A-MSDU. It is the op_mode's responsibility to make sure that this guarantee holds. Additional headers need to be built for the subframes. The TSO core code takes care of the IP / TCP headers and the driver takes care of the 802.11 subframe headers. These headers are stored on a per-cpu page that is re-used for all the packets handled on that same CPU. Each skb holds a reference to that page and releases the page when it is reclaimed. When the page gets full, it is released and a new one is allocated. Since any SKB that doesn't go through the fast-xmit path of mac80211 will be segmented, we can assume here that the packet is not WEP / TKIP and has a proper SNAP header. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-20iwlwifi: clear ieee80211_tx_info->driver_data in the op_modeEmmanuel Grumbach
The transport will need to use the info->driver_data pointers. Since the op_mode has this memory hot in cache, clear it there. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-20iwlwifi: pcie: allow to pretend to have Tx CSUM for debugEmmanuel Grumbach
Allow to configure the driver to pretend to have TX CSUM offload support. This will be useful to test the TSO flows that will come in further patches. This configuration is disabled by default. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-20iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach
ilw@linux.intel.com is not available anymore. linuxwifi@intel.com should be used instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: replace d0i3_mode and wowlan_d0i3 with more generic variablesLuca Coelho
The d0i3_mode variable is used to distinguish between transports that handle d0i3 entry during suspend by themselves (i.e. the slave transports) and those which rely on the op_mode layer to do it. The reason why the former do it by themselves is that they need to transition from d0i3 in runtime_suspend into d0i3 in system-wide suspend and this transition needs to happen before the op_mode's suspend flow is called. The wowlan_d0i3 element is also a bit confusing, because it just reflects the wowlan->any value for the trans to understand. This is a bit unclear in the code and not generic enough for future use. To make it clearer and to generalize the platform power mode settings, introduce two variables to indicate the platform power management modes used by the transport. Additionally, in order not to take too big a step in one patch, treat this new variables semantically in the same way as the old d0i3_mode element, introducing a iwl_mvm_enter_d0i3_on_suspend() function to help with that. This commit also adds the foundation for a new concept where the firmware configuration state (i.e. D0, D3 or D0i3) is abstracted from the platform PM mode we are in (i.e. runtime suspend or system-wide suspend). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: update host command messages to new formatSharon Dvir
Host commands now have a group id, express this in printed messages. Signed-off-by: Sharon Dvir <sharon.dvir@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: uninline iwl_trans_send_cmdEmmanuel Grumbach
This function got too big to be inlined. Uninline it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: trans: support a callback for ASYNC commandsEmmanuel Grumbach
This allows the op_mode to request from the transport to call a callback when an ASYNC commands is completed by the firmware. The same callback will be called for all the commands. Pass the command whose response triggers the callback as a parameter to the callback itself. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: pcie: allow the op_mode to block the tx queuesEmmanuel Grumbach
In certain flows (see next patches), the op_mode may need to block the Tx queues for a short period. Provide an API for that. The transport is in charge of counting the number of times the queues are blocked since the op_mode may block the queues several times in a row before unblocking them. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-01iwlwifi: clean up transport debugfs handlingJohannes Berg
Transport code currently calls itself through the transport ops, which is quite pointless. Clean up all of this. While at it, remove the unnecessary dir argument and the redundant IDI code. In slave transports, call both the common slave debugfs and the transport's own. SDIO has no files, so remove it all there. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-11-26iwlwifi: add support for 12K Receive BuffersEmmanuel Grumbach
802.11ac allows A-MSDU that can be up to 12KB long. Since an entire A-MSDU needs to fit into one single Receive Buffer (RB), add support for big RBs. Since this adds lots of pressure to the memory manager and significantly increase the true_size of the RX buffers, don't enable this by default. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>