Re: [patch] iwlwifi: mvm: rs: fix a warning message
On 11/21/2015 12:33 PM, Dan Carpenter wrote: > WARN_ON_ONCE() doesn't take a message, it only takes a condition. I > have changed this to WARN(1, ...). > > Signed-off-by: Dan Carpenter> > diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c > b/drivers/net/wireless/iwlwifi/mvm/rs.c > index d1ad103..58d7bee 100644 > --- a/drivers/net/wireless/iwlwifi/mvm/rs.c > +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c > @@ -1827,7 +1827,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm, > rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; > rate_mask = lq_sta->active_mimo2_rate; > } else { > - WARN_ON_ONCE("Bad column mode"); > + WARN_ONCE(1, "Bad column mode"); > } > > if (column->mode != RS_LEGACY) { > Ouch - thanks. Clearly, this one doesn't trigger very often :) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 06/27] brcm80211: move under broadcom vendor directory
On 11/20/2015 10:53 PM, Arend van Spriel wrote: > On 11/19/2015 08:48 AM, Kalle Valo wrote: >> Hauke Mehrtenswrites: >> >>> On 11/18/2015 03:45 PM, Kalle Valo wrote: Part of reorganising wireless drivers directory and Kconfig. Note that I had to edit Makefiles from subdirectories to use the new location. Signed-off-by: Kalle Valo --- >>> >>> I would prefer to remove the brcm80211 directory in this process and >>> create: >>> drivers/net/wireless/broadcom/brcmfmac >>> drivers/net/wireless/broadcom/brcmsmac >>> drivers/net/wireless/broadcom/brcmutil >>> drivers/net/wireless/broadcom/include >>> >>> This way we have one directory less. >> >> I think this could be done separately. This patchset is big enough >> already, I would not like to make it anymore complicated. >> >> And I actually like the brcm80211 directory, I would not mind keeping it >> still. > > I prefer to keep it as brcmsmac and brcmfmac rely on brcmutil module so > I want to keep them together under brcm80211. > > So does this patch go in before or after the patches I submitted before > the merge window. I hope after :-p Ok, then leave it like Kalle proposed. backports should work with both versions. Hauke -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] iwlwifi: mvm: add hwmon device for the temperature sensor
Enabling nic temperature monitoring using lmsensors: $ sensors .. phy0-pci-0300 Adapter: PCI adapter temp1:+50.0°C (high = +114.0°C, crit = +118.0°C) Signed-off-by: Bjørn Mork--- Bjørn Mork writes: > On 26 September 2014 21:44:38 CEST, Luca Coelho wrote: > >>Yeah, the temperature sensor is used to avoid heating the NIC too much >>and potentially damaging things. We do things like throttle down the >>data flow and, in the most dramatic cases, turn the chip entirely off. >> >>The mean reason for the new debugfs entry is for, well, debugging. :) >> >>Bjørn, do you have any ideas on how this information could be used in a >>useful way so that it would be worth the effort of exporting it in a >>more "official" way? > > No, not really. It was just a random thought that this should be made > available for monitoring applications. > > It sounds like this sensor is similar to the sensors associated with > each CPU core. Which have been made available through the coretemp > driver although I don't think that was the intention of the hardware > designer. But I don't know if exporting it has any practical value. Reviving an old discussion... I got bored and made an attempt on this. Still just for fun. I don't have a real usecase. What do you think? Completely useless? FWIW, in my laptop the nic temperature seems to align pretty well to other temperature sensors: bjorn@nemi:~$ sensors acpitz-virtual-0 Adapter: Virtual device temp1:+48.0°C (crit = +127.0°C) temp2:+45.0°C (crit = +105.0°C) thinkpad-isa- Adapter: ISA adapter fan1:4951 RPM temp1:+48.0°C temp2:+43.0°C temp3:+42.0°C temp4:N/A temp5:+28.0°C temp6:N/A temp7:+25.0°C temp8:N/A temp9:+39.0°C temp10: N/A temp11: +45.0°C temp12: N/A temp13: N/A temp14: N/A temp15: N/A temp16: N/A coretemp-isa- Adapter: ISA adapter Core 0: +46.0°C (high = +105.0°C, crit = +105.0°C) Core 1: +46.0°C (high = +105.0°C, crit = +105.0°C) phy0-pci-0300 Adapter: PCI adapter temp1:+44.0°C (high = +114.0°C, crit = +118.0°C) drivers/net/wireless/iwlwifi/mvm/mvm.h | 11 ++ drivers/net/wireless/iwlwifi/mvm/ops.c | 2 ++ drivers/net/wireless/iwlwifi/mvm/tt.c | 62 ++ 3 files changed, 75 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 4bde2d027dcd..25c6d14b3543 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h @@ -788,6 +788,10 @@ struct iwl_mvm { */ bool temperature_test; /* Debug test temperature is enabled */ +#if IS_ENABLED(CONFIG_HWMON) + struct device *hwmon; +#endif + struct iwl_time_quota_cmd last_quota_cmd; #ifdef CONFIG_NL80211_TESTMODE @@ -1416,6 +1420,13 @@ void iwl_mvm_tt_initialize(struct iwl_mvm *mvm, u32 min_backoff); void iwl_mvm_tt_exit(struct iwl_mvm *mvm); void iwl_mvm_set_hw_ctkill_state(struct iwl_mvm *mvm, bool state); int iwl_mvm_get_temp(struct iwl_mvm *mvm); +#if IS_ENABLED(CONFIG_HWMON) +int iwl_mvm_hwmon_register(struct iwl_mvm *mvm); +void iwl_mvm_hwmon_unregister(struct iwl_mvm *mvm); +#else +static inline int iwl_mvm_hwmon_register(struct iwl_mvm *mvm) { return 0; } +static inline void iwl_mvm_hwmon_unregister(struct iwl_mvm *mvm) {} +#endif /* Location Aware Regulatory */ struct iwl_mcc_update_resp * diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index 13c97f665ba8..903b30986e65 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c @@ -595,6 +595,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, mvm->refs[IWL_MVM_REF_UCODE_DOWN] = 1; iwl_mvm_tof_init(mvm); + iwl_mvm_hwmon_register(mvm); return op_mode; @@ -616,6 +617,7 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode) struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); int i; + iwl_mvm_hwmon_unregister(mvm); iwl_mvm_leds_exit(mvm); iwl_mvm_tt_exit(mvm); diff --git a/drivers/net/wireless/iwlwifi/mvm/tt.c b/drivers/net/wireless/iwlwifi/mvm/tt.c index cadfc0460597..38b36251c883 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/iwlwifi/mvm/tt.c @@ -64,6 +64,7 @@ * */ +#include #include "mvm.h" #define IWL_MVM_TEMP_NOTIF_WAIT_TIMEOUTHZ @@ -414,6 +415,67 @@ void iwl_mvm_tt_handler(struct iwl_mvm *mvm) } } +#if IS_ENABLED(CONFIG_HWMON) +static ssize_t temp1_input_show(struct device *device, + struct device_attribute *devattr, +
[patch] iwlwifi: mvm: rs: fix a warning message
WARN_ON_ONCE() doesn't take a message, it only takes a condition. I have changed this to WARN(1, ...). Signed-off-by: Dan Carpenterdiff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index d1ad103..58d7bee 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c @@ -1827,7 +1827,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm, rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; rate_mask = lq_sta->active_mimo2_rate; } else { - WARN_ON_ONCE("Bad column mode"); + WARN_ONCE(1, "Bad column mode"); } if (column->mode != RS_LEGACY) { -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] mac80211: do not actively scan DFS channels
DFS channels should not be actively scanned as we can't be sure if we are allowed or not. If the current channel is in the DFS band, active scan might be performed after CSA, but we have no guarantee about other channels, therefore it is safer to prevent active scanning at all. Signed-off-by: Antonio Quartulli--- v2: remove unused scan_req argument in ieee80211_scan_get_channel_time() net/mac80211/scan.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 4aeca4b..ce01f74 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -599,7 +599,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, if ((req->channels[0]->flags & IEEE80211_CHAN_NO_IR) || - !req->n_ssids) { + !req->n_ssids || + (req->channels[0]->flags & IEEE80211_CHAN_RADAR)) { next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; } else { ieee80211_scan_state_send_probe(local, _delay); @@ -645,7 +646,8 @@ ieee80211_scan_get_channel_time(struct ieee80211_channel *chan) * TODO: channel switching also consumes quite some time, * add that delay as well to get a better estimation */ - if (chan->flags & IEEE80211_CHAN_NO_IR) + if ((chan->flags & IEEE80211_CHAN_NO_IR) || + (chan->flags & IEEE80211_CHAN_RADAR)) return IEEE80211_PASSIVE_CHANNEL_TIME; return IEEE80211_PROBE_DELAY + IEEE80211_CHANNEL_TIME; } @@ -698,7 +700,8 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, */ bad_latency = time_after(jiffies + -ieee80211_scan_get_channel_time(next_chan), +ieee80211_scan_get_channel_time(next_chan, +scan_req), local->leave_oper_channel_time + HZ / 8); if (associated && !tx_empty) { @@ -777,7 +780,8 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, * * In any case, it is not necessary for a passive scan. */ - if (chan->flags & IEEE80211_CHAN_NO_IR || !scan_req->n_ssids) { + if (chan->flags & IEEE80211_CHAN_NO_IR || !scan_req->n_ssids || + (chan->flags & IEEE80211_CHAN_RADAR)) { *next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; local->next_scan_state = SCAN_DECISION; return; -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ath10k: Enable AP + STA interface combination support for 10.x
From: Mohammed Shafi ShajakhanEnable AP + STA interface combination support for 10.x and this enables Repeater mode testing (with WDS Repeater combinations as well). Fix indentation as well. Based on the suggestions from Michal and Yanbo Li, thanks to them Signed-off-by: Mohammed Shafi Shajakhan --- drivers/net/wireless/ath/ath10k/mac.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 79490ad..9652384 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6766,35 +6766,39 @@ void ath10k_mac_destroy(struct ath10k *ar) static const struct ieee80211_iface_limit ath10k_if_limits[] = { { - .max= 8, - .types = BIT(NL80211_IFTYPE_STATION) - | BIT(NL80211_IFTYPE_P2P_CLIENT) + .max= 8, + .types = BIT(NL80211_IFTYPE_STATION) + | BIT(NL80211_IFTYPE_P2P_CLIENT) }, { - .max= 3, - .types = BIT(NL80211_IFTYPE_P2P_GO) + .max= 3, + .types = BIT(NL80211_IFTYPE_P2P_GO) }, { - .max= 1, - .types = BIT(NL80211_IFTYPE_P2P_DEVICE) + .max= 1, + .types = BIT(NL80211_IFTYPE_P2P_DEVICE) }, { - .max= 7, - .types = BIT(NL80211_IFTYPE_AP) + .max= 7, + .types = BIT(NL80211_IFTYPE_AP) #ifdef CONFIG_MAC80211_MESH - | BIT(NL80211_IFTYPE_MESH_POINT) + | BIT(NL80211_IFTYPE_MESH_POINT) #endif }, }; static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = { { - .max= 8, - .types = BIT(NL80211_IFTYPE_AP) + .max= 8, + .types = BIT(NL80211_IFTYPE_AP) #ifdef CONFIG_MAC80211_MESH - | BIT(NL80211_IFTYPE_MESH_POINT) + | BIT(NL80211_IFTYPE_MESH_POINT) #endif }, + { + .max= 1, + .types = BIT(NL80211_IFTYPE_STATION) + }, }; static const struct ieee80211_iface_combination ath10k_if_comb[] = { -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] mac80211: do not actively scan DFS channels
Hi Antonio, [auto build test ERROR on: mac80211-next/master] [also build test ERROR on: v4.4-rc1 next-20151120] url: https://github.com/0day-ci/linux/commits/Antonio-Quartulli/mac80211-do-not-actively-scan-DFS-channels/20151121-181426 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: xtensa-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa All error/warnings (new ones prefixed by >>): In file included from include/linux/irqflags.h:14:0, from include/asm-generic/bitops/atomic.h:5, from arch/xtensa/include/asm/bitops.h:222, from include/linux/bitops.h:36, from include/linux/kernel.h:10, from include/linux/skbuff.h:17, from include/linux/if_arp.h:26, from net/mac80211/scan.c:16: net/mac80211/scan.c: In function 'ieee80211_scan_state_decision': >> net/mac80211/scan.c:703:6: error: too many arguments to function >> 'ieee80211_scan_get_channel_time' ieee80211_scan_get_channel_time(next_chan, ^ include/linux/typecheck.h:10:9: note: in definition of macro 'typecheck' typeof(x) __dummy2; \ ^ >> net/mac80211/scan.c:702:16: note: in expansion of macro 'time_after' bad_latency = time_after(jiffies + ^ net/mac80211/scan.c:643:1: note: declared here ieee80211_scan_get_channel_time(struct ieee80211_channel *chan) ^ In file included from include/linux/ktime.h:25:0, from include/linux/rcupdate.h:47, from include/linux/rbtree.h:34, from include/linux/mm_types.h:9, from include/linux/kmemcheck.h:4, from include/linux/skbuff.h:18, from include/linux/if_arp.h:26, from net/mac80211/scan.c:16: >> net/mac80211/scan.c:703:6: error: too many arguments to function >> 'ieee80211_scan_get_channel_time' ieee80211_scan_get_channel_time(next_chan, ^ include/linux/jiffies.h:105:18: note: in definition of macro 'time_after' ((long)((b) - (a)) < 0)) ^ net/mac80211/scan.c:643:1: note: declared here ieee80211_scan_get_channel_time(struct ieee80211_channel *chan) ^ vim +/ieee80211_scan_get_channel_time +703 net/mac80211/scan.c 696 * see if we can scan another channel without interfering 697 * with the current traffic situation. 698 * 699 * Keep good latency, do not stay off-channel more than 125 ms. 700 */ 701 > 702 bad_latency = time_after(jiffies + > 703 > ieee80211_scan_get_channel_time(next_chan, 704 scan_req), 705 local->leave_oper_channel_time + HZ / 8); 706 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH] mac80211: do not actively scan DFS channels
DFS channels should not be actively scanned as we can't be sure if we are allowed or not. If the current channel is in the DFS band, active scan might be performed after CSA, but we have no guarantee about other channels, therefore it is safer to prevent active scanning at all. Signed-off-by: Antonio Quartulli--- this patch was: "mac80211: passively scan DFS channels if requested" and has been changed after discussing with Johannes. net/mac80211/scan.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 4aeca4b..46a5da0 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -599,7 +599,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, if ((req->channels[0]->flags & IEEE80211_CHAN_NO_IR) || - !req->n_ssids) { + !req->n_ssids || + (req->channels[0]->flags & IEEE80211_CHAN_RADAR)) { next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; } else { ieee80211_scan_state_send_probe(local, _delay); @@ -639,13 +640,15 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, } static unsigned long -ieee80211_scan_get_channel_time(struct ieee80211_channel *chan) +ieee80211_scan_get_channel_time(struct ieee80211_channel *chan, + struct cfg80211_scan_request *scan_req) { /* * TODO: channel switching also consumes quite some time, * add that delay as well to get a better estimation */ - if (chan->flags & IEEE80211_CHAN_NO_IR) + if ((chan->flags & IEEE80211_CHAN_NO_IR) || + (chan->flags & IEEE80211_CHAN_RADAR)) return IEEE80211_PASSIVE_CHANNEL_TIME; return IEEE80211_PROBE_DELAY + IEEE80211_CHANNEL_TIME; } @@ -698,7 +701,8 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, */ bad_latency = time_after(jiffies + -ieee80211_scan_get_channel_time(next_chan), +ieee80211_scan_get_channel_time(next_chan, +scan_req), local->leave_oper_channel_time + HZ / 8); if (associated && !tx_empty) { @@ -777,7 +781,8 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, * * In any case, it is not necessary for a passive scan. */ - if (chan->flags & IEEE80211_CHAN_NO_IR || !scan_req->n_ssids) { + if (chan->flags & IEEE80211_CHAN_NO_IR || !scan_req->n_ssids || + (chan->flags & IEEE80211_CHAN_RADAR)) { *next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; local->next_scan_state = SCAN_DECISION; return; -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html