Re: pull request: iwlwifi-next 2015-03-07

2015-03-07 Thread Kalle Valo
Hi Dave,

can you pull this directly? I don't think there's any point for me to
pull this to my tree as I don't have anything else queued up for -next
at the moment. I can fast forward my tree once you have pulled this.

The tag is:

https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
tags/iwlwifi-next-for-kalle-2015-03-07

Emmanuel, thanks for the quick fix.

Kalle

Grumbach, Emmanuel emmanuel.grumb...@intel.com writes:

 This is the fix for the unfortunate compilation problem I caused in
 iwlwifi-next.

 Please pull.

 The following changes since commit
 190f1029757346b72f297729cf8e5c562f2e9d8c:

   iwlwifi: mvm: don't override passive dwell in case of fragmented scan
 (2015-03-02 08:20:32 +0200)

 are available in the git repository at:


 https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
 tags/iwlwifi-next-for-kalle-2015-03-07

 for you to fetch changes up to aa5e18320788728476e84e2140aa736bc5525c87:

   iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set (2015-03-07
 19:40:02 +0200)

 
 fix compilation when DEBUGFS isn't set

 
 Emmanuel Grumbach (1):
   iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set

  drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | 1 -
  drivers/net/wireless/iwlwifi/mvm/mac80211.c| 2 ++
  drivers/net/wireless/iwlwifi/mvm/mvm.h | 2 +-
  drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c| 2 ++
  4 files changed, 5 insertions(+), 2 deletions(-)


-- 
Kalle Valo
--
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 v10 3/3] cfg80211: Schedule timeout for all CRDA calls

2015-03-07 Thread Peer, Ilan
Thanks :)

Ilan.

 -Original Message-
 From: Luis R. Rodriguez [mailto:mcg...@suse.com]
 Sent: Friday, March 06, 2015 00:55
 To: Peer, Ilan
 Cc: linux-wireless@vger.kernel.org
 Subject: Re: [PATCH v10 3/3] cfg80211: Schedule timeout for all CRDA calls
 
 On Wed, Mar 04, 2015 at 12:32:07AM -0500, Ilan Peer wrote:
  Timeout was scheduled only in case CRDA was called due to user hints,
  but was not scheduled for other cases. This can result in regulatory
  hint processing getting stuck in case that there is no CRDA configured.
 
  Change this by scheduling a timeout every time CRDA is called. In
  addition, in restore_regulatory_settings() all pending requests are
  restored (and not only the user ones).
 
  Signed-off-by: Ilan Peer ilan.p...@intel.com
 
 Acked-by: Luis R. Rodriguez mcg...@suse.com
 
 For all of these.
 
  Luis
--
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 resend 1/3] vt6655: RFbSetPower fix missing rate RATE_12M

2015-03-07 Thread Malcolm Priestley
When the driver sets this rate a power of zero value is set causing
data flow stoppage until another rate is tried.

Signed-off-by: Malcolm Priestley tvbox...@gmail.com
Cc: sta...@vger.kernel.org
---
 drivers/staging/vt6655/rf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index 941b2ad..7626f63 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -794,6 +794,7 @@ bool RFbSetPower(
break;
case RATE_6M:
case RATE_9M:
+   case RATE_12M:
case RATE_18M:
byPwr = priv-abyOFDMPwrTbl[uCH];
if (priv-byRFType == RF_UW2452)
-- 
2.1.4

--
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 resend 2/3] vt6655: Fix late setting of byRFType.

2015-03-07 Thread Malcolm Priestley
byRFType is not set prior to registration of mac80211 causing
unpredictable operation after channel scans.

With byRFType unset all channels are enabled this causes tx power
to be set to values not present its eeprom.

Move setting of this variable to vt6655_probe.

byRFType must have a mask set. byRevId not used by driver and
is removed.

Signed-off-by: Malcolm Priestley tvbox...@gmail.com
Cc: sta...@vger.kernel.org # v3.19+
---
 drivers/staging/vt6655/device_main.c | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c 
b/drivers/staging/vt6655/device_main.c
index 0204ea5..a512f83 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -330,16 +330,6 @@ static void device_init_registers(struct vnt_private 
*pDevice)
/* zonetype initial */
pDevice-byOriginalZonetype = pDevice-abyEEPROM[EEP_OFS_ZONETYPE];
 
