aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-07-12iwlwifi: nvm: remove mac address byte swapping in 8000 familyLiad Kaufman1-7/+5
This fixes the byte order copying in the MAO (Mac Override Section) section from the PNVM, as the byte swapping is not required anymore in the 8000 family. Due to the byte swapping, the driver was reporting an incorrect MAC adddress. CC: <stable@vger.kernel.org> [4.1] Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-8/+24
Conflicts: drivers/net/phy/amd-xgbe-phy.c drivers/net/wireless/iwlwifi/Kconfig include/net/mac80211.h iwlwifi/Kconfig and mac80211.h were both trivial overlapping changes. The drivers/net/phy/amd-xgbe-phy.c file got removed in 'net-next' and the bug fix that happened on the 'net' side is already integrated into the rest of the amd-xgbe driver. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-28iwlwifi: nvm: fix otp parsing in 8000 hw familyLiad Kaufman1-1/+1
The radio cfg DWORD was taken from the wrong place in the 8000 HW family, after a line in the code was wrongly changed by mistake. This broke several 8260 devices. Fixes: 5dd9c68a854a ("iwlwifi: drop support for early versions of 8000") Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-21iwlwifi: nvm: force mac from otp in case nvm mac is reservedLiad Kaufman1-1/+10
Take the MAC address from the OTP even if one is present in the NVM, if that MAC address happens to be a reserved one. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-10iwlwifi: mvm: forbid MIMO on devices that don't support itEmmanuel Grumbach1-6/+13
There are devices that forbid MIMO by the mean of the NVM. Detect thoses devices and forbid MIMO otherwise the firmware would crash. STBC is still allowed on these devices. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-06cfg80211: change GO_CONCURRENT to IR_CONCURRENT for STAArik Nemtsov1-1/+1
The GO_CONCURRENT regulatory definition can be extended to station interfaces requesting to IR as part of TDLS off-channel operations. Rename the GO_CONCURRENT flag to IR_CONCURRENT and allow the added use-case. Change internal users of GO_CONCURRENT to use the new definition. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-26iwlwifi: drop support for early versions of 8000Emmanuel Grumbach1-41/+16
These early versions are no longer supported. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: don't allow the FW to return invalid ch indicesArik Nemtsov1-0/+5
If the FW returns an invalid channels count in response to an MCC request, make sure we don't reference invalid indices in the channels array. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: use correct NVM offset for LAR enable for new NVMsArik Nemtsov1-3/+7
New NVM versions in LnP platforms have the lar_enable bits in a different offset. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: mvm: take the MAC address from HW registersEran Harary1-45/+16
For some configurations, the driver should get the MAC address from the hardware registers and not from the regular locations. Since the parsing of the MAC address is the same regardless of its source, continue the regular code path (parsing) after we read the registers. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: mvm: support new PHY_SKU nvm section for family 8000 B0Eran Harary1-11/+38
Starting from family 8000 B0 step the radio_cfg parameters and the get_sku parameters moved from SW section to PHY_SKU section. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: disable 11ac if 11n is disabledEliad Peller1-8/+7
11ac depends on 11n, so disable it if 11n is disabled. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: iwlmvm: LAR: disable LAR support due to NVM vs TLV conflictMatti Gottlieb1-3/+12
If LAR is supported in TLV, but the NVM does not enable it, then disable LAR support and ignore the TLV's bit that enabled LAR. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: use IWL_DEFAULT_MAX_TX_POWER for max_eirpEliad Peller1-1/+2
max_eirp affects the txpower configured to the power, so use the max tx power (22) instead of some other value. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: change last 5ghz channel to 165 & add support for 8000 familyMatti Gottlieb1-7/+17
Fix the last 5ghz channel to 165 instead of 161 Add support for 8000 family, until channel 181. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: nvm: init correct nvm channel list for 8000 devicesArik Nemtsov1-3/+4
Otherwise the regulatory data will mistakenly contain only 7000 series channels. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: don't declare support for 5ghz if not supportedEliad Peller1-1/+6
Remove a useless debug print about unsupported channels. Also add a comment about the LAR special case where channels might become valid later. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: ignore IBSS flag as regulatory NO-IR indicationArik Nemtsov1-6/+2
According to updated regulatory guidelines, the ACTIVE bit in the NVM also allows ibss activity on the channel. The IBSS NVM bit is not updated when LAR is active and is deprecated. Using this bit for NO-IR incorrectly causes all 5Ghz channels to be marked as passive. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: mvm: consider LAR support during NVM parseArik Nemtsov1-47/+63
Register to cfg80211 with all channels enabled when LAR is supported. Appropriate channels will later be disabled when a specific regulatory domain is defined. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12iwlwifi: create regdomain from mcc_update_cmd responseArik Nemtsov1-0/+153
Parse the NVM channel data and create a regulatory domain with a rule for every 20Mhz channel. Use the AUTO_BW flag so the regulatory core can unify single-channel rules into ranges. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-28iwlwifi: mvm: support LnP 1x1 antenna configurationMoshe Harel1-0/+6
The antenna configuration has to be read also from OTP Currently read only from FW image Guideline: An antenna exists only if appears both in FW image & NVM Signed-off-by: Moshe Harel <moshe.harel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-23iwlwifi: change max HT and VHT A-MPDU exponentEran Harary1-1/+4
Add two new parameters to iwl_cfg: max_ht_ampdu_exponent and max_vht_ampdu_exponent. These parameters, if set, will set new values to the maximum of HT and VHT A-MPDU exponent for the A-MPDU length exponent. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14iwlwifi: mvm: add LDPC supportEyal Shapira1-0/+3
Use LDPC for Tx and publish support for Rx in case the chip supports LDPC. Enable it for the 7265 family. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXTEmmanuel Grumbach1-3/+1
2014-09-08iwlwifi: increase DEFAULT_MAX_TX_POWEREliad Peller1-3/+1
The chip is able to transmit up to 22dBm, so set the constant appropriately. CC: <stable@vger.kernel.org> [3.13+] Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03iwlwifi: add Intel Mobile Communications copyrightJohannes Berg1-0/+2
Our legal structure changed at some point (see wikipedia), but we forgot to immediately switch over to the new copyright notice. For files that we have modified in the time since the change, add the proper copyright notice now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-07iwlwifi: 8000: drop a print when the address is invalidEran Harary1-0/+3
when driver takes the MAC address from the HW section and it isn't valid - print an error. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-06iwlwifi: mvm: read the mac address in family 8000Eran Harary1-12/+48
In family 8000 products the MAC address in the OTP could be in either: - WFPM address - PCIE address In sdio product we should read it from the WFPM, in pcie product we should read it from the PCIe location. This is relevant only from otp version 0xE08 and above. While at it, fix the bytes order in version 0xE08. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: mvm: fix bug in set_hw_address functionEran Harary1-12/+22
Don't use nvm_hw pointer if it is NULL. Print an error message if the MAC address isn't valid. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-06-24iwlwifi: fix NVM channel attribute map.David Spinadel1-4/+18
Fix NVM channel attributes. Add indoor-only and GO Concurrent bits. Remove DFS channel bit which is overlapped with radar. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-11iwlwifi: mvm: add channel 14 to the low band listEran Harary1-2/+2
in family 8000: additional channel 14 added to the low band list. now the number of channels in the low band is 15. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Dor Shaish <dor.shaish@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-05-06iwlwifi: mvm: select the MAC address according to priorityEran Harary1-8/+38
For family 8000 products, the driver should take the MAC address from the mac_override section and only if this section is empty it should take it from the HW section. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-06iwlwifi: mvm: fix the number of channels in family 8000Eran Harary1-11/+14
Number of channels changed from 40 to 50 Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-09iwlwifi: nvm: fix VHT capability antenna-dependent fieldsJohannes Berg1-8/+11
As the antenna dependent fields depend on the firmware file and not the NVM, use those fields in the VHT capability creation. Additionally, fix the STBC and antenna pattern consistency fields. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-24Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-nextJohn W. Linville1-60/+185
2014-02-23iwlwifi: nvm: remove reading valid antennas from NVMJohannes Berg1-17/+0
These values aren't used as the firmware values should be used, so reading them is pointless and hides potential errors when somebody uses these values. Leave them zero to make it clearer that they can't be used. We can't remove the struct members as the DVM driver does read the values from EEPROM/OTP and the structure is shared between drivers. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-20iwlwifi: mvm: fix possible memory leakEytan Lifshitz1-0/+1
iwl_parse_nvm_data() doesn't free allocated memory if it is fed with invalid parameter. Fix this. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-13Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-0/+5
2014-02-13iwlwifi: mvm: new NVM format in family 8000Eran Harary1-49/+190
Support the changes below: - Fields and sections structure were changed. - the NVM file built from DWord instead of Words. - sections header format was changed. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: remove obsolete TODOEmmanuel Grumbach1-5/+1
The calib_version is 255 and this is perfectly fine - no need to leave a TODO there. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-02iwlwifi: mvm: don't allow A band if SKU forbids itEmmanuel Grumbach1-0/+5
The driver wasn't reading the NVM properly. While this didn't lead to any issue until now, it seems that there is an old version of the NVM in the wild. In this version, the A band channels appear to be valid but the SKU capabilities (another field of the NVM) says that A band isn't supported at all. With this specific version of the NVM, the driver would think that A band is supported while the HW / firmware don't. This leads to asserts. Cc: <stable@vger.kernel.org> [3.10+] Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-01-13iwlwifi: mvm: don't use highest rate in VHT MCS SetEyal Shapira1-6/+0
Keeping this as 0 is ok according to spec section 9.7.11 as this means the limits are according to the Tx/Rx supported MCS x NSS bitmap. Initially we've set these as there were concerns of interop issues but these turned out to be false. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-01-13iwlwifi: change beamformee STS capEyal Shapira1-2/+1
All beamformee supporting chips have the ability to support VHT NDP in up to 4 STSs. So change the published beamformee STS cap accordingly to 3 as it should be Nsts-1. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach1-2/+2
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: mvm: set highest rate in VHT MCS SetEyal Shapira1-0/+6
Set the Tx/Rx highest long GI rates in the VHT Supported MCS Set field according to the chip capabilties. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: publish Tx STBC support in VHTEyal Shapira1-2/+6
If the device is MIMO and VHT capable it supports Tx STBC. Unlike HT, any chip that supports VHT also support STBC so no need for a config parameter. Using num_of_ants multiple times warranted caching it. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: set VHT beamformee STS cap correctlyEyal Shapira1-0/+3
It was set to zero which reflects support of a single STS. Set according to the number of Rx antennas which correctly reflects the number of STSs the STA can receive in a VHT NDP. This improves beamforming and has been tested to improve Rx throughput. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-09iwlwifi: fix check for a single rx antennaEyal Shapira1-1/+2
valid_rx_ant is a bitmask of available antennas and not the number of Rx antennas. Use num_of_ant and remove duplicate definitions in both dvm and mvm. Signed-off-by: Eyal Shapira <eyal@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-11-25cfg80211: consolidate passive-scan and no-ibss flagsLuis R. Rodriguez1-2/+2
These two flags are used for the same purpose, just combine them into a no-ir flag to annotate no initiating radiation is allowed. Old userspace sending either flag will have it treated as the no-ir flag. To be considerate to older userspace we also send both the no-ir flag and the old no-ibss flags. Newer userspace will have to be aware of older kernels. Update all places in the tree using these flags with the following semantic patch: @@ @@ -NL80211_RRF_PASSIVE_SCAN +NL80211_RRF_NO_IR @@ @@ -NL80211_RRF_NO_IBSS +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_PASSIVE_SCAN +IEEE80211_CHAN_NO_IR @@ @@ -IEEE80211_CHAN_NO_IBSS +IEEE80211_CHAN_NO_IR @@ @@ -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR +IEEE80211_CHAN_NO_IR @@ @@ -(NL80211_RRF_NO_IR) +NL80211_RRF_NO_IR @@ @@ -(IEEE80211_CHAN_NO_IR) +IEEE80211_CHAN_NO_IR Along with some hand-optimisations in documentation, to remove duplicates and to fix some indentation. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [do all the driver updates in one go] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-07-31iwlwifi: mvm: Enable user set TX powerMatti Gottlieb1-2/+6
Support Tx power limitations. These limitations can come from mac80211 for various reasons. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>