RE: Regression with Intel 3160 AP: client not reconnecting
> > Hi Jarek, > > [snip] > > > What might be the cause? Is there anything I can do to help debug or > > fix this? > > Thanks for the detailed bug report and analysis! I can't analyse this in depth > right now, can you please file a bug on bugzilla.kernel.org? When you do so, please CC linuxw...@intel.com to the bug. Thank you.
Re: [PATCH resend 1/4] nfc: Add support RC-S380P to port100
OGAWA Hirofumiwrites: Ping? > Signed-off-by: OGAWA Hirofumi > --- > > drivers/nfc/port100.c |8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff -puN drivers/nfc/port100.c~nfc-add-rcs380p drivers/nfc/port100.c > --- linux/drivers/nfc/port100.c~nfc-add-rcs380p 2016-12-18 > 22:16:53.503673411 +0900 > +++ linux-hirofumi/drivers/nfc/port100.c 2016-12-18 22:16:53.504673416 > +0900 > @@ -21,8 +21,9 @@ > > #define VERSION "0.1" > > -#define SONY_VENDOR_ID0x054c > -#define RCS380_PRODUCT_ID 0x06c1 > +#define SONY_VENDOR_ID 0x054c > +#define RCS380S_PRODUCT_ID 0x06c1 > +#define RCS380P_PRODUCT_ID 0x06c3 > > #define PORT100_PROTOCOLS (NFC_PROTO_JEWEL_MASK| \ > NFC_PROTO_MIFARE_MASK | \ > @@ -1477,7 +1478,8 @@ static struct nfc_digital_ops port100_di > }; > > static const struct usb_device_id port100_table[] = { > - { USB_DEVICE(SONY_VENDOR_ID, RCS380_PRODUCT_ID), }, > + { USB_DEVICE(SONY_VENDOR_ID, RCS380S_PRODUCT_ID), }, > + { USB_DEVICE(SONY_VENDOR_ID, RCS380P_PRODUCT_ID), }, > { } > }; > MODULE_DEVICE_TABLE(usb, port100_table); > _ -- OGAWA Hirofumi
Re: [PATCHv2 3/4] cfg80211: Add Support set btcoex priority value
Hi Tamizh, [auto build test ERROR on mac80211-next/master] [also build test ERROR on next-20170224] [cannot apply to v4.10] [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/c_traja-qti-qualcomm-com/cfg80211-mac80211-BTCOEX-feature-support/20170225-215733 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: sparc64-allmodconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 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 Note: the linux-review/c_traja-qti-qualcomm-com/cfg80211-mac80211-BTCOEX-feature-support/20170225-215733 HEAD 375b0104c717b355c9c35350bd9a7d34cb05f4bb builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): >> net/mac80211/cfg.c:3703:16: error: initialization from incompatible pointer >> type [-Werror=incompatible-pointer-types] .set_btcoex = ieee80211_set_btcoex, ^~~~ net/mac80211/cfg.c:3703:16: note: (near initialization for 'mac80211_config_ops.set_btcoex') cc1: some warnings being treated as errors vim +3703 net/mac80211/cfg.c 6d52563f2b net/mac80211/cfg.c Johannes Berg2012-04-04 3687 #ifdef CONFIG_PM 6d52563f2b net/mac80211/cfg.c Johannes Berg2012-04-04 3688 .set_wakeup = ieee80211_set_wakeup, 6d52563f2b net/mac80211/cfg.c Johannes Berg2012-04-04 3689 #endif 5b7ccaf3fc net/mac80211/cfg.c Johannes Berg2012-07-12 3690 .get_channel = ieee80211_cfg_get_channel, 164eb02d07 net/mac80211/cfg.c Simon Wunderlich 2013-02-08 3691 .start_radar_detection = ieee80211_start_radar_detection, 73da7d5bab net/mac80211/cfg.c Simon Wunderlich 2013-07-11 3692 .channel_switch = ieee80211_channel_switch, 32db6b54df net/mac80211/cfg.c Kyeyoon Park 2013-12-16 3693 .set_qos_map = ieee80211_set_qos_map, 3b1700bde4 net/mac80211/cfg.c Jouni Malinen2014-04-28 3694 .set_ap_chanwidth = ieee80211_set_ap_chanwidth, 02219b3abc net/mac80211/cfg.c Johannes Berg2014-10-07 3695 .add_tx_ts = ieee80211_add_tx_ts, 02219b3abc net/mac80211/cfg.c Johannes Berg2014-10-07 3696 .del_tx_ts = ieee80211_del_tx_ts, 708d50edb1 net/mac80211/cfg.c Ayala Beker 2016-09-20 3697 .start_nan = ieee80211_start_nan, 708d50edb1 net/mac80211/cfg.c Ayala Beker 2016-09-20 3698 .stop_nan = ieee80211_stop_nan, 5953ff6d6a net/mac80211/cfg.c Ayala Beker 2016-09-20 3699 .nan_change_conf = ieee80211_nan_change_conf, 167e33f4f6 net/mac80211/cfg.c Ayala Beker 2016-09-20 3700 .add_nan_func = ieee80211_add_nan_func, 167e33f4f6 net/mac80211/cfg.c Ayala Beker 2016-09-20 3701 .del_nan_func = ieee80211_del_nan_func, ebceec860f net/mac80211/cfg.c Michael Braun2016-11-22 3702 .set_multicast_to_unicast = ieee80211_set_multicast_to_unicast, 8eb981c618 net/mac80211/cfg.c Tamizh chelvam 2017-02-25 @3703 .set_btcoex = ieee80211_set_btcoex, f0706e828e net/mac80211/ieee80211_cfg.c Jiri Benc2007-05-05 3704 }; :: The code at line 3703 was first introduced by commit :: 8eb981c618fea1c068e64a61adc32c2149f5cfd8 mac80211: Add support to enable or disable btcoex :: TO: Tamizh chelvam <c_tr...@qti.qualcomm.com> :: CC: 0day robot <fengguang...@intel.com> --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCHv2 1/4] cfg80211: Add support to enable or disable btcoex
Hi Tamizh, [auto build test WARNING on mac80211-next/master] [also build test WARNING on next-20170224] [cannot apply to v4.10] [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/c_traja-qti-qualcomm-com/cfg80211-mac80211-BTCOEX-feature-support/20170225-215733 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 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 warnings (new ones prefixed by >>): In file included from include/trace/define_trace.h:95:0, from net/wireless/trace.h:3116, from net/wireless/trace.c:5: net/wireless/./trace.h: In function 'trace_raw_output_rdev_set_btcoex': >> include/trace/trace_events.h:323:9: warning: too many arguments for format >> [-Wformat-extra-args] struct trace_event_raw_##call *field;\ ^ include/trace/trace_events.h:60:2: note: in expansion of macro 'DECLARE_EVENT_CLASS' DECLARE_EVENT_CLASS(name, \ ^ net/wireless/./trace.h:3072:1: note: in expansion of macro 'TRACE_EVENT' TRACE_EVENT(rdev_set_btcoex, ^ vim +323 include/trace/trace_events.h 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 307 #undef __print_array 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 308 #define __print_array(array, count, el_size)\ 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 309 ({ \ 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 310 BUILD_BUG_ON(el_size != 1 && el_size != 2 &&\ 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 311 el_size != 4 && el_size != 8); \ 645df987 include/trace/trace_events.h Steven Rostedt (Red Hat 2015-05-04 312) trace_print_array_seq(p, array, count, el_size);\ 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 313 }) 6ea22486 include/trace/ftrace.h Dave Martin 2015-01-28 314 091ad365 include/trace/ftrace.h Ingo Molnar 2009-11-26 315 #undef DECLARE_EVENT_CLASS 091ad365 include/trace/ftrace.h Ingo Molnar 2009-11-26 316 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 83f0d539 include/trace/ftrace.h Steven Rostedt 2010-02-16 317 static notrace enum print_line_t\ 892c505a include/trace/trace_events.h Steven Rostedt (Red Hat 2015-05-05 318) trace_raw_output_##call(struct trace_iterator *iter, int flags, \ 80decc70 include/trace/ftrace.h Steven Rostedt 2010-04-23 319 struct trace_event *trace_event)\ f42c85e7 include/trace/ftrace.h Steven Rostedt 2009-04-13 320 { \ f42c85e7 include/trace/ftrace.h Steven Rostedt 2009-04-13 321 struct trace_seq *s = >seq; \ f71130de include/trace/ftrace.h Li Zefan 2013-02-21 322 struct trace_seq __maybe_unused *p = >tmp_seq;\ a7237765 include/trace/trace_events.h Steven Rostedt (Red Hat 2015-05-13 @323) struct trace_event_raw_##call *field; \ f42c85e7 include/trace/ftrace.h Steven Rostedt 2009-04-13 324 int ret;\ f42c85e7 include/trace/ftrace.h Steven Rostedt 2009-04-13 325 \ f71130de include/trace/ftrace.h Li Zefan 2013-02-21 326 field = (typeof(field))iter->ent; \ 80decc70 include/trace/ftrace.h Steven Rostedt 2010-04-23 327 \ 892c505a include/trace/trace_events.h Steven Rostedt (Red Hat 2015-05-05 328) ret = trace_raw_output_prep(iter, trace_event); \ 8e2e095c include/trace/ftrace.h Steven Rostedt (Red Hat 2014-11-14 329) if (ret != TRACE_TYPE_HANDLED) \ f71130de include/trace/ftrace.h Li Zefan
Re: [PATCHv2 1/4] cfg80211: Add support to enable or disable btcoex
Hi Tamizh, [auto build test WARNING on mac80211-next/master] [also build test WARNING on next-20170224] [cannot apply to v4.10] [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/c_traja-qti-qualcomm-com/cfg80211-mac80211-BTCOEX-feature-support/20170225-215733 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: i386-randconfig-x003-201708 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from include/trace/define_trace.h:95:0, from net/wireless/trace.h:3116, from net/wireless/trace.c:5: net/wireless/./trace.h: In function 'trace_raw_output_rdev_set_btcoex': >> net/wireless/./trace.h:27:22: warning: too many arguments for format >> [-Wformat-extra-args] #define WIPHY_PR_FMT "%s" ^ include/trace/trace_events.h:332:22: note: in definition of macro 'DECLARE_EVENT_CLASS' trace_seq_printf(s, print); \ ^ include/trace/trace_events.h:65:9: note: in expansion of macro 'PARAMS' PARAMS(print)); \ ^~ >> net/wireless/./trace.h:3072:1: note: in expansion of macro 'TRACE_EVENT' TRACE_EVENT(rdev_set_btcoex, ^~~ >> net/wireless/./trace.h:3083:2: note: in expansion of macro 'TP_printk' TP_printk(WIPHY_PR_FMT, ", enabled=%d", ^ >> net/wireless/./trace.h:3083:12: note: in expansion of macro 'WIPHY_PR_FMT' TP_printk(WIPHY_PR_FMT, ", enabled=%d", ^~~~ vim +27 net/wireless/./trace.h 14e8a3c4 Beni Lev 2012-07-31 11 #include 14e8a3c4 Beni Lev 2012-07-31 12 #include "core.h" 14e8a3c4 Beni Lev 2012-07-31 13 14e8a3c4 Beni Lev 2012-07-31 14 #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN) 14e8a3c4 Beni Lev 2012-07-31 15 #define MAC_ASSIGN(entry_mac, given_mac) do { \ 14e8a3c4 Beni Lev 2012-07-31 16 if (given_mac) \ 14e8a3c4 Beni Lev 2012-07-31 17 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \ 14e8a3c4 Beni Lev 2012-07-31 18 else \ d2beae10 Joe Perches 2015-03-02 19 eth_zero_addr(__entry->entry_mac); \ 14e8a3c4 Beni Lev 2012-07-31 20 } while (0) 14e8a3c4 Beni Lev 2012-07-31 21 #define MAC_PR_FMT "%pM" 14e8a3c4 Beni Lev 2012-07-31 22 #define MAC_PR_ARG(entry_mac) (__entry->entry_mac) 14e8a3c4 Beni Lev 2012-07-31 23 ec816087 Johannes Berg 2012-11-16 24 #define MAXNAME 32 ec816087 Johannes Berg 2012-11-16 25 #define WIPHY_ENTRY __array(char, wiphy_name, 32) ec816087 Johannes Berg 2012-11-16 26 #define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME) ec816087 Johannes Berg 2012-11-16 @27 #define WIPHY_PR_FMT "%s" ec816087 Johannes Berg 2012-11-16 28 #define WIPHY_PR_ARG __entry->wiphy_name 14e8a3c4 Beni Lev 2012-07-31 29 14e8a3c4 Beni Lev 2012-07-31 30 #define WDEV_ENTRY __field(u32, id) ce1eadda Johannes Berg 2013-03-19 31 #define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \ ce1eadda Johannes Berg 2013-03-19 32? wdev->identifier : 0) ec816087 Johannes Berg 2012-11-16 33 #define WDEV_PR_FMT "wdev(%u)" 14e8a3c4 Beni Lev 2012-07-31 34 #define WDEV_PR_ARG (__entry->id) 14e8a3c4 Beni Lev 2012-07-31 35 :: The code at line 27 was first introduced by commit :: ec816087e8978b74c1bd5fae0e335dd97d964e9f cfg80211: fix some tracing output issues :: TO: Johannes Berg <johannes.b...@intel.com> :: CC: Johannes Berg <johannes.b...@intel.com> --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCHv2 0/4] cfg80211: mac80211: BTCOEX feature support
On 25-2-2017 14:37, c_tr...@qti.qualcomm.com wrote: > From: Tamizh chelvam> > This patchset add support for BTCOEX feature to enable/disable and > modifying btcoex priority value via nl80211 > > Tamizh chelvam (4): > ath10k: Add support to enable or disable btcoex via nl80211 > ath10k: Add support to update btcoex priority value via nl80211 > dt: bindings: add new dt entry for BTCOEX feature in qcom,ath10k.txt > ath10k: Add support to read btcoex related data from DT This cover letter does not seem to reflect the other patches that were sent to the wireless list as those are about cfg80211/mac80211; not ath10k? Regards, Arend > v2 : > * Introduced NL80211_CMD_SET_BTCOEX to enable/disable btcoex and > to set/modify btcoex_priority. > * Added bool variable in wiphy structure to advertise btcoex_priority > feature and removed BITMAP calculation for btcoex_priority value. > > .../bindings/net/wireless/qcom,ath10k.txt |4 + > drivers/net/wireless/ath/ath10k/core.c | 44 - > drivers/net/wireless/ath/ath10k/core.h |9 ++ > drivers/net/wireless/ath/ath10k/debug.c| 40 ++--- > drivers/net/wireless/ath/ath10k/mac.c | 94 > +++- > drivers/net/wireless/ath/ath10k/mac.h |1 + > drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 > drivers/net/wireless/ath/ath10k/wmi.c | 20 + > drivers/net/wireless/ath/ath10k/wmi.h | 20 + > 9 files changed, 215 insertions(+), 36 deletions(-) >
[PATCHv2 1/4] cfg80211: Add support to enable or disable btcoex
From: Tamizh chelvamThis patch introduces NL80211_CMD_SET_BTCOEX command and NL80211_ATTR_BTCOEX_OP attribute to enable or disable btcoex. Signed-off-by: Tamizh chelvam --- include/net/cfg80211.h |3 +++ include/uapi/linux/nl80211.h |9 + net/wireless/nl80211.c | 31 +++ net/wireless/rdev-ops.h | 11 +++ net/wireless/trace.h | 15 +++ 5 files changed, 69 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index c92dc03..a9aae03 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2816,6 +2816,8 @@ struct cfg80211_nan_func { * All other parameters must be ignored. * * @set_multicast_to_unicast: configure multicast to unicast conversion for BSS + * @set_btcoex: Use this callback to call driver API when user wants to + * enable/disable btcoex. */ struct cfg80211_ops { int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); @@ -3100,6 +3102,7 @@ struct cfg80211_ops { int (*set_multicast_to_unicast)(struct wiphy *wiphy, struct net_device *dev, const bool enabled); + int (*set_btcoex)(struct wiphy *wiphy, bool enabled); }; /* diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 5ed257c..30d691f 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -900,6 +900,8 @@ * BSS selection. This command can be issued only while connected and it * does not result in a change for the current association. Currently, * only the %NL80211_ATTR_IE data is used and updated with this command. + * @NL80211_CMD_SET_BTCOEX: Enable/Disable btcoex using + * %NL80211_ATTR_SET_BTCOEX * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use @@ -1100,6 +1102,8 @@ enum nl80211_commands { NL80211_CMD_UPDATE_CONNECT_PARAMS, + NL80211_CMD_SET_BTCOEX, + /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ @@ -2011,6 +2015,9 @@ enum nl80211_commands { * @NL80211_ATTR_TIMEOUT_REASON: The reason for which an operation timed out. * u32 attribute with an nl80211_timeout_reason value. This is used, * e.g., with %NL80211_CMD_CONNECT event. + * @NL80211_ATTR_BTCOEX_OP: u8 attribute for driver supporting + * the btcoex feature. When used with %NL80211_CMD_SET_BTCOEX it contains + * either 0 for disable or 1 for enable btcoex. * * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined @@ -2423,6 +2430,8 @@ enum nl80211_attrs { NL80211_ATTR_TIMEOUT_REASON, + NL80211_ATTR_BTCOEX_OP, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index d7f8be4..bd203c2 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -410,6 +410,7 @@ enum nl80211_multicast_groups { .len = sizeof(struct nl80211_bss_select_rssi_adjust) }, [NL80211_ATTR_TIMEOUT_REASON] = { .type = NLA_U32 }, + [NL80211_ATTR_BTCOEX_OP] = { .type = NLA_U8 }, }; /* policy for the key attributes */ @@ -11966,6 +11967,28 @@ static int nl80211_set_multicast_to_unicast(struct sk_buff *skb, return rdev_set_multicast_to_unicast(rdev, dev, enabled); } +static int nl80211_set_btcoex(struct sk_buff *skb, struct genl_info *info) +{ + struct cfg80211_registered_device *rdev = info->user_ptr[0]; + u8 val = 0; + + if (!rdev->ops->set_btcoex) + return -ENOTSUPP; + + if(!(info->attrs[NL80211_ATTR_BTCOEX_OP])) + goto set_btcoex; + + if (info->attrs[NL80211_ATTR_BTCOEX_OP]) + val = nla_get_u8(info->attrs[NL80211_ATTR_BTCOEX_OP]); + + if (val > 1) + return -EINVAL; + + +set_btcoex: + return rdev_set_btcoex(rdev, val); +} + #define NL80211_FLAG_NEED_WIPHY0x01 #define NL80211_FLAG_NEED_NETDEV 0x02 #define NL80211_FLAG_NEED_RTNL 0x04 @@ -12841,6 +12864,14 @@ static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb, .internal_flags = NL80211_FLAG_NEED_NETDEV | NL80211_FLAG_NEED_RTNL, }, + { + .cmd = NL80211_CMD_SET_BTCOEX, + .doit = nl80211_set_btcoex, + .policy = nl80211_policy, + .flags = GENL_UNS_ADMIN_PERM, + .internal_flags = NL80211_FLAG_NEED_WIPHY | + NL80211_FLAG_NEED_RTNL, + }, }; static struct genl_family nl80211_fam __ro_after_init = { diff --git a/net/wireless/rdev-ops.h
[PATCHv2 2/4] mac80211: Add support to enable or disable btcoex
From: Tamizh chelvamThis patch introduces a new driver call back drv_set_btcoex This API will pass user space value to driver to enable or disabe btcoex. Signed-off-by: Tamizh chelvam --- include/net/mac80211.h|3 +++ net/mac80211/cfg.c|8 net/mac80211/driver-ops.h | 14 ++ net/mac80211/trace.h | 14 ++ 4 files changed, 39 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b9a08cd..57717f1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -3447,6 +3447,8 @@ enum ieee80211_reconfig_type { * @del_nan_func: Remove a NAN function. The driver must call * ieee80211_nan_func_terminated() with * NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST reason code upon removal. + * @set_btcoex_: Called when BTCOEX is enabled/disabled, use + * this callback to enable or disable btcoex. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, @@ -3728,6 +3730,7 @@ struct ieee80211_ops { void (*del_nan_func)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u8 instance_id); + int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled); }; /** diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ac879bb..7e17eff 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3574,6 +3574,13 @@ static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy, return 0; } +static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled) +{ + struct ieee80211_local *local = wiphy_priv(wiphy); + + return drv_set_btcoex(local, enabled); +} + const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface, @@ -3665,4 +3672,5 @@ static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy, .add_nan_func = ieee80211_add_nan_func, .del_nan_func = ieee80211_del_nan_func, .set_multicast_to_unicast = ieee80211_set_multicast_to_unicast, + .set_btcoex = ieee80211_set_btcoex, }; diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 09f77e4..16d9c98 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1248,4 +1248,18 @@ static inline void drv_del_nan_func(struct ieee80211_local *local, trace_drv_return_void(local); } +static inline int drv_set_btcoex(struct ieee80211_local *local, +bool enabled) +{ + int ret = -EOPNOTSUPP; + + trace_drv_set_btcoex(local, enabled); + if (local->ops->set_btcoex) + ret = local->ops->set_btcoex(>hw, enabled); + + trace_drv_return_int(local, ret); + + return ret; +} + #endif /* __MAC80211_DRIVER_OPS */ diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 0d645bc..0d9b5a0 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -742,6 +742,20 @@ TP_ARGS(local, value) ); +TRACE_EVENT(drv_set_btcoex, + TP_PROTO(struct ieee80211_local *local, bool enabled), + TP_ARGS(local, enabled), + TP_STRUCT__entry( + LOCAL_ENTRY + __field(bool, enabled) + ), + TP_fast_assign( + LOCAL_ASSIGN; + __entry->enabled = enabled; + ), + TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) +); + TRACE_EVENT(drv_set_coverage_class, TP_PROTO(struct ieee80211_local *local, s16 value), -- 1.7.9.5
[PATCHv2 0/4] cfg80211: mac80211: BTCOEX feature support
From: Tamizh chelvamThis patchset add support for BTCOEX feature to enable/disable and modifying btcoex priority value via nl80211 Tamizh chelvam (4): ath10k: Add support to enable or disable btcoex via nl80211 ath10k: Add support to update btcoex priority value via nl80211 dt: bindings: add new dt entry for BTCOEX feature in qcom,ath10k.txt ath10k: Add support to read btcoex related data from DT v2 : * Introduced NL80211_CMD_SET_BTCOEX to enable/disable btcoex and to set/modify btcoex_priority. * Added bool variable in wiphy structure to advertise btcoex_priority feature and removed BITMAP calculation for btcoex_priority value. .../bindings/net/wireless/qcom,ath10k.txt |4 + drivers/net/wireless/ath/ath10k/core.c | 44 - drivers/net/wireless/ath/ath10k/core.h |9 ++ drivers/net/wireless/ath/ath10k/debug.c| 40 ++--- drivers/net/wireless/ath/ath10k/mac.c | 94 +++- drivers/net/wireless/ath/ath10k/mac.h |1 + drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 drivers/net/wireless/ath/ath10k/wmi.c | 20 + drivers/net/wireless/ath/ath10k/wmi.h | 20 + 9 files changed, 215 insertions(+), 36 deletions(-) -- 1.7.9.5
[PATCHv2 4/4] mac80211: Add support to set/update btcoex priority value
From: Tamizh chelvamThis patch add support to set or modify the btcoex priority value for the driver which has btcoex priority feature support. Signed-off-by: Tamizh chelvam --- include/net/mac80211.h|6 -- net/mac80211/cfg.c|5 +++-- net/mac80211/driver-ops.h |7 --- net/mac80211/trace.h | 12 +--- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 57717f1..33890b4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -3448,7 +3448,8 @@ enum ieee80211_reconfig_type { * ieee80211_nan_func_terminated() with * NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST reason code upon removal. * @set_btcoex_: Called when BTCOEX is enabled/disabled, use - * this callback to enable or disable btcoex. + * this callback to enable or disable btcoex and use this callback to + * set btcoex_priority. BTCOEX should be enabled to set this priority. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, @@ -3730,7 +3731,8 @@ struct ieee80211_ops { void (*del_nan_func)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u8 instance_id); - int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled); + int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled, + int btcoex_priority); }; /** diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7e17eff..c640e7d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3574,11 +3574,12 @@ static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy, return 0; } -static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled) +static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled, + int btcoex_priority) { struct ieee80211_local *local = wiphy_priv(wiphy); - return drv_set_btcoex(local, enabled); + return drv_set_btcoex(local, enabled, btcoex_priority); } const struct cfg80211_ops mac80211_config_ops = { diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 16d9c98..3826202 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1249,13 +1249,14 @@ static inline void drv_del_nan_func(struct ieee80211_local *local, } static inline int drv_set_btcoex(struct ieee80211_local *local, -bool enabled) +bool enabled, int btcoex_priority) { int ret = -EOPNOTSUPP; - trace_drv_set_btcoex(local, enabled); + trace_drv_set_btcoex(local, enabled, btcoex_priority); if (local->ops->set_btcoex) - ret = local->ops->set_btcoex(>hw, enabled); + ret = local->ops->set_btcoex(>hw, enabled, +btcoex_priority); trace_drv_return_int(local, ret); diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 0d9b5a0..c3efca9 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -743,17 +743,23 @@ ); TRACE_EVENT(drv_set_btcoex, - TP_PROTO(struct ieee80211_local *local, bool enabled), - TP_ARGS(local, enabled), + TP_PROTO(struct ieee80211_local *local, bool enabled, +int btcoex_priority), + TP_ARGS(local, enabled, btcoex_priority), TP_STRUCT__entry( LOCAL_ENTRY __field(bool, enabled) + __field(int, btcoex_priority) ), TP_fast_assign( LOCAL_ASSIGN; __entry->enabled = enabled; + __entry->btcoex_priority = btcoex_priority; ), - TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) + TP_printk( + LOCAL_PR_FMT " enabled:%d btcoex_priority :%d", + LOCAL_PR_ARG, __entry->enabled, __entry->btcoex_priority + ) ); TRACE_EVENT(drv_set_coverage_class, -- 1.7.9.5
[PATCHv2 3/4] cfg80211: Add Support set btcoex priority value
From: Tamizh chelvamThis change enables user to set btcoex priority by using NL80211_ATTR_BTCOEX_PRIORITY attribute for the driver which has the btcoex priority capability. Driver should expose such capability and make use of this priority to decide whom to share the radio (either bluetooth or WLAN). When the high priority wlan frames are queued driver or firmware will signal to block BT activity. Capable drivers should advertise this support through btcoex_priority_support. This will be useful to avoid connection lost or packet drop issue when BT is active on long time. Signed-off-by: Tamizh chelvam --- include/net/cfg80211.h | 10 -- include/uapi/linux/nl80211.h |7 +++ net/wireless/nl80211.c | 16 +++- net/wireless/rdev-ops.h |8 +--- net/wireless/trace.h | 10 ++ 5 files changed, 41 insertions(+), 10 deletions(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a9aae03..3f44aac 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2817,7 +2817,10 @@ struct cfg80211_nan_func { * * @set_multicast_to_unicast: configure multicast to unicast conversion for BSS * @set_btcoex: Use this callback to call driver API when user wants to - * enable/disable btcoex. + * enable/disable btcoex and use this callback to set wlan high priority over + * Bluetooth. This capability will be exposed by the driver using + * btcoex_priority_support boolean flag. When BTCOEX enabled, + * the high priority wlan frames will have more priority than BT. */ struct cfg80211_ops { int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); @@ -3102,7 +3105,8 @@ struct cfg80211_ops { int (*set_multicast_to_unicast)(struct wiphy *wiphy, struct net_device *dev, const bool enabled); - int (*set_btcoex)(struct wiphy *wiphy, bool enabled); + int (*set_btcoex)(struct wiphy *wiphy, bool enabled, + int btcoex_priority); }; /* @@ -3738,6 +3742,8 @@ struct wiphy { u8 nan_supported_bands; + bool btcoex_priority_support; + char priv[0] __aligned(NETDEV_ALIGN); }; diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 30d691f..94b6eff 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2019,6 +2019,12 @@ enum nl80211_commands { * the btcoex feature. When used with %NL80211_CMD_SET_BTCOEX it contains * either 0 for disable or 1 for enable btcoex. * + * @NL80211_ATTR_BTCOEX_PRIORITY: This is for the driver which + * support btcoex priority feature. It used with %NL80211_CMD_SET_BTCOEX. + * This will have u32 BITMAP value which represents + * frame(bk, be, vi, vo, mgmt, beacon) type and that will have more + * priority than a BT traffic. + * * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use @@ -2431,6 +2437,7 @@ enum nl80211_attrs { NL80211_ATTR_TIMEOUT_REASON, NL80211_ATTR_BTCOEX_OP, + NL80211_ATTR_BTCOEX_PRIORITY, /* add attributes here, update the policy in nl80211.c */ diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index bd203c2..56518c4 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -411,6 +411,7 @@ enum nl80211_multicast_groups { }, [NL80211_ATTR_TIMEOUT_REASON] = { .type = NLA_U32 }, [NL80211_ATTR_BTCOEX_OP] = { .type = NLA_U8 }, + [NL80211_ATTR_BTCOEX_PRIORITY] = { .type = NLA_U32 }, }; /* policy for the key attributes */ @@ -11970,7 +11971,9 @@ static int nl80211_set_multicast_to_unicast(struct sk_buff *skb, static int nl80211_set_btcoex(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; + struct wiphy *wiphy = >wiphy; u8 val = 0; + int btcoex_priority = -1; if (!rdev->ops->set_btcoex) return -ENOTSUPP; @@ -11984,9 +11987,20 @@ static int nl80211_set_btcoex(struct sk_buff *skb, struct genl_info *info) if (val > 1) return -EINVAL; + if (wiphy->btcoex_priority_support) + btcoex_priority = 0; + + if (info->attrs[NL80211_ATTR_BTCOEX_PRIORITY]) { + if (!wiphy->btcoex_priority_support) + return -EOPNOTSUPP; + + btcoex_priority = + nla_get_u32(info->attrs[NL80211_ATTR_BTCOEX_PRIORITY]); + + } set_btcoex: - return rdev_set_btcoex(rdev, val); + return rdev_set_btcoex(rdev, val, btcoex_priority); } #define NL80211_FLAG_NEED_WIPHY0x01 diff --git a/net/wireless/rdev-ops.h