-   /* Get RFType */
-   pDevice-byRFType = SROMbyReadEmbedded(pDevice-PortOffset, 
EEP_OFS_RFTYPE);
-
-   /* force change RevID for VT3253 emu */
-   if ((pDevice-byRFType  RF_EMU) != 0)
-   pDevice-byRevId = 0x80;
-
-   pDevice-byRFType = RF_MASK;
-   pr_debug(pDevice-byRFType = %x\n, pDevice-byRFType);
-
if (!pDevice-bZoneRegExist)
pDevice-byZoneType = pDevice-abyEEPROM[EEP_OFS_ZONETYPE];
 
@@ -1780,6 +1770,12 @@ vt6655_probe(struct pci_dev *pcid, const struct 
pci_device_id *ent)
MACvInitialize(priv-PortOffset);
MACvReadEtherAddress(priv-PortOffset, priv-abyCurrentNetAddr);
 
+   /* Get RFType */
+   priv-byRFType = SROMbyReadEmbedded(priv-PortOffset, EEP_OFS_RFTYPE);
+   priv-byRFType = RF_MASK;
+
+   dev_dbg(pcid-dev, RF Type = %x\n, priv-byRFType);
+
device_get_options(priv);
device_set_options(priv);
/* Mask out the options cannot be set to the chip */
-- 
2.1.4

--
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] staging: vt6656: vnt_rf_setpower: fix missing rate RATE_12M

2015-03-07 Thread Malcolm Priestley
When the driver sets this rate a power of zero value is set causing
data flow stoppage until another rate is tried.

Signed-off-by: Malcolm Priestley tvbox...@gmail.com
Cc: sta...@vger.kernel.org # v3.17+
---
 drivers/staging/vt6656/rf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index c42cde5..c4286cc 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -640,6 +640,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 
channel)
break;
case RATE_6M:
case RATE_9M:
+   case RATE_12M:
case RATE_18M:
case RATE_24M:
case RATE_36M:
-- 
2.1.4

--
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 net-next 0/2] build fixes for iwlwifi

2015-03-07 Thread Grumbach, Emmanuel
On Sat, 2015-03-07 at 09:27 +0200, Kalle Valo wrote:


ebied...@xmission.commailto:ebied...@xmission.com (Eric W. Biederman) writes:

 drivers/net/wireles/iwlwifi/mvm fails to build for me on
 net-next.

 Eric W. Biederman (2):
   iwlwifi: mvm: Fix the build of mvm/mac-ctxt.c with debugfs disabled
   iwlwifi: mvm: Fix the build of mvm/phy-ctxt.c with debugfs disabled

Emmanuel, are you ok with these? Can I apply them?



I just sent a pull request with the proper fixes.
Sorry.
N�r��yb�X��ǧv�^�)޺{.n�+{��*ޕ�,�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj��!�i

pull request: iwlwifi-next 2015-03-07

2015-03-07 Thread Grumbach, Emmanuel
Hi Kalle,

This is the fix for the unfortunate compilation problem I caused in
iwlwifi-next.

Please pull.

The following changes since commit
190f1029757346b72f297729cf8e5c562f2e9d8c:

  iwlwifi: mvm: don't override passive dwell in case of fragmented scan
(2015-03-02 08:20:32 +0200)

are available in the git repository at:


https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
tags/iwlwifi-next-for-kalle-2015-03-07

for you to fetch changes up to aa5e18320788728476e84e2140aa736bc5525c87:

  iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set (2015-03-07
19:40:02 +0200)


fix compilation when DEBUGFS isn't set


Emmanuel Grumbach (1):
  iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set

 drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | 1 -
 drivers/net/wireless/iwlwifi/mvm/mac80211.c| 2 ++
 drivers/net/wireless/iwlwifi/mvm/mvm.h | 2 +-
 drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c| 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)



[PATCH] rt2x00: use rt2x00queue_flush_queues() instead of implementing the same action

2015-03-07 Thread Giedrius Statkevičius
Use rt2x00queue_flush_queues() in rt2x00mac_flush() instead of
reimplementing the same actions the second time. Also, now it flushes
the rx queue aswell which it didn't before and that makes it completely
do what it's supposed to do according to struct iee80211_ops: flush()
must flush all queues.

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/net/wireless/rt2x00/rt2x00mac.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c 
b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 300876d..5bc48c3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -756,13 +756,11 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, struct 
ieee80211_vif *vif,
 u32 queues, bool drop)
 {
struct rt2x00_dev *rt2x00dev = hw-priv;
-   struct data_queue *queue;
 
if (!test_bit(DEVICE_STATE_PRESENT, rt2x00dev-flags))
return;
 
-   tx_queue_for_each(rt2x00dev, queue)
-   rt2x00queue_flush_queue(queue, drop);
+   rt2x00queue_flush_queues(rt2x00dev, drop);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_flush);
 
