Re: [RFC] rfkill: Add new ACPI device for Realtek serial BT

2016-07-15 Thread Marcel Holtmann
Hi Larry,

> The Realtek RTL8723BS chips, which are connected via SDIO, also contain
> a serial Bluetooth device. In order for BT to work, the device must be
> added to the acpi_device_id table.
> 
> Signed-off-by: Larry Finger 
> ---
> 
> I have no idea if this device should be added here, or if the device could
> be added to some structure supplied at device startup. If anyone has any
> suggestions, please let me know.

it should not be added here. Since most likely more is needed. For example 
within the hci_bcm.c and hci_intel.c drivers we handle the GPIO when attaching 
the UART to the Bluetooth subsystem. This means at minimum some sort of 
hci_rtl.c is needed. Can be for the beginning just an enhanced hci_h4.c.

Regards

Marcel

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


[RFC] rfkill: Add new ACPI device for Realtek serial BT

2016-07-15 Thread Larry Finger
The Realtek RTL8723BS chips, which are connected via SDIO, also contain
a serial Bluetooth device. In order for BT to work, the device must be
added to the acpi_device_id table.

Signed-off-by: Larry Finger 
---

I have no idea if this device should be added here, or if the device could
be added to some structure supplied at device startup. If anyone has any
suggestions, please let me know.

Thanks,

Larry
---
 net/rfkill/rfkill-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index 76c01cb..50ca65e 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -163,6 +163,7 @@ static int rfkill_gpio_remove(struct platform_device *pdev)
 static const struct acpi_device_id rfkill_acpi_match[] = {
{ "BCM4752", RFKILL_TYPE_GPS },
{ "LNV4752", RFKILL_TYPE_GPS },
+   { "OBDA8723", RFKILL_TYPE_BLUETOOTH },
{ },
 };
 MODULE_DEVICE_TABLE(acpi, rfkill_acpi_match);
-- 
2.6.6

--
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 4/4 v2 iface_work] Function renaming

2016-07-15 Thread kbuild test robot
Hi,

[auto build test WARNING on mac80211/master]
[also build test WARNING on v4.7-rc7]
[cannot apply to mac80211-next/master next-20160715]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Alex-Briskin/New-function-ieee80211_is_skb_handled_by_pkt_type/20160715-195540
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git 
master
config: x86_64-randconfig-i0-201628 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   net/mac80211/iface.c:1249:11: warning: 'struct ieee80211_sub_if_datai' 
declared inside parameter list will not be visible outside of this definition 
or declaration
   struct ieee80211_sub_if_datai *sdata)
  ^~
   net/mac80211/iface.c: In function 'mac80211_is_skb_handled_by_frame_control':
   net/mac80211/iface.c:1251:39: error: dereferencing pointer to incomplete 
type 'struct ieee80211_sub_if_datai'
 struct ieee80211_local *local = sdata->local;
  ^~
   net/mac80211/iface.c:1260:26: error: passing argument 1 of 
'sta_info_get_bss' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  sta = sta_info_get_bss(sdata, mgmt->sa);
 ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
 ^~~~
   net/mac80211/iface.c:1272:29: error: passing argument 1 of 
'ieee80211_process_delba' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
ieee80211_process_delba(sdata, sta, mgmt, len);
^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1700:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
 ^~~
   net/mac80211/iface.c:1284:32: error: passing argument 1 of 
'ieee80211_process_mu_groups' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   ieee80211_process_mu_groups(sdata, mgmt);
   ^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1737:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
 ^~~
   net/mac80211/iface.c:1309:26: error: passing argument 1 of 
'sta_info_get_bss' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  sta = sta_info_get_bss(sdata, mgmt->sa);
 ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
 ^~~~
   In file included from include/asm-generic/bug.h:4:0,
from arch/x86/include/asm/bug.h:35,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from net/mac80211/iface.c:14:
   net/mac80211/iface.c: In function 'ieee80211_iface_work':
   net/mac80211/iface.c:1366:54: error: passing argument 2 of 
'mac80211_is_skb_handled_by_frame_control' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  !mac80211_is_skb_handled_by_frame_control(skb, sdata)) {
 ^
   include/linux/compiler.h:151:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> net/mac80211/iface.c:1365:3: note: in expansion of macro 'if'
  if (!mac80211_is_skb_handled_by_pkt_type(skb, sdata) &&
  ^~
   net/mac80211/iface.c:1248:13: note: expected 'struct ieee80211_sub_if_datai 
*' but argument is of type 'struct ieee80211_sub_if_data *'
static bool mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
^~~~
   In file included from include/asm-generic/bug.h:4:0,
from arch/x86/include/asm/bug.h:35,
   

[PATCH 1/2] mwifiex: fix PCIe legacy interrupt problem

2016-07-15 Thread Amitkumar Karwar
In corner case, we may end up processing same interrupt twice.
We have a logic to read pending interrupts at the end of interrupt
processing routine. It has a race with interrupts read in interrupt
handler. This patch solves the problem by ORing the interrupt bitmap
in this case.

The symptom for this bug is below messages in dmesg log.

[   11.522123] mwifiex_pcie :01:00.0: CMD_RESP: invalid cmd resp
[   11.680412] mwifiex_pcie :01:00.0: There is no command but got cmdrsp

Link: https://bugzilla.kernel.org/show_bug.cgi?id=109681
Signed-off-by: Amitkumar Karwar 
Signed-off-by: Cathy Luo 
---
 drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c 
b/drivers/net/wireless/marvell/mwifiex/pcie.c
index d61d4ad..38bd62e 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -2300,6 +2300,12 @@ static int mwifiex_process_pcie_int(struct 
mwifiex_adapter *adapter)
}
 
}
+   if (!card->msi_enable) {
+   spin_lock_irqsave(>int_lock, flags);
+   pcie_ireg |= adapter->int_status;
+   adapter->int_status = 0;
+   spin_unlock_irqrestore(>int_lock, flags);
+   }
}
mwifiex_dbg(adapter, INTR,
"info: cmd_sent=%d data_sent=%d\n",
-- 
1.9.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 2/2] mwifiex: update command response skb length correctly

