Re: ath10k to ath9k IBSS, ath9k has interface-combinations issue
On 7 April 2015 at 07:12, Michal Kazior wrote: > On 7 April 2015 at 02:39, Ben Greear wrote: >> Has anyone tried running ath10k to ath9k IBSS? >> >> I'm trying this with a somewhat hacked 4.0-rc6 kernel, >> and latest wpa_supplicant. >> >> ath9k to ath9k works with and without encryption, and ath10k to ath10k works >> (w/out encryption at least). >> >> But, if I try to tell ath10k to connect to ath9k, then the ath9k reports >> interface combinations >> issues and will not associate. I've added some debug, and the issue is the >> 'num==0' part here: >> >> >> int cfg80211_check_combinations(struct wiphy *wiphy, >> const int num_different_channels, >> const u8 radar_detect, >> const int iftype_num[NUM_NL80211_IFTYPES]) >> { >> int err, num = 0; >> >> err = cfg80211_iter_combinations(wiphy, num_different_channels, >> radar_detect, iftype_num, >> cfg80211_iter_sum_ifcombs, &num); >> if (err) { >> pr_info("cfg-comb-check: failed to iterate combinations\n"); >> return err; >> } >> if (num == 0) { >> pr_info("cfg-comb-check: iter-combinations returned >> num==0\n"); >> return -EBUSY; >> } >> >> return 0; >> } >> EXPORT_SYMBOL(cfg80211_check_combinations); >> >> There should be exactly one interface on this radio that is admin-up, and it >> is the >> one that I am trying to make run in adhoc mode. >> >> Any ideas on this? > > IBSS with non-fixed or dfs channel? It would bump > num_different_channels and yield no valid combinations. But why would > that work fine with, e.g. ath9k-ath9k otherwise - no idea. > Check this discussion (ibss + p2p_device - this could be one you hit). http://www.spinics.net/lists/linux-wireless/msg134447.html BR Janusz -- 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: ath10k to ath9k IBSS, ath9k has interface-combinations issue
On 7 April 2015 at 02:39, Ben Greear wrote: > Has anyone tried running ath10k to ath9k IBSS? > > I'm trying this with a somewhat hacked 4.0-rc6 kernel, > and latest wpa_supplicant. > > ath9k to ath9k works with and without encryption, and ath10k to ath10k works > (w/out encryption at least). > > But, if I try to tell ath10k to connect to ath9k, then the ath9k reports > interface combinations > issues and will not associate. I've added some debug, and the issue is the > 'num==0' part here: > > > int cfg80211_check_combinations(struct wiphy *wiphy, > const int num_different_channels, > const u8 radar_detect, > const int iftype_num[NUM_NL80211_IFTYPES]) > { > int err, num = 0; > > err = cfg80211_iter_combinations(wiphy, num_different_channels, > radar_detect, iftype_num, > cfg80211_iter_sum_ifcombs, &num); > if (err) { > pr_info("cfg-comb-check: failed to iterate combinations\n"); > return err; > } > if (num == 0) { > pr_info("cfg-comb-check: iter-combinations returned > num==0\n"); > return -EBUSY; > } > > return 0; > } > EXPORT_SYMBOL(cfg80211_check_combinations); > > There should be exactly one interface on this radio that is admin-up, and it > is the > one that I am trying to make run in adhoc mode. > > Any ideas on this? IBSS with non-fixed or dfs channel? It would bump num_different_channels and yield no valid combinations. But why would that work fine with, e.g. ath9k-ath9k otherwise - no idea. MichaĆ -- 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] mac80211: Move message tracepoints to their own header
Every tracing file must have its own TRACE_SYSTEM defined. The mac80211 tracepoint header broke this and add in the middle of the file had: #undef TRACE_SYSTEM #define TRACE_SYSTEM mac80211_msg Unfortunately, this broke new code in the ftrace infrastructure. Moving the mac80211_msg into its own trace file with its own TRACE_SYSTEM defined fixes the issue. Cc: Johannes Berg Signed-off-by: Steven Rostedt --- net/mac80211/trace.c | 1 + net/mac80211/trace.h | 38 -- net/mac80211/trace_msg.h | 53 3 files changed, 54 insertions(+), 38 deletions(-) create mode 100644 net/mac80211/trace_msg.h diff --git a/net/mac80211/trace.c b/net/mac80211/trace.c index 386e45d8a958..edfe0c170a1c 100644 --- a/net/mac80211/trace.c +++ b/net/mac80211/trace.c @@ -8,6 +8,7 @@ #include "debug.h" #define CREATE_TRACE_POINTS #include "trace.h" +#include "trace_msg.h" #ifdef CONFIG_MAC80211_MESSAGE_TRACING void __sdata_info(const char *fmt, ...) diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 263a9561eb26..755a5388dbca 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -2312,44 +2312,6 @@ TRACE_EVENT(drv_tdls_recv_channel_switch, ) ); -#ifdef CONFIG_MAC80211_MESSAGE_TRACING -#undef TRACE_SYSTEM -#define TRACE_SYSTEM mac80211_msg - -#define MAX_MSG_LEN100 - -DECLARE_EVENT_CLASS(mac80211_msg_event, - TP_PROTO(struct va_format *vaf), - - TP_ARGS(vaf), - - TP_STRUCT__entry( - __dynamic_array(char, msg, MAX_MSG_LEN) - ), - - TP_fast_assign( - WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), - MAX_MSG_LEN, vaf->fmt, - *vaf->va) >= MAX_MSG_LEN); - ), - - TP_printk("%s", __get_str(msg)) -); - -DEFINE_EVENT(mac80211_msg_event, mac80211_info, - TP_PROTO(struct va_format *vaf), - TP_ARGS(vaf) -); -DEFINE_EVENT(mac80211_msg_event, mac80211_dbg, - TP_PROTO(struct va_format *vaf), - TP_ARGS(vaf) -); -DEFINE_EVENT(mac80211_msg_event, mac80211_err, - TP_PROTO(struct va_format *vaf), - TP_ARGS(vaf) -); -#endif - #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ #undef TRACE_INCLUDE_PATH diff --git a/net/mac80211/trace_msg.h b/net/mac80211/trace_msg.h new file mode 100644 index ..768f7c22a190 --- /dev/null +++ b/net/mac80211/trace_msg.h @@ -0,0 +1,53 @@ +#ifdef CONFIG_MAC80211_MESSAGE_TRACING + +#if !defined(__MAC80211_MSG_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ) +#define __MAC80211_MSG_DRIVER_TRACE + +#include +#include +#include "ieee80211_i.h" + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM mac80211_msg + +#define MAX_MSG_LEN100 + +DECLARE_EVENT_CLASS(mac80211_msg_event, + TP_PROTO(struct va_format *vaf), + + TP_ARGS(vaf), + + TP_STRUCT__entry( + __dynamic_array(char, msg, MAX_MSG_LEN) + ), + + TP_fast_assign( + WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), + MAX_MSG_LEN, vaf->fmt, + *vaf->va) >= MAX_MSG_LEN); + ), + + TP_printk("%s", __get_str(msg)) +); + +DEFINE_EVENT(mac80211_msg_event, mac80211_info, + TP_PROTO(struct va_format *vaf), + TP_ARGS(vaf) +); +DEFINE_EVENT(mac80211_msg_event, mac80211_dbg, + TP_PROTO(struct va_format *vaf), + TP_ARGS(vaf) +); +DEFINE_EVENT(mac80211_msg_event, mac80211_err, + TP_PROTO(struct va_format *vaf), + TP_ARGS(vaf) +); +#endif /* !__MAC80211_MSG_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE trace_msg +#include + +#endif -- 1.8.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
ath10k to ath9k IBSS, ath9k has interface-combinations issue
Has anyone tried running ath10k to ath9k IBSS? I'm trying this with a somewhat hacked 4.0-rc6 kernel, and latest wpa_supplicant. ath9k to ath9k works with and without encryption, and ath10k to ath10k works (w/out encryption at least). But, if I try to tell ath10k to connect to ath9k, then the ath9k reports interface combinations issues and will not associate. I've added some debug, and the issue is the 'num==0' part here: int cfg80211_check_combinations(struct wiphy *wiphy, const int num_different_channels, const u8 radar_detect, const int iftype_num[NUM_NL80211_IFTYPES]) { int err, num = 0; err = cfg80211_iter_combinations(wiphy, num_different_channels, radar_detect, iftype_num, cfg80211_iter_sum_ifcombs, &num); if (err) { pr_info("cfg-comb-check: failed to iterate combinations\n"); return err; } if (num == 0) { pr_info("cfg-comb-check: iter-combinations returned num==0\n"); return -EBUSY; } return 0; } EXPORT_SYMBOL(cfg80211_check_combinations); There should be exactly one interface on this radio that is admin-up, and it is the one that I am trying to make run in adhoc mode. Any ideas on this? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.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
[PATCH] staging: vt6655: device_intr check for vif on while loop
vif should never be or go null while in loop. Fixes race condition where interrupts are late and when interface is not present. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/device_main.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 4bb4f8e..5b3de43 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1090,7 +1090,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) * update ISR counter */ STAvUpdate802_11Counter(&pDevice->s802_11Counter, &pDevice->scStatistic, dwMIBCounter); - while (pDevice->dwIsr != 0) { + while (pDevice->dwIsr && pDevice->vif) { STAvUpdateIsrStatCounter(&pDevice->scStatistic, pDevice->dwIsr); MACvWriteISR(pDevice->PortOffset, pDevice->dwIsr); @@ -1102,8 +1102,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) } if (pDevice->dwIsr & ISR_TBTT) { - if (pDevice->vif && - pDevice->op_mode != NL80211_IFTYPE_ADHOC) + if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) vnt_check_bb_vga(pDevice); pDevice->bBeaconSent = false; @@ -1143,19 +1142,15 @@ static irqreturn_t device_intr(int irq, void *dev_instance) max_count += device_tx_srv(pDevice, TYPE_AC0DMA); if (pDevice->dwIsr & ISR_SOFTTIMER1) { - if (pDevice->vif) { - if (pDevice->vif->bss_conf.enable_beacon) - vnt_beacon_make(pDevice, pDevice->vif); - } + if (pDevice->vif->bss_conf.enable_beacon) + vnt_beacon_make(pDevice, pDevice->vif); } /* If both buffers available wake the queue */ - if (pDevice->vif) { - if (AVAIL_TD(pDevice, TYPE_TXDMA0) && - AVAIL_TD(pDevice, TYPE_AC0DMA) && - ieee80211_queue_stopped(pDevice->hw, 0)) - ieee80211_wake_queues(pDevice->hw); - } + if (AVAIL_TD(pDevice, TYPE_TXDMA0) && + AVAIL_TD(pDevice, TYPE_AC0DMA) && + ieee80211_queue_stopped(pDevice->hw, 0)) + ieee80211_wake_queues(pDevice->hw); MACvReadISR(pDevice->PortOffset, &pDevice->dwIsr); -- 2.1.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
[ANN] wireless-regdb: master-2015-04-06
A new release of wireless-regdb (master-2015-04-06) is available at: https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2015.04.06.tar.gz The short log of changes since the 2015-03-13 release is below. Thanks, Seth --- Jouni Malinen (2): wireless-regdb: Update Macau (MO) rules wireless-regdb: Add regulatory rules for Maldives (MV) Seth Forshee (1): wireless-regdb: update regulatory.bin based on preceding changes -- 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] wireless-regdb: Add regulatory rules for Maldives (MV)
On Mon, Mar 30, 2015 at 01:30:41PM +0300, Jouni Malinen wrote: > Source: > http://www.cam.gov.mv/docs/tech_standards/TAM-TS-100-2004-WLAN.pdf > > Signed-off-by: Jouni Malinen Applied, thanks. -- 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] wireless-regdb: Update Macau (MO) rules
On Mon, Mar 30, 2015 at 01:30:22PM +0300, Jouni Malinen wrote: > source: http://www.dsrt.gov.mo/por/laws/198_2014.html > on July 30, 2014 > > Signed-off-by: Jouni Malinen Applied, thanks. -- 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] rtlwifi: rtl8192cu: Remove and replace routine in hw.c and mac.c
I remove duplicated routines which related rtl92cu_set_hw_reg(). 1. rtl92c_set_qos() and HW_VAR_AC_PARAM routine are similar code. so i replace code with rtlpriv->cfg->ops->set_hw_reg(). 2. rtl92c_set_mac_addr() and 'HW_VAR_ETHER_ADDR' case at rtl92cu_set_hw_reg() routine are similar code. so i removed rtl92c_set_mac_addr() function. also it was not used anywhere. 3. remove HW_VAR_ACM_CTRL routine in rtl92cu_set_hw_reg(). if rtl_usb->acm_method is not EACMWAY2_SW, HW_VAR_ACM_CTRL is called from HW_VAR_AC_PARAM. but it never called. because acm_method is always EACMWAY2_SW. so i remove acm_method check routine and HW_VAR_ACM_CTRL routine. both usb and pci interface is not used HW_VAR_ACM_CTRL. but i can't test pci interface module, so i didn't modify pci code. Signed-off-by: Taehee Yoo --- drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 56 +--- drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | 52 +- drivers/net/wireless/rtlwifi/rtl8192cu/mac.h | 1 - 3 files changed, 2 insertions(+), 107 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index be9dba3..8eed922 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c @@ -1609,7 +1609,6 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); - struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); enum wireless_mode wirelessmode = mac->mode; u8 idx = 0; @@ -1818,63 +1817,10 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) u4b_ac_param); break; default: - RT_ASSERT(false, - "SetHwReg8185(): invalid aci: %d !\n", + RT_ASSERT(false, "invalid aci: %d !\n", e_aci); break; } - if (rtlusb->acm_method != EACMWAY2_SW) - rtlpriv->cfg->ops->set_hw_reg(hw, -HW_VAR_ACM_CTRL, &e_aci); - break; - } - case HW_VAR_ACM_CTRL:{ - u8 e_aci = *val; - union aci_aifsn *p_aci_aifsn = (union aci_aifsn *) - (&(mac->ac[0].aifs)); - u8 acm = p_aci_aifsn->f.acm; - u8 acm_ctrl = rtl_read_byte(rtlpriv, REG_ACMHWCTRL); - - acm_ctrl = - acm_ctrl | ((rtlusb->acm_method == 2) ? 0x0 : 0x1); - if (acm) { - switch (e_aci) { - case AC0_BE: - acm_ctrl |= AcmHw_BeqEn; - break; - case AC2_VI: - acm_ctrl |= AcmHw_ViqEn; - break; - case AC3_VO: - acm_ctrl |= AcmHw_VoqEn; - break; - default: - RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, -"HW_VAR_ACM_CTRL acm set failed: eACI is %d\n", -acm); - break; - } - } else { - switch (e_aci) { - case AC0_BE: - acm_ctrl &= (~AcmHw_BeqEn); - break; - case AC2_VI: - acm_ctrl &= (~AcmHw_ViqEn); - break; - case AC3_VO: - acm_ctrl &= (~AcmHw_VoqEn); - break; - default: - RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, -"switch case not processed\n"); - break; - } - } - RT_TRACE(rtlpriv, COMP_QOS, DBG_TRACE, -"SetHwReg8190pci(): [HW_VAR_ACM_CTRL] Write 0x%X\n", -acm_ctrl); - rtl_write_byte(rtlpriv, R
Re: [PATCH] ath9k_htc: check seq number instead of cmd id for timeout
Hi Kalle, can you please apply this patch. Am 06.04.2015 um 08:33 schrieb Fred Chou: > Hi all, > > May I have an update on the patch status please? > > Thanks and regards, > Fred > > On 13/3/2015 4:32 PM, Fred Chou wrote: >> From: Fred Chou >> >> As the driver may send multiple wmi commands with identical cmd id, >> it is more robust to check seq number for timeout instead. >> >> Signed-off-by: Fred Chou >> --- >> drivers/net/wireless/ath/ath9k/wmi.c | 12 ++-- >> drivers/net/wireless/ath/ath9k/wmi.h | 2 +- >> 2 files changed, 7 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath9k/wmi.c >> b/drivers/net/wireless/ath/ath9k/wmi.c >> index 65c8894..aba909f 100644 >> --- a/drivers/net/wireless/ath/ath9k/wmi.c >> +++ b/drivers/net/wireless/ath/ath9k/wmi.c >> @@ -224,7 +224,7 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff >> *skb, >> >> /* Check if there has been a timeout. */ >> spin_lock(&wmi->wmi_lock); >> -if (cmd_id != wmi->last_cmd_id) { >> +if (be16_to_cpu(hdr->seq_no) != wmi->last_seq_id) { >> spin_unlock(&wmi->wmi_lock); >> goto free_skb; >> } >> @@ -272,11 +272,16 @@ static int ath9k_wmi_cmd_issue(struct wmi *wmi, >> enum wmi_cmd_id cmd, u16 len) >> { >> struct wmi_cmd_hdr *hdr; >> +unsigned long flags; >> >> hdr = (struct wmi_cmd_hdr *) skb_push(skb, sizeof(struct wmi_cmd_hdr)); >> hdr->command_id = cpu_to_be16(cmd); >> hdr->seq_no = cpu_to_be16(++wmi->tx_seq_id); >> >> +spin_lock_irqsave(&wmi->wmi_lock, flags); >> +wmi->last_seq_id = wmi->tx_seq_id; >> +spin_unlock_irqrestore(&wmi->wmi_lock, flags); >> + >> return htc_send_epid(wmi->htc, skb, wmi->ctrl_epid); >> } >> >> @@ -292,7 +297,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id >> cmd_id, >> struct sk_buff *skb; >> u8 *data; >> int time_left, ret = 0; >> -unsigned long flags; >> >> if (ah->ah_flags & AH_UNPLUGGED) >> return 0; >> @@ -320,10 +324,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id >> cmd_id, >> wmi->cmd_rsp_buf = rsp_buf; >> wmi->cmd_rsp_len = rsp_len; >> >> -spin_lock_irqsave(&wmi->wmi_lock, flags); >> -wmi->last_cmd_id = cmd_id; >> -spin_unlock_irqrestore(&wmi->wmi_lock, flags); >> - >> ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len); >> if (ret) >> goto out; >> diff --git a/drivers/net/wireless/ath/ath9k/wmi.h >> b/drivers/net/wireless/ath/ath9k/wmi.h >> index 0db37f2..2aad6dc 100644 >> --- a/drivers/net/wireless/ath/ath9k/wmi.h >> +++ b/drivers/net/wireless/ath/ath9k/wmi.h >> @@ -143,7 +143,7 @@ struct wmi { >> enum htc_endpoint_id ctrl_epid; >> struct mutex op_mutex; >> struct completion cmd_wait; >> -enum wmi_cmd_id last_cmd_id; >> +u16 last_seq_id; >> struct sk_buff_head wmi_event_queue; >> struct tasklet_struct wmi_event_tasklet; >> u16 tx_seq_id; >> > -- > 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 > -- Regards, Oleksij signature.asc Description: OpenPGP digital signature