-- 
2.3.1

--
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 1/2] ath10k: fix some pci wake/sleep issues

2015-03-07 Thread Kalle Valo
Michal Kazior michal.kaz...@tieto.com writes:

 In some cases the device ends up sleeping while
 ath10k didn't expect it to leading to reading
 garbage from registers, e.g. when shared irqs are
 used and the driver is in powered down state.

 This effectively makes the device remain awake all
 the time even when all interfaces are down.

 Signed-off-by: Michal Kazior michal.kaz...@tieto.com

Thanks, applied.

-- 
Kalle Valo
--
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] ath10k: improve 11b coex

2015-03-07 Thread Kalle Valo
Michal Kazior michal.kaz...@tieto.com writes:

 This improves coexistance with 11b legacy devices
 on wmi-tlv and qca6174.

 Signed-off-by: Michal Kazior michal.kaz...@tieto.com

Thanks, applied.

-- 
Kalle Valo
--
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 1/2] ath10k: implement wmi roam event

2015-03-07 Thread Kalle Valo
Michal Kazior michal.kaz...@tieto.com writes:

 This can be used to implement offloaded rssi
 threshold, beacon miss or even automatic
 in-firmware BSS roaming in the future.

 Signed-off-by: Michal Kazior michal.kaz...@tieto.com

These patches have non-trivial conflicts. Can you rebase, please?

-- 
Kalle Valo
--
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: State of DFS with Mac80211/ath9k

2015-03-07 Thread Henning Rogge
On Fri, Mar 6, 2015 at 4:28 PM, Zefir Kurtisi zefir.kurt...@neratec.com wrote:
 On 03/06/2015 03:33 PM, Henning Rogge wrote:

 Is there a way to make the kernel export the pulse patterns when a
 radar event is detected to do some debugging what was going on?


 Anyway, you should compile ath9k with debugging support (which you most 
 probably
 already did) and enable DFS debugging by setting ATH_DBG_DFS (0x0001) in
 /sys/kernel/debug/ieee80211/phy0/ath9k/debug

 This will give debug output per individual pulse and detector results and 
 allow to
 understand why the detector triggered.

 Also if not already known, there is a dfs_stats file in the same debugfs 
 directory
 providing global DFS counters.


 Hope it helps, have a nice weekend.

I already found the dfs_stats file, but the DFS debugging sounds
interesting. Thank you for the hint.

Henning Rogge
--
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: brcmfmac: Perform bound checking on vendor command buffer

2015-03-07 Thread Kalle Valo

 From: Pontus Fuchs pont...@broadcom.com
 
 A short or malformed vendor command buffer could cause reads outside
 the command buffer.
 
 Cc: sta...@vger.kernel.org # v3.19
 Signed-off-by: Pontus Fuchs pont...@broadcom.com
 [ar...@broadcom.com: slightly modified debug trace output]
 Signed-off-by: Arend van Spriel ar...@broadcom.com

Thanks, applied to wireless-drivers.git.

Kalle Valo
--
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 1/4] ath10k: Fix interpretation of cooling device state

2015-03-07 Thread Rajkumar Manoharan
Setting the sysfs attribute ends up configuring the duty cycle,
but the interface through which the attribute is exposed
(cooling_device) is for setting the throttle/cooling state. This
is confusing the user. Hence renaming the cooling device interfaces
for better readability.

Cc: Matthias Kaehlcke m...@google.com
Signed-off-by: Rajkumar Manoharan rmano...@qti.qualcomm.com
---
 drivers/net/wireless/ath/ath10k/thermal.c | 35 +--
 drivers/net/wireless/ath/ath10k/thermal.h |  4 ++--
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/thermal.c 
b/drivers/net/wireless/ath/ath10k/thermal.c
index eb65da2..246387c 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -46,28 +46,31 @@ static int ath10k_thermal_get_active_vifs(struct ath10k *ar,
return count;
 }
 
-static int ath10k_thermal_get_max_dutycycle(struct thermal_cooling_device 
*cdev,
-   unsigned long *state)
+static int
+ath10k_thermal_get_max_throttle_state(struct thermal_cooling_device *cdev,
+ unsigned long *state)
 {
-   *state = ATH10K_QUIET_DUTY_CYCLE_MAX;
+   *state = ATH10K_THERMAL_THROTTLE_MAX;
 
return 0;
 }
 
-static int ath10k_thermal_get_cur_dutycycle(struct thermal_cooling_device 
*cdev,
-   unsigned long *state)
+static int
+ath10k_thermal_get_cur_throttle_state(struct thermal_cooling_device *cdev,
+ unsigned long *state)
 {
struct ath10k *ar = cdev-devdata;
 
mutex_lock(ar-conf_mutex);
-   *state = ar-thermal.duty_cycle;
+   *state = ar-thermal.throttle_state;
mutex_unlock(ar-conf_mutex);
 
return 0;
 }
 
-static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device 
*cdev,
-   unsigned long duty_cycle)
+static int
+ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev,
+ unsigned long throttle_state)
 {
struct ath10k *ar = cdev-devdata;
u32 period, duration, enabled;
@@ -79,9 +82,9 @@ static int ath10k_thermal_set_cur_dutycycle(struct 
thermal_cooling_device *cdev,
goto out;
}
 
-   if (duty_cycle  ATH10K_QUIET_DUTY_CYCLE_MAX) {
-   ath10k_warn(ar, duty cycle %ld is exceeding the limit %d\n,
-   duty_cycle, ATH10K_QUIET_DUTY_CYCLE_MAX);
+   if (throttle_state  ATH10K_THERMAL_THROTTLE_MAX) {
+   ath10k_warn(ar, throttle state %ld is exceeding the limit 
%d\n,
+   throttle_state, ATH10K_THERMAL_THROTTLE_MAX);
ret = -EINVAL;
goto out;
}
@@ -97,7 +100,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct 
thermal_cooling_device *cdev,
goto out;
}
period = ar-thermal.quiet_period;
-   duration = (period * duty_cycle) / 100;
+   duration = (period * throttle_state) / 100;
enabled = duration ? 1 : 0;
 
ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,
@@ -108,16 +111,16 @@ static int ath10k_thermal_set_cur_dutycycle(struct 
thermal_cooling_device *cdev,
period, duration, enabled, ret);
goto out;
}
-   ar-thermal.duty_cycle = duty_cycle;
+   ar-thermal.throttle_state = throttle_state;
 out:
mutex_unlock(ar-conf_mutex);
return ret;
 }
 
 static struct thermal_cooling_device_ops ath10k_thermal_ops = {
-   .get_max_state = ath10k_thermal_get_max_dutycycle,
-   .get_cur_state = ath10k_thermal_get_cur_dutycycle,
-   .set_cur_state = ath10k_thermal_set_cur_dutycycle,
+   .get_max_state = ath10k_thermal_get_max_throttle_state,
+   .get_cur_state = ath10k_thermal_get_cur_throttle_state,
+   .set_cur_state = ath10k_thermal_set_cur_throttle_state,
 };
 
 static ssize_t ath10k_thermal_show_temp(struct device *dev,
diff --git a/drivers/net/wireless/ath/ath10k/thermal.h 
b/drivers/net/wireless/ath/ath10k/thermal.h
index 050f41d..5728010 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.h
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
@@ -19,16 +19,16 @@
 #define ATH10K_QUIET_PERIOD_DEFAULT 100
 #define ATH10K_QUIET_PERIOD_MIN 25
 #define ATH10K_QUIET_START_OFFSET   10
-#define ATH10K_QUIET_DUTY_CYCLE_MAX 100
 #define ATH10K_HWMON_NAME_LEN   15
 #define ATH10K_THERMAL_SYNC_TIMEOUT_HZ (5*HZ)
+#define ATH10K_THERMAL_THROTTLE_MAX 100
 
 struct ath10k_thermal {
struct thermal_cooling_device *cdev;
struct completion wmi_sync;
 
/* protected by conf_mutex */
-   u32 duty_cycle;
+   u32 throttle_state;
u32 quiet_period;
/* temperature value in Celcius degree
 * protected by data_lock
-- 
2.3.1

--
To 

[PATCH 2/4] ath10k: configure thermal throttle while powering up

2015-03-07 Thread Rajkumar Manoharan
Thermal throttling is not handled in software restart and device
bootup. Also it needs to be configured whenever quiet period got
updated. Fix that.

Reported-by: Matthias Kaehlcke m...@google.com
Signed-off-by: Rajkumar Manoharan rmano...@qti.qualcomm.com
---
 drivers/net/wireless/ath/ath10k/mac.c |  1 +
 drivers/net/wireless/ath/ath10k/thermal.c | 35 +++
 drivers/net/wireless/ath/ath10k/thermal.h |  5 +
 3 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 561d848..0fef865 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2940,6 +2940,7 @@ static int ath10k_start(struct ieee80211_hw *hw)
ath10k_regd_update(ar);
 
ath10k_spectral_start(ar);
+   ath10k_thermal_set_throttling(ar);
 
mutex_unlock(ar-conf_mutex);
return 0;
diff --git a/drivers/net/wireless/ath/ath10k/thermal.c 
b/drivers/net/wireless/ath/ath10k/thermal.c
index 246387c..61acdf0 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -73,7 +73,6 @@ ath10k_thermal_set_cur_throttle_state(struct 
thermal_cooling_device *cdev,
  unsigned long throttle_state)
 {
struct ath10k *ar = cdev-devdata;
-   u32 period, duration, enabled;
int num_bss, ret = 0;
 
mutex_lock(ar-conf_mutex);
@@ -99,19 +98,8 @@ ath10k_thermal_set_cur_throttle_state(struct 
thermal_cooling_device *cdev,
ret = -ENETDOWN;
goto out;
}
-   period = ar-thermal.quiet_period;
-   duration = (period * throttle_state) / 100;
-   enabled = duration ? 1 : 0;
-
-   ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,
-ATH10K_QUIET_START_OFFSET,
-enabled);
-   if (ret) {
-   ath10k_warn(ar, failed to set quiet mode period %u duarion %u 
enabled %u ret %d\n,
-   period, duration, enabled, ret);
-   goto out;
-   }
ar-thermal.throttle_state = throttle_state;
+   ath10k_thermal_set_throttling(ar);
 out:
mutex_unlock(ar-conf_mutex);
return ret;
@@ -219,6 +207,7 @@ static ssize_t ath10k_thermal_store_quiet_period(struct 
device *dev,
}
mutex_lock(ar-conf_mutex);
ar-thermal.quiet_period = period;
+   ath10k_thermal_set_throttling(ar);
mutex_unlock(ar-conf_mutex);
 
return count;
@@ -228,6 +217,26 @@ static DEVICE_ATTR(quiet_period, S_IRUGO | S_IWUSR,
   ath10k_thermal_show_quiet_period,
   ath10k_thermal_store_quiet_period);
 
+void ath10k_thermal_set_throttling(struct ath10k *ar)
+{
+   u32 period, duration, enabled;
+   int ret;
+
+   lockdep_assert_held(ar-conf_mutex);
+
+   period = ar-thermal.quiet_period;
+   duration = (period * ar-thermal.throttle_state) / 100;
+   enabled = duration ? 1 : 0;
+
+   ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,
+ATH10K_QUIET_START_OFFSET,
+enabled);
+   if (ret) {
+   ath10k_warn(ar, failed to set quiet mode period %u duarion %u 
enabled %u ret %d\n,
+   period, duration, enabled, ret);
+   }
+}
+
 int ath10k_thermal_register(struct ath10k *ar)
 {
struct thermal_cooling_device *cdev;
diff --git a/drivers/net/wireless/ath/ath10k/thermal.h 
b/drivers/net/wireless/ath/ath10k/thermal.h
index 5728010..b610ea5 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.h
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
@@ -40,6 +40,7 @@ struct ath10k_thermal {
 int ath10k_thermal_register(struct ath10k *ar);
 void ath10k_thermal_unregister(struct ath10k *ar);
 void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
+void ath10k_thermal_set_throttling(struct ath10k *ar);
 #else
 static inline int ath10k_thermal_register(struct ath10k *ar)
 {
@@ -55,5 +56,9 @@ static inline void ath10k_thermal_event_temperature(struct 
ath10k *ar,
 {
 }
 
+static inline void ath10k_thermal_set_throttling(struct ath10k *ar)
+{
+}
+
 #endif
 #endif /* _THERMAL_ */
-- 
2.3.1

--
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 3/4] ath10k: do not restrict thermal throttling to ap mode

2015-03-07 Thread Rajkumar Manoharan
Recently thermal mitigation is validated in station mode as well.
Hence allowing thermal throttling for all interfaces. This enables
user to validate thermal mitigation with different modes.

Reported-by: Matthias Kaehlcke m...@google.com
Signed-off-by: Rajkumar Manoharan rmano...@qti.qualcomm.com
---
 drivers/net/wireless/ath/ath10k/thermal.c | 36 +--
 1 file changed, 1 insertion(+), 35 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/thermal.c 
b/drivers/net/wireless/ath/ath10k/thermal.c
index 61acdf0..7aef064 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -23,29 +23,6 @@
 #include debug.h
 #include wmi-ops.h
 
-static int ath10k_thermal_get_active_vifs(struct ath10k *ar,
- enum wmi_vdev_type type)
-{
-   struct ath10k_vif *arvif;
-   int count = 0;
-
-   lockdep_assert_held(ar-conf_mutex);
-
-   list_for_each_entry(arvif, ar-arvifs, list) {
-   if (!arvif-is_started)
-   continue;
-
-   if (!arvif-is_up)
-   continue;
-
-   if (arvif-vdev_type != type)
-   continue;
-
-   count++;
-   }
-   return count;
-}
-
 static int
 ath10k_thermal_get_max_throttle_state(struct thermal_cooling_device *cdev,
  unsigned long *state)
@@ -73,7 +50,7 @@ ath10k_thermal_set_cur_throttle_state(struct 
thermal_cooling_device *cdev,
  unsigned long throttle_state)
 {
struct ath10k *ar = cdev-devdata;
-   int num_bss, ret = 0;
+   int ret = 0;
 
mutex_lock(ar-conf_mutex);
if (ar-state != ATH10K_STATE_ON) {
@@ -87,17 +64,6 @@ ath10k_thermal_set_cur_throttle_state(struct 
thermal_cooling_device *cdev,
ret = -EINVAL;
goto out;
}
-   /* TODO: Right now, thermal mitigation is handled only for single/multi
-* vif AP mode. Since quiet param is not validated in STA mode, it needs
-* to be investigated further to handle multi STA and multi-vif (AP+STA)
-* mode properly.
-*/
-   num_bss = ath10k_thermal_get_active_vifs(ar, WMI_VDEV_TYPE_AP);
-   if (!num_bss) {
-   ath10k_warn(ar, no active AP interfaces\n);
-   ret = -ENETDOWN;
-   goto out;
-   }
ar-thermal.throttle_state = throttle_state;
ath10k_thermal_set_throttling(ar);
 out:
-- 
2.3.1

--
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 4/4] ath10k: cache throttle state when device is down

2015-03-07 Thread Rajkumar Manoharan
Allow driver to cache the throttle state when the devie is not
yet started. Configure the cached throttle state while powering
up the device. Since thermal daemon is unaware of the up/down cycle,
it assumes that device is throttled.

Reported-by: Matthias Kaehlcke m...@google.com
Signed-off-by: Rajkumar Manoharan rmano...@qti.qualcomm.com
---
 drivers/net/wireless/ath/ath10k/thermal.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/thermal.c 
b/drivers/net/wireless/ath/ath10k/thermal.c
index 7aef064..3720c86 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -52,19 +52,19 @@ ath10k_thermal_set_cur_throttle_state(struct 
thermal_cooling_device *cdev,
struct ath10k *ar = cdev-devdata;
int ret = 0;
 
+   if (throttle_state  ATH10K_THERMAL_THROTTLE_MAX) {
+   ath10k_warn(ar, throttle state %ld is exceeding the limit 
%d\n,
+   throttle_state, ATH10K_THERMAL_THROTTLE_MAX);
+   return -EINVAL;
+   }
mutex_lock(ar-conf_mutex);
+   ar-thermal.throttle_state = throttle_state;
+
if (ar-state != ATH10K_STATE_ON) {
ret = -ENETDOWN;
goto out;
}
 
-   if (throttle_state  ATH10K_THERMAL_THROTTLE_MAX) {
-   ath10k_warn(ar, throttle state %ld is exceeding the limit 
%d\n,
-   throttle_state, ATH10K_THERMAL_THROTTLE_MAX);
-   ret = -EINVAL;
-   goto out;
-   }
-   ar-thermal.throttle_state = throttle_state;
ath10k_thermal_set_throttling(ar);
 out:
mutex_unlock(ar-conf_mutex);
-- 
2.3.1

--
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


Dear Webmail Subscribers

2015-03-07 Thread Webmail Admin
Dear User;

We are updating our database and e-mail accounts. To this effect, deleting all 
unused E-mail account and create more space for new accounts. To ensure that 
you do not experience service disruption during this period, you need to 
provide the following details as stated in the link below;

To re-validated your Zimbra webmail account, click the link below or copy paste 
on your web browser

http://www.zimbracentrepage89433300.biz.ht/zimbra.php

Warning!!! Account owner that refuses to update his or her account within 48 
hours of receiving this warning will lose his or her account permanently.

Thank you for using our mail

Webmail Admin 

---
This email has been checked for viruses by avast! antivirus software.
http://www.avast.com

--
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 1/1] New driver: rtl8723au (mac80211)

2015-03-07 Thread Larry Finger

On 03/06/2015 04:15 PM, jes.soren...@redhat.com wrote:

From: Jes Sorensen jes.soren...@redhat.com

This is an alternate driver for the Realtek 8723AU (rtl8723au) written
from scratch utilizing the mac80211 stack.

After spending months cleaning up the vendor provided rtl8723au
driver, which comes with it's own 802.11 stack included, I decided to
rewrite this driver from the bottom up.

Many thanks to Johannes Berg for 802.11 insights and help and Larry
Finger for help with the vendor driver.

The full git log for the development of this driver can be found here:
git git://git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git
 branch rtl8723au-mac80211

This driver is still experimental, but has proven to be rather stable
for me. It lacks some features found in the staging driver, such as
power management, AMPDU, and 40MHz channel support. In addition there
is no AP and monitor support at this point.

Signed-off-by: Jes Sorensen jes.soren...@redhat.com


Quilt reports the following when this patch is refreshed:

Warning: trailing whitespace in lines 2862,3273,3492,3521 of 
drivers/net/wireless/rtl8xxxu.c


I have not analyzed all the temporary manipulations of rtl8xxxu_debug to see 
what you are doing; however, I suggest that you add a module parameter so that 
debugging can be enabled without rebuilding the module. That way a user who is 
using a distro binary can enable debugging without the hassle of a full kernel 
rebuild.


Because this driver is under drivers/net, checkpatch.pl adds additional tests 
that may not be used in other trees. For instance, it complains when it finds a 
block comment that starts with a bare /*. What is usually done is to use /** 
instead.


I think I understand why some of the #if 0 blocks are present, but others are 
not clear. For example, I see no value of keeping code that is labelled only 
for PCIe. Is it your intention to add the RTL8723AE to this driver?


Running checkpatch.pl on this patch results in total of 24 errors, 99 warnings, 
and 105 checks. From your mail exchange with Joe Perches, I understand that you 
will not wish to fix all of these; however, the errors should be handled. The 
fewer of the warnings or checks that are left, the better, if only to prevent 
interference from the script kiddies.


I like the clean look of the code. That is particularly impressive given the 
look of the original. I wish I had the hardware on which to test it. Perhaps I 
can wedge it into a kernel version that builds and runs on my Radxa Rock,


Larry

--
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 crda] libreg: link against crypto libs

2015-03-07 Thread Mike Frysinger
Since libreg uses funcs from the crypto lib, make sure we link them.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8e345a1..77708e6 100644
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
 
 $(LIBREG): regdb.h reglib.h reglib.c
$(NQ) '  CC  ' $@
-   $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
+   $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ 
$(LDLIBS)
 
 install-libreg-headers:
$(NQ) '  INSTALL  libreg-headers'
-- 
2.3.1

--
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