2016-07-15 Thread Amitkumar Karwar
Same skb is being reused for storing command response from firmware
in PCIe chipsets. There was a bug while updating the skb length.
This patch ensures skb length correctly gets updated based on rx_len.

Signed-off-by: Amitkumar Karwar 
---
 drivers/net/wireless/marvell/mwifiex/pcie.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c 
b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 38bd62e..a6af85d 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -1616,6 +1616,7 @@ static int mwifiex_pcie_process_cmd_complete(struct 
mwifiex_adapter *adapter)
 
pkt_len = *((__le16 *)skb->data);
rx_len = le16_to_cpu(pkt_len);
+   skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
skb_trim(skb, rx_len);
skb_pull(skb, INTF_HEADER_LEN);
 
-- 
1.9.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 4/4 v2 iface_work] Function renaming

2016-07-15 Thread kbuild test robot
Hi,

[auto build test WARNING on mac80211/master]
[also build test WARNING on v4.7-rc7]
[cannot apply to mac80211-next/master next-20160715]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Alex-Briskin/New-function-ieee80211_is_skb_handled_by_pkt_type/20160715-195540
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git 
master
config: i386-randconfig-s1-201628 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

>> net/mac80211/iface.c:1249:11: warning: 'struct ieee80211_sub_if_datai' 
>> declared inside parameter list will not be visible outside of this 
>> definition or declaration
   struct ieee80211_sub_if_datai *sdata)
  ^~
   net/mac80211/iface.c: In function 'mac80211_is_skb_handled_by_frame_control':
   net/mac80211/iface.c:1251:39: error: dereferencing pointer to incomplete 
type 'struct ieee80211_sub_if_datai'
 struct ieee80211_local *local = sdata->local;
  ^~
   net/mac80211/iface.c:1260:26: error: passing argument 1 of 
'sta_info_get_bss' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  sta = sta_info_get_bss(sdata, mgmt->sa);
 ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
 ^~~~
   net/mac80211/iface.c:1272:29: error: passing argument 1 of 
'ieee80211_process_delba' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
ieee80211_process_delba(sdata, sta, mgmt, len);
^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1700:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
 ^~~
   net/mac80211/iface.c:1284:32: error: passing argument 1 of 
'ieee80211_process_mu_groups' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   ieee80211_process_mu_groups(sdata, mgmt);
   ^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1737:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
 ^~~
   net/mac80211/iface.c:1309:26: error: passing argument 1 of 
'sta_info_get_bss' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  sta = sta_info_get_bss(sdata, mgmt->sa);
 ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
 ^~~~
   net/mac80211/iface.c: In function 'ieee80211_iface_work':
   net/mac80211/iface.c:1366:54: error: passing argument 2 of 
'mac80211_is_skb_handled_by_frame_control' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  !mac80211_is_skb_handled_by_frame_control(skb, sdata)) {
 ^
   net/mac80211/iface.c:1248:13: note: expected 'struct ieee80211_sub_if_datai 
*' but argument is of type 'struct ieee80211_sub_if_data *'
static bool mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
^~~~
   cc1: some warnings being treated as errors

vim +1249 net/mac80211/iface.c

  1233  sta = sta_info_get_bss(sdata, rx_agg->addr);
  1234  if (sta)
  1235  __ieee80211_stop_rx_ba_session(sta,
  1236 rx_agg->tid,
  1237 
WLAN_BACK_RECIPIENT, 0,
  1238 false);
  1239  mutex_unlock(>sta_mtx);
  1240  break;
  1241  default:
  1242  return false;
  1243  }
  1244  /*will return true if pkt_type found and handled */
  1245  return tr

Re: [PATCH 4/4 v2 iface_work] Function renaming

2016-07-15 Thread kbuild test robot
Hi,

[auto build test ERROR on mac80211/master]
[also build test ERROR on v4.7-rc7]
[cannot apply to mac80211-next/master next-20160715]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Alex-Briskin/New-function-ieee80211_is_skb_handled_by_pkt_type/20160715-195540
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git 
master
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
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=alpha 

All error/warnings (new ones prefixed by >>):

>> net/mac80211/iface.c:1249:11: warning: 'struct ieee80211_sub_if_datai' 
>> declared inside parameter list
   struct ieee80211_sub_if_datai *sdata)
  ^
>> net/mac80211/iface.c:1249:11: warning: its scope is only this definition or 
>> declaration, which is probably not what you want
   net/mac80211/iface.c: In function 'mac80211_is_skb_handled_by_frame_control':
>> net/mac80211/iface.c:1251:39: error: dereferencing pointer to incomplete 
>> type 'struct ieee80211_sub_if_datai'
 struct ieee80211_local *local = sdata->local;
  ^
>> net/mac80211/iface.c:1260:26: error: passing argument 1 of 
>> 'sta_info_get_bss' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
  sta = sta_info_get_bss(sdata, mgmt->sa);
 ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
 ^
>> net/mac80211/iface.c:1272:29: error: passing argument 1 of 
>> 'ieee80211_process_delba' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
ieee80211_process_delba(sdata, sta, mgmt, len);
^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1700:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
 ^
>> net/mac80211/iface.c:1284:32: error: passing argument 1 of 
>> 'ieee80211_process_mu_groups' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
   ieee80211_process_mu_groups(sdata, mgmt);
   ^
   In file included from net/mac80211/iface.c:21:0:
   net/mac80211/ieee80211_i.h:1737:6: note: expected 'struct 
ieee80211_sub_if_data *' but argument is of type 'struct ieee80211_sub_if_datai 
*'
void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
 ^
   net/mac80211/iface.c:1309:26: error: passing argument 1 of 
'sta_info_get_bss' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  sta = sta_info_get_bss(sdata, mgmt->sa);
 ^
   In file included from net/mac80211/ieee80211_i.h:34:0,
from net/mac80211/iface.c:21:
   net/mac80211/sta_info.h:644:18: note: expected 'struct ieee80211_sub_if_data 
*' but argument is of type 'struct ieee80211_sub_if_datai *'
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
 ^
   net/mac80211/iface.c: In function 'ieee80211_iface_work':
>> net/mac80211/iface.c:1366:54: error: passing argument 2 of 
>> 'mac80211_is_skb_handled_by_frame_control' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
  !mac80211_is_skb_handled_by_frame_control(skb, sdata)) {
 ^
   net/mac80211/iface.c:1248:13: note: expected 'struct ieee80211_sub_if_datai 
*' but argument is of type 'struct ieee80211_sub_if_data *'
static bool mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
^
   cc1: some warnings being treated as errors

vim +1251 net/mac80211/iface.c

4ea9593c0 Alex Briskin  2016-07-15  1243}
4ea9593c0 Alex Briskin  2016-07-15  1244/*will return true if pkt_type 
found and handled */
4ea9593c0 Alex Briskin  2016-07-15  1245return true;
4ea9593c0 Alex Briskin  2016-07-15  1246  }
4ea9593c0 Alex Briskin  2016-07-15  1247  
9ea4267a9 Alex Briskin  2016-07-15  1248  static bool 
mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
9ea4267a9 Alex Briskin  2016-07-15 @1249struct 
ieee80

[PATCH] NFC: null-ify info->ram_patch when firmware is released

2016-07-15 Thread Colin King
From: Colin Ian King 

When the firmware is released for info->ram_patch currently
info->otp_patch is being nullified and not info->ram_patch.
This looks like a cut-n-paste coding error. Fix this by
nullifing the correct field.

Signed-off-by: Colin Ian King 
---
 drivers/nfc/fdp/fdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c
index e44a7a2..d93d314 100644
--- a/drivers/nfc/fdp/fdp.c
+++ b/drivers/nfc/fdp/fdp.c
@@ -345,7 +345,7 @@ static void fdp_nci_release_firmware(struct nci_dev *ndev)
 
if (info->ram_patch) {
release_firmware(info->ram_patch);
-   info->otp_patch = NULL;
+   info->ram_patch = NULL;
}
 }
 
-- 
2.8.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] mwifiex: Fix request_irq() failure handling

2016-07-15 Thread Amitkumar Karwar
From: Karthik D A 

It's been observed that request_irq() failure leads to a system crash
due to a bug in mwifiex driver.
When this failure happens, mwifiex_add_card() already takes care of
clearing and freeing adapter->card pointer. This patch removes the
redundant cleanup code causing crash.

Signed-off-by: Karthik D A 
Signed-off-by: Amitkumar Karwar 
---
 drivers/net/wireless/marvell/mwifiex/pcie.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c 
b/drivers/net/wireless/marvell/mwifiex/pcie.c
index e54a98a..d61d4ad 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -202,7 +202,6 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
if (mwifiex_add_card(card, _remove_card_sem, _ops,
 MWIFIEX_PCIE)) {
pr_err("%s failed\n", __func__);
-   kfree(card);
return -1;
}
 
@@ -2843,7 +2842,6 @@ static int mwifiex_pcie_request_irq(struct 
mwifiex_adapter *adapter)
  "MRVL_PCIE", >share_irq_ctx);
if (ret) {
pr_err("request_irq failed: ret=%d\n", ret);
-   adapter->card = NULL;
return -1;
}
 
-- 
1.9.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 RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-15 Thread Prarit Bhargava


On 07/15/2016 07:25 AM, Stanislaw Gruszka wrote:
> On Thu, Jul 14, 2016 at 09:44:22AM +, Grumbach, Emmanuel wrote:
>>> If I understad correctly this error happen 100% of the time, not only during
>>> init. Hence seems there is an issue here, i.e. cur_ucode is not marked
>>> correctly as IWL_UCODE_REGULAR or iwl_mvm_get_temp() fail 100% of the
>>> time (iwl_mvm_is_tt_in_fw() incorrecly return true on Prarit device ? ).
>>
>> Cur_ucode will not be IWL_UCODE_REGULAR until you load the firmware which
>> will happen upon ifup.
> 
> Then creating thermal_device on ifup looks more reasonable to me.
> Otherwise we can create device that can be non-functional virtually
> forever, i.e. when soft RFKILL is enabled. However I admit that
> creating thermal_device when HW is detected has some advantages
> too.

That's my plan right now.  Unfortunately something else in the kernel seems
recently broken and is preventing me from testing.  I will get back to this
early next week.

P.
> 
> Stanislaw
> 
--
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 RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-15 Thread Stanislaw Gruszka
On Thu, Jul 14, 2016 at 09:44:22AM +, Grumbach, Emmanuel wrote:
> > If I understad correctly this error happen 100% of the time, not only during
> > init. Hence seems there is an issue here, i.e. cur_ucode is not marked
> > correctly as IWL_UCODE_REGULAR or iwl_mvm_get_temp() fail 100% of the
> > time (iwl_mvm_is_tt_in_fw() incorrecly return true on Prarit device ? ).
> 
> Cur_ucode will not be IWL_UCODE_REGULAR until you load the firmware which
> will happen upon ifup.

Then creating thermal_device on ifup looks more reasonable to me.
Otherwise we can create device that can be non-functional virtually
forever, i.e. when soft RFKILL is enabled. However I admit that
creating thermal_device when HW is detected has some advantages
too.

Stanislaw
--
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] brcmfmac: defer DPC processing during probe

2016-07-15 Thread Arend van Spriel
The sdio dpc starts processing when in SDIOD_STATE_DATA. This state was
entered right after firmware download. This patch moves that transition
just before enabling sdio interrupt handling thus avoiding watchdog
expiry which would put the bus to sleep while probing.

Reviewed-by: Hante Meuleman 
Reviewed-by: Pieter-Paul Giesberts 
Reviewed-by: Franky Lin 
Signed-off-by: Arend van Spriel 
---
Hi Kalle,

Here a straggler commit for wireless-drivers-next. No harm if it does
not make it in v4.8.

Regards,
Arend
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 5fb8b91..68ab3ac 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -3305,10 +3305,6 @@ static int brcmf_sdio_download_firmware(struct 
brcmf_sdio *bus,
goto err;
}
 
-   /* Allow full data communication using DPC from now on. */
-   brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA);
-   bcmerror = 0;
-
 err:
brcmf_sdio_clkctl(bus, CLK_SDONLY, false);
sdio_release_host(bus->sdiodev->func[1]);
@@ -4046,6 +4042,9 @@ static void brcmf_sdio_firmware_callback(struct device 
*dev,
}
 
if (err == 0) {
+   /* Allow full data communication using DPC from now on. */
+   brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA);
+
err = brcmf_sdiod_intr_register(sdiodev);
if (err != 0)
brcmf_err("intr register failed:%d\n", err);
-- 
1.9.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] brcmfmac: restore stopping netdev queue when bus clogs up

2016-07-15 Thread Arend van Spriel
When the host-interface bus has hard time handling transmit packets
it informs higher layer about this and it would stop the netdev
queue when needed. However, since commit 9cd18359d31e ("brcmfmac:
Make FWS queueing configurable.") this was broken. With this patch
the behaviour is restored.

Cc: sta...@vger.kernel.org # v4.5, v4.6, v4.7
Fixes: 9cd18359d31e ("brcmfmac: Make FWS queueing configurable.")
Tested-by: Per Förlin 
Reviewed-by: Hante Meuleman 
Reviewed-by: Pieter-Paul Giesberts 
Reviewed-by: Franky Lin 
Signed-off-by: Arend van Spriel 
---
Hi Kalle,

The issue fixed with this patch does not crash anything so it is
probably fine for 4.8 after the merge window. So I have marked it
for 4.7-stable.

Regards,
Arend
---
 .../broadcom/brcm80211/brcmfmac/fwsignal.c | 22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
index 5b30922..2ce3199 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
@@ -2469,10 +2469,22 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, 
struct sk_buff *skb)
 void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked)
 {
struct brcmf_fws_info *fws = drvr->fws;
+   struct brcmf_if *ifp;
+   int i;
 
-   fws->bus_flow_blocked = flow_blocked;
-   if (!flow_blocked)
-   brcmf_fws_schedule_deq(fws);
-   else
-   fws->stats.bus_flow_block++;
+   if (fws->avoid_queueing) {
+   for (i = 0; i < BRCMF_MAX_IFS; i++) {
+   ifp = drvr->iflist[i];
+   if (!ifp || !ifp->ndev)
+   continue;
+   brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_FLOW,
+flow_blocked);
+   }
+   } else {
+   fws->bus_flow_blocked = flow_blocked;
+   if (!flow_blocked)
+   brcmf_fws_schedule_deq(fws);
+   else
+   fws->stats.bus_flow_block++;
+   }
 }
-- 
1.9.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 1/4 v2 iface_work] New function ieee80211_is_skb_handled_by_pkt_type

2016-07-15 Thread Arend Van Spriel
On 15-7-2016 11:06, Alex Briskin wrote:
> Split ieee80211_iface_work in two. Moved part of a code that checks
> pkt_type.

As mentioned before the subject of the patches should use "mac80211: "
prefix. So:

[PATCH 1/4 v2] mac80211: New function ieee80211_is_skb_handled_by_pkt_type

So I did not mean you should rename function from ieee80211_... to
mac80211_...

Another thing is that a lot of people skim the repository using 'git log
--oneline' to find a commit (unless they use git blame first) so it
would be great to have the subject line summarize the patch intent in a
meaningful manner. Using generic terms like "Further improve radability"
does not really help.

My comment from the initial patch series on the function names is that
it would be better to be consistent and reflect it is used in iface_work
context, eg. ieee80211_iface_Work_handle_pkt_type,
ieee80211_iface_Work_handle_frame_control, and
ieee80211_iface_Work_handle_vif_type.

Regards,
Arend

> Signed-off-by: Alex Briskin 
> ---
>  net/mac80211/iface.c | 75 
> +++-
>  1 file changed, 45 insertions(+), 30 deletions(-)
> 
> diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
> index c59af3e..a68cbac 100644
> --- a/net/mac80211/iface.c
> +++ b/net/mac80211/iface.c
> @@ -1198,6 +1198,48 @@ static void ieee80211_if_setup(struct net_device *dev)
>   dev->destructor = ieee80211_if_free;
>  }
>  
> +static bool ieee80211_is_skb_handled_by_pkt_type(struct sk_buff *skb,
> +  struct ieee80211_sub_if_data
> +  *sdata)
> +{
> + struct ieee80211_ra_tid *ra_tid;
> + struct ieee80211_rx_agg *rx_agg;
> + struct ieee80211_local *local = sdata->local;
> + struct sta_info *sta;
> +
> + if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) {
> + ra_tid = (void *)>cb;
> + ieee80211_start_tx_ba_cb(>vif, ra_tid->ra, ra_tid->tid);
> + } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) {
> + ra_tid = (void *)>cb;
> + ieee80211_stop_tx_ba_cb(>vif, ra_tid->ra, ra_tid->tid);
> + } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_START) {
> + rx_agg = (void *)>cb;
> + mutex_lock(>sta_mtx);
> + sta = sta_info_get_bss(sdata, rx_agg->addr);
> + if (sta)
> + __ieee80211_start_rx_ba_session(sta,
> + 0, 0, 0, 1, rx_agg->tid,
> + IEEE80211_MAX_AMPDU_BUF,
> + false, true);
> + mutex_unlock(>sta_mtx);
> + } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_STOP) {
> + rx_agg = (void *)>cb;
> + mutex_lock(>sta_mtx);
> + sta = sta_info_get_bss(sdata, rx_agg->addr);
> + if (sta)
> + __ieee80211_stop_rx_ba_session(sta,
> +rx_agg->tid,
> +WLAN_BACK_RECIPIENT, 0,
> +false);
> + mutex_unlock(>sta_mtx);
> + } else {
> + return false;
> + }
> + /*will return true if pkt_type found and handled */
> + return true;
> +}
> +
>  static void ieee80211_iface_work(struct work_struct *work)
>  {
>   struct ieee80211_sub_if_data *sdata =
> @@ -1205,8 +1247,6 @@ static void ieee80211_iface_work(struct work_struct 
> *work)
>   struct ieee80211_local *local = sdata->local;
>   struct sk_buff *skb;
>   struct sta_info *sta;
> - struct ieee80211_ra_tid *ra_tid;
> - struct ieee80211_rx_agg *rx_agg;
>  
>   if (!ieee80211_sdata_running(sdata))
>   return;
> @@ -1221,34 +1261,8 @@ static void ieee80211_iface_work(struct work_struct 
> *work)
>   while ((skb = skb_dequeue(>skb_queue))) {
>   struct ieee80211_mgmt *mgmt = (void *)skb->data;
>  
> - if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) {
> - ra_tid = (void *)>cb;
> - ieee80211_start_tx_ba_cb(>vif, ra_tid->ra,
> -  ra_tid->tid);
> - } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) {
> - ra_tid = (void *)>cb;
> - ieee80211_stop_tx_ba_cb(>vif, ra_tid->ra,
> - ra_tid->tid);
> - } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_START) 
> {
> - rx_agg = (void *)>cb;
> - mutex_lock(>sta_mtx);
> - sta = sta_info_get_bss(sdata, rx_agg->addr);
> - if (sta)
> - __ieee80211_start_rx_ba_session(sta,
> -

[PATCH 3/4 v2 iface_work] Simple and well understood logic

2016-07-15 Thread Alex Briskin
Now the logic is obvious - if skb not handled by pkt type and not handled
by frame control it is handled by vif type and then released

Signed-off-by: Alex Briskin 
---
 net/mac80211/iface.c | 44 
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7756eec..6f55901 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1324,6 +1324,27 @@ static bool ieee80211_is_handled_by_frame_control(struct 
sk_buff *skb,
return true;
 }
 
+static void ieee80211_handle_by_vif_type(struct sk_buff *skb,
+struct ieee80211_sub_if_data *sdata)
+{
+   switch (sdata->vif.type) {
+   case NL80211_IFTYPE_STATION:
+   ieee80211_sta_rx_queued_mgmt(sdata, skb);
+   break;
+   case NL80211_IFTYPE_ADHOC:
+   ieee80211_ibss_rx_queued_mgmt(sdata, skb);
+   break;
+   case NL80211_IFTYPE_MESH_POINT:
+   if (!ieee80211_vif_is_mesh(>vif))
+   break;
+   ieee80211_mesh_rx_queued_mgmt(sdata, skb);
+   break;
+   default:
+   WARN(1, "frame for unexpected interface type");
+   break;
+   }
+}
+
 static void ieee80211_iface_work(struct work_struct *work)
 {
struct ieee80211_sub_if_data *sdata =
@@ -1342,28 +1363,11 @@ static void ieee80211_iface_work(struct work_struct 
*work)
 
/* first process frames */
while ((skb = skb_dequeue(>skb_queue))) {
-   if (ieee80211_is_skb_handled_by_pkt_type(skb, sdata)) {
-   goto free_skb;
-   } else if (ieee80211_is_handled_by_frame_control(skb, sdata)) {
-   goto free_skb;
-   } else switch (sdata->vif.type) {
-   case NL80211_IFTYPE_STATION:
-   ieee80211_sta_rx_queued_mgmt(sdata, skb);
-   break;
-   case NL80211_IFTYPE_ADHOC:
-   ieee80211_ibss_rx_queued_mgmt(sdata, skb);
-   break;
-   case NL80211_IFTYPE_MESH_POINT:
-   if (!ieee80211_vif_is_mesh(>vif))
-   break;
-   ieee80211_mesh_rx_queued_mgmt(sdata, skb);
-   break;
-   default:
-   WARN(1, "frame for unexpected interface type");
-   break;
+   if (!ieee80211_is_skb_handled_by_pkt_type(skb, sdata) &&
+   !ieee80211_is_handled_by_frame_control(skb, sdata)) {
+   ieee80211_handle_by_vif_type(skb, sdata);
}
 
-free_skb:
kfree_skb(skb);
}
 
-- 
2.5.0

--
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 2/4 v2 iface_work] Further improve radabilty

2016-07-15 Thread Alex Briskin
Refactor ieee80211_is_skb_handled_by_pkt_typ
Add ieee80211_is_handled_by_frame_control

Signed-off-by: Alex Briskin 
---
 net/mac80211/iface.c | 166 ---
 1 file changed, 91 insertions(+), 75 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index a68cbac..7756eec 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1207,13 +1207,16 @@ static bool ieee80211_is_skb_handled_by_pkt_type(struct 
sk_buff *skb,
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
 
-   if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) {
+   switch (skb->pkt_type) {
+   case IEEE80211_SDATA_QUEUE_AGG_START:
ra_tid = (void *)>cb;
ieee80211_start_tx_ba_cb(>vif, ra_tid->ra, ra_tid->tid);
-   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) {
+   break;
+   case IEEE80211_SDATA_QUEUE_AGG_STOP:
ra_tid = (void *)>cb;
ieee80211_stop_tx_ba_cb(>vif, ra_tid->ra, ra_tid->tid);
-   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_START) {
+   break;
+   case IEEE80211_SDATA_QUEUE_RX_AGG_START:
rx_agg = (void *)>cb;
mutex_lock(>sta_mtx);
sta = sta_info_get_bss(sdata, rx_agg->addr);
@@ -1223,7 +1226,8 @@ static bool ieee80211_is_skb_handled_by_pkt_type(struct 
sk_buff *skb,
IEEE80211_MAX_AMPDU_BUF,
false, true);
mutex_unlock(>sta_mtx);
-   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_STOP) {
+   break;
+   case IEEE80211_SDATA_QUEUE_RX_AGG_STOP:
rx_agg = (void *)>cb;
mutex_lock(>sta_mtx);
sta = sta_info_get_bss(sdata, rx_agg->addr);
@@ -1233,20 +1237,99 @@ static bool ieee80211_is_skb_handled_by_pkt_type(struct 
sk_buff *skb,
   WLAN_BACK_RECIPIENT, 0,
   false);
mutex_unlock(>sta_mtx);
-   } else {
+   break;
+   default:
return false;
}
/*will return true if pkt_type found and handled */
return true;
 }
 
+static bool ieee80211_is_handled_by_frame_control(struct sk_buff *skb,
+ struct ieee80211_sub_if_data
+ *sdata)
+{
+   struct ieee80211_local *local = sdata->local;
+   struct sta_info *sta;
+   struct ieee80211_mgmt *mgmt = (void *)skb->data;
+
+   if (ieee80211_is_action(mgmt->frame_control) &&
+   mgmt->u.action.category == WLAN_CATEGORY_BACK) {
+   int len = skb->len;
+
+   mutex_lock(>sta_mtx);
+   sta = sta_info_get_bss(sdata, mgmt->sa);
+   if (sta) {
+   switch (mgmt->u.action.u.addba_req.action_code) {
+   case WLAN_ACTION_ADDBA_REQ:
+   ieee80211_process_addba_request(local, sta,
+   mgmt, len);
+   break;
+   case WLAN_ACTION_ADDBA_RESP:
+   ieee80211_process_addba_resp(local, sta,
+mgmt, len);
+   break;
+   case WLAN_ACTION_DELBA:
+   ieee80211_process_delba(sdata, sta, mgmt, len);
+   break;
+   default:
+   WARN_ON(1);
+   break;
+   }
+   }
+   mutex_unlock(>sta_mtx);
+   } else if (ieee80211_is_action(mgmt->frame_control) &&
+  mgmt->u.action.category == WLAN_CATEGORY_VHT) {
+   switch (mgmt->u.action.u.vht_group_notif.action_code) {
+   case WLAN_VHT_ACTION_GROUPID_MGMT:
+   ieee80211_process_mu_groups(sdata, mgmt);
+   break;
+   default:
+   WARN_ON(1);
+   break;
+   }
+   } else if (ieee80211_is_data_qos(mgmt->frame_control)) {
+   struct ieee80211_hdr *hdr = (void *)mgmt;
+   /*
+* So the frame isn't mgmt, but frame_control
+* is at the right place anyway, of course, so
+* the if statement is correct.
+*
+* Warn if we have other data frame types here,
+* they must not get here.
+*/
+   WARN_ON(hdr->frame_control &
+   cpu_to_le16(IEEE80211_STYPE_NULLFUNC));
+

[PATCH 1/4 v2 iface_work] New function ieee80211_is_skb_handled_by_pkt_type

2016-07-15 Thread Alex Briskin
Split ieee80211_iface_work in two. Moved part of a code that checks
pkt_type.

Signed-off-by: Alex Briskin 
---
 net/mac80211/iface.c | 75 +++-
 1 file changed, 45 insertions(+), 30 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index c59af3e..a68cbac 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1198,6 +1198,48 @@ static void ieee80211_if_setup(struct net_device *dev)
dev->destructor = ieee80211_if_free;
 }
 
+static bool ieee80211_is_skb_handled_by_pkt_type(struct sk_buff *skb,
+struct ieee80211_sub_if_data
+*sdata)
+{
+   struct ieee80211_ra_tid *ra_tid;
+   struct ieee80211_rx_agg *rx_agg;
+   struct ieee80211_local *local = sdata->local;
+   struct sta_info *sta;
+
+   if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) {
+   ra_tid = (void *)>cb;
+   ieee80211_start_tx_ba_cb(>vif, ra_tid->ra, ra_tid->tid);
+   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) {
+   ra_tid = (void *)>cb;
+   ieee80211_stop_tx_ba_cb(>vif, ra_tid->ra, ra_tid->tid);
+   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_START) {
+   rx_agg = (void *)>cb;
+   mutex_lock(>sta_mtx);
+   sta = sta_info_get_bss(sdata, rx_agg->addr);
+   if (sta)
+   __ieee80211_start_rx_ba_session(sta,
+   0, 0, 0, 1, rx_agg->tid,
+   IEEE80211_MAX_AMPDU_BUF,
+   false, true);
+   mutex_unlock(>sta_mtx);
+   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_STOP) {
+   rx_agg = (void *)>cb;
+   mutex_lock(>sta_mtx);
+   sta = sta_info_get_bss(sdata, rx_agg->addr);
+   if (sta)
+   __ieee80211_stop_rx_ba_session(sta,
+  rx_agg->tid,
+  WLAN_BACK_RECIPIENT, 0,
+  false);
+   mutex_unlock(>sta_mtx);
+   } else {
+   return false;
+   }
+   /*will return true if pkt_type found and handled */
+   return true;
+}
+
 static void ieee80211_iface_work(struct work_struct *work)
 {
struct ieee80211_sub_if_data *sdata =
@@ -1205,8 +1247,6 @@ static void ieee80211_iface_work(struct work_struct *work)
struct ieee80211_local *local = sdata->local;
struct sk_buff *skb;
struct sta_info *sta;
-   struct ieee80211_ra_tid *ra_tid;
-   struct ieee80211_rx_agg *rx_agg;
 
if (!ieee80211_sdata_running(sdata))
return;
@@ -1221,34 +1261,8 @@ static void ieee80211_iface_work(struct work_struct 
*work)
while ((skb = skb_dequeue(>skb_queue))) {
struct ieee80211_mgmt *mgmt = (void *)skb->data;
 
-   if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) {
-   ra_tid = (void *)>cb;
-   ieee80211_start_tx_ba_cb(>vif, ra_tid->ra,
-ra_tid->tid);
-   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) {
-   ra_tid = (void *)>cb;
-   ieee80211_stop_tx_ba_cb(>vif, ra_tid->ra,
-   ra_tid->tid);
-   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_START) 
{
-   rx_agg = (void *)>cb;
-   mutex_lock(>sta_mtx);
-   sta = sta_info_get_bss(sdata, rx_agg->addr);
-   if (sta)
-   __ieee80211_start_rx_ba_session(sta,
-   0, 0, 0, 1, rx_agg->tid,
-   IEEE80211_MAX_AMPDU_BUF,
-   false, true);
-   mutex_unlock(>sta_mtx);
-   } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_RX_AGG_STOP) {
-   rx_agg = (void *)>cb;
-   mutex_lock(>sta_mtx);
-   sta = sta_info_get_bss(sdata, rx_agg->addr);
-   if (sta)
-   __ieee80211_stop_rx_ba_session(sta,
-   rx_agg->tid,
-   WLAN_BACK_RECIPIENT, 0,
-   false);
-   mutex_unlock(>sta_mtx);
+   if (ieee80211_is_skb_handled_by_pkt_type(skb, sdata)) {
+   goto free_skb;
   

[PATCH 4/4 v2 iface_work] Function renaming

2016-07-15 Thread Alex Briskin
Replace iee80211 prefix with mac80211 prefix as it affects mac80211
only.

* Was unable to fit mac80211_is_skb_handled_by_frame_control function
signature into 80 char. line, compromised on parenthesis alignment.

Signed-off-by: Alex Briskin 
---
 net/mac80211/iface.c | 21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 6f55901..bd376e8 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1198,9 +1198,9 @@ static void ieee80211_if_setup(struct net_device *dev)
dev->destructor = ieee80211_if_free;
 }
 
-static bool ieee80211_is_skb_handled_by_pkt_type(struct sk_buff *skb,
-struct ieee80211_sub_if_data
-*sdata)
+static bool mac80211_is_skb_handled_by_pkt_type(struct sk_buff *skb,
+   struct ieee80211_sub_if_data
+   *sdata)
 {
struct ieee80211_ra_tid *ra_tid;
struct ieee80211_rx_agg *rx_agg;
@@ -1245,9 +1245,8 @@ static bool ieee80211_is_skb_handled_by_pkt_type(struct 
sk_buff *skb,
return true;
 }
 
-static bool ieee80211_is_handled_by_frame_control(struct sk_buff *skb,
- struct ieee80211_sub_if_data
- *sdata)
+static bool mac80211_is_skb_handled_by_frame_control(struct sk_buff *skb,
+   struct ieee80211_sub_if_datai *sdata)
 {
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
@@ -1324,8 +1323,8 @@ static bool ieee80211_is_handled_by_frame_control(struct 
sk_buff *skb,
return true;
 }
 
-static void ieee80211_handle_by_vif_type(struct sk_buff *skb,
-struct ieee80211_sub_if_data *sdata)
+static void mac80211_skb_handle_by_vif_type(struct sk_buff *skb,
+   struct ieee80211_sub_if_data *sdata)
 {
switch (sdata->vif.type) {
case NL80211_IFTYPE_STATION:
@@ -1363,9 +1362,9 @@ static void ieee80211_iface_work(struct work_struct *work)
 
/* first process frames */
while ((skb = skb_dequeue(>skb_queue))) {
-   if (!ieee80211_is_skb_handled_by_pkt_type(skb, sdata) &&
-   !ieee80211_is_handled_by_frame_control(skb, sdata)) {
-   ieee80211_handle_by_vif_type(skb, sdata);
+   if (!mac80211_is_skb_handled_by_pkt_type(skb, sdata) &&
+   !mac80211_is_skb_handled_by_frame_control(skb, sdata)) {
+   mac80211_skb_handle_by_vif_type(skb, sdata);
}
 
kfree_skb(skb);
-- 
2.5.0

--
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: pull-request: wireless-drivers-next 2016-07-13

2016-07-15 Thread Kalle Valo
David Miller  writes:

> From: Kalle Valo 
> Date: Wed, 13 Jul 2016 21:29:13 +0300
>
>> here's a pull request for net-next. This time there are few conflicts
>> due to the cfg80211 scan API changes, and one of them is easy to miss,
>> so please pay extra attention to them. Otherwise there's not nothing
>> really out of ordinary. Please note that I also pulled wireless-drivers
>> to wireless-drivers-next to reduce the amount of conflicts.
>> 
>> So about the conflicts, the obvious are notified by git:
>  ...
>> I have attached the output from git diff as an example how to resolve
>> this, hopefully that helps. Please let me know if there are any problems
>> or if you want to handle these differently.
>
> Thanks for all of the conflict resolution info, it really helped.
>
> I pushed this all out, please double check my work.

Looks good, thanks!

-- 
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: pull-request: wireless-drivers-next 2016-07-13

2016-07-15 Thread Kalle Valo
kbuild test robot  writes:

> Hi,
>
> [auto build test ERROR on wireless-drivers-next/master]
> [cannot apply to v4.7-rc7 next-20160714]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Kalle-Valo/pull-request-wireless-drivers-next-2016-07-13/20160714-023750
> base:   
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git
>  master
> config: sparc64-allmodconfig (attached as .config)
> compiler: sparc64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
> 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=sparc64 
>
> All error/warnings (new ones prefixed by >>):
>
>drivers/net/wireless/marvell/mwifiex/scan.c: In function 
> 'mwifiex_cancel_scan':
>>> drivers/net/wireless/marvell/mwifiex/scan.c:2024:12: error: variable 'info' 
>>> has initializer but incomplete type
> struct cfg80211_scan_info info = {

The diff was just an example to help Dave fix few conflicts in my pull
request, it was not meant to be applied directly.

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