[PATCH v2] ath10k: remove unused variable 'id' in ath10k_pci_tx_pipe_cleanup()
mete_data is extracted from ce descriptor and stored in variable 'id'. later, id is not used anywhere in the same function. Fixes: d84a512dca23 (ath10k: remove transfer_id from ath10k_hif_cb::tx_completion) Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- V2 changes: - added original commit msg detail in commit log which introduced this unused variable. drivers/net/wireless/ath/ath10k/pci.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 969a123..bbc349a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1275,7 +1275,6 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) struct ath10k_ce_ring *ce_ring; struct ce_desc *ce_desc; struct sk_buff *skb; - unsigned int id; int i; ar = pci_pipe-hif_ce_state; @@ -1299,8 +1298,6 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) continue; ce_ring-per_transfer_context[i] = NULL; - id = MS(__le16_to_cpu(ce_desc[i].flags), - CE_DESC_FLAGS_META_DATA); ar_pci-msg_callbacks_current.tx_completion(ar, skb); } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/2] staging: wilc1000: Cleanup to coreconfigurator
Fixed several syntax/style issues found with checkpatch.pl. Signed-off-by: Stanislav Kholmanskikh kholmanskikh@gmail.com --- Changes since V2: * The first 2 patches were removed, because what they fix is already fixed now. drivers/staging/wilc1000/coreconfigurator.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index e3e3f20..43864dc 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -28,7 +28,7 @@ #define INVALID 255 #define MAC_ADDR_LEN6 #define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \ - BEACON_INTERVAL_LEN + CAP_INFO_LEN) +BEACON_INTERVAL_LEN + CAP_INFO_LEN) /*/ /* Function Macros */ @@ -672,14 +672,14 @@ INLINE WILC_Uint16 get_asoc_id(u8 *data) WILC_Sint32 CoreConfiguratorInit(void) { WILC_Sint32 s32Error = WILC_SUCCESS; - PRINT_D(CORECONFIG_DBG, CoreConfiguratorInit() \n); + PRINT_D(CORECONFIG_DBG, CoreConfiguratorInit()\n); sema_init(SemHandleSendPkt, 1); sema_init(SemHandlePktResp, 0); gps8ConfigPacket = (WILC_Sint8 *)WILC_MALLOC(MAX_PACKET_BUFF_SIZE); if (gps8ConfigPacket == NULL) { - PRINT_ER(failed in gps8ConfigPacket allocation \n); + PRINT_ER(failed in gps8ConfigPacket allocation\n); s32Error = WILC_NO_MEM; goto _fail_; } @@ -710,13 +710,13 @@ u8 *get_tim_elm(u8 *pu8msa, WILC_Uint16 u16RxLen, WILC_Uint16 u16TagParamOffset) /* Search for the TIM Element Field and return if the element is found */ while (u16index (u16RxLen - FCS_LEN)) { if (pu8msa[u16index] == ITIM) { - return(pu8msa[u16index]); + return pu8msa[u16index]; } else { u16index += (IE_HDR_LEN + pu8msa[u16index + 1]); } } - return(0); + return 0; } /* This function gets the current channel information from @@ -728,7 +728,7 @@ u8 get_current_channel_802_11n(u8 *pu8msa, WILC_Uint16 u16RxLen) index = TAG_PARAM_OFFSET; while (index (u16RxLen - FCS_LEN)) { if (pu8msa[index] == IDSPARMS) - return (pu8msa[index + 2]); + return pu8msa[index + 2]; else /* Increment index by length information and header */ index += pu8msa[index + 1] + IE_HDR_LEN; @@ -750,7 +750,7 @@ u8 get_current_channel(u8 *pu8msa, WILC_Uint16 u16RxLen) #else /* FIVE_GHZ_BAND */ /* Extract current channel information from */ /* the beacon/probe response frame */ - return (get_current_channel_802_11n(pu8msa, u16RxLen)); + return get_current_channel_802_11n(pu8msa, u16RxLen); #endif /* FIVE_GHZ_BAND */ #else return 0; @@ -1444,7 +1444,7 @@ void ProcessAdrWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, void ProcessBinWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen, tstrWID *pstrWID, u8 *pu8val, WILC_Sint32 s32ValueSize) { - /* WILC_ERROR(processing Binary WIDs is not supported \n); */ + /* WILC_ERROR(processing Binary WIDs is not supported\n); */ WILC_Uint16 u16MsgLen = 0; WILC_Uint16 idx= 0; @@ -1583,7 +1583,7 @@ WILC_Sint32 further_process_response(u8 *resp, WILC_memcpy(pstrWIDresult-ps8WidVal, cfg_str, cfg_len); /* mostafa: no need currently for the extra NULL byte */ pstrWIDresult-s32ValueSize = cfg_len; } else { - PRINT_ER(allocated WID buffer length is smaller than the received WID Length \n); + PRINT_ER(allocated WID buffer length is smaller than the received WID Length\n); retval = -2; } @@ -2027,7 +2027,7 @@ WILC_Sint32 ConfigProvideResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32RespLe } else { WILC_memcpy(gstrConfigPktInfo.pcRespBuffer, pcRespBuffer, gstrConfigPktInfo.s32MaxRespBuffLen); gstrConfigPktInfo.s32BytesRead = gstrConfigPktInfo.s32MaxRespBuffLen; - PRINT_ER(BusProvideResponse() Response greater than the prepared Buffer Size \n); + PRINT_ER(BusProvideResponse() Response greater than the prepared Buffer Size\n); } up(SemHandlePktResp); @@ -2076,7 +2076,7 @@ WILC_Sint32 ConfigPktReceived(u8 *pu8RxPacket, WILC_Sint32 s32RxPacketLen) break; default: -
Re: [PATCH 1/2] ath10k: add cryptmode param to support sw crypto and raw tx injection.
On 1 June 2015 at 21:44, David Liu cfliu...@gmail.com wrote: [...] --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -91,6 +91,7 @@ struct ath10k_skb_cb { u8 tid; u16 freq; bool is_offchan; + bool nohwcrypt; struct ath10k_htt_txbuf *txbuf; u32 txbuf_paddr; } __packed htt; @@ -349,6 +350,7 @@ struct ath10k_vif { } u; bool use_cts_prot; + bool nohwcrypt; So this is a bit confusing. This is used only for tx policy only, right? It should be named accordingly then. The other nohwcrypt in skb_cb pretty much implies Tx already. [...] @@ -484,6 +491,12 @@ enum ath10k_dev_flags { * waiters should immediately cancel instead of waiting for a time out. */ ATH10K_FLAG_CRASH_FLUSH, + + /* Use Raw mode for Tx and Rx */ + ATH10K_RAW_MODE, + + /* Disable HW crypto engine */ + ATH10K_HW_CRYPTO_DISABLED, You're missing the _FLAG prefix. Also this isn't documented well enough. RAW_MODE implies sw crypto rx, no? Perhaps a more fine grained approach would be better: ATH10K_FLAG_RAW_TX, ATH10K_FLAG_RAW_RX, ATH10K_FLAG_SW_TX_CRYPTO, ATH10K_FLAG_SW_RX_CRYPTO, Obviously not all combinations are valid/doable but I think this will make the code look more obvious. }; enum ath10k_cal_mode { @@ -492,6 +505,15 @@ enum ath10k_cal_mode { ATH10K_CAL_MODE_DT, }; +enum ath10k_crypt_mode { + /* Use HW crypto engine only */ + ATH10K_CRYPT_MODE_HW, + /* HW SW crypto engine only (ie. HW crypto engine disabled) */ + ATH10K_CRYPT_MODE_SW, + /* Both SW HW crypto engine supported */ + ATH10K_CRYPT_MODE_HW_SW, I don't think this is clear enough (and the comments don't help at all): ATH10K_CRYPT_MODE_HW, ATH10K_CRYPT_MODE_SW, ATH10K_CRYPT_MODE_SW_RX_HW_TX, It would also be nice to have some sort of indication in driver logs/dmesg (without any debug_masks) as to what crypto mode driver uses so that if someone reports a bug we can quickly see their base configuration. Having it completely configurable during runtime is a bit of a pain in this regard though.. but most people will likely just set cryptmode in modprobe.conf or something. Thoughts? +}; + static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode) { switch (mode) { diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 89eb16b..a7df05d 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1018,8 +1018,7 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar, /* In most cases this will be true for sniffed frames. It makes sense * to deliver them as-is without stripping the crypto param. This would -* also make sense for software based decryption (which is not -* implemented in ath10k). +* also make sense for software based decryption. I guess you should update the comment even more. The would doesn't fit anymore. Instead: This is necessary for software crypto too. Nonetheless kudos for taking care to update comments. [...] diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 85cca29..37fd2f83 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -296,7 +296,7 @@ enum ath10k_hw_rate_cck { #define TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1 #define TARGET_10X_VOW_CONFIG 0 #define TARGET_10X_NUM_MSDU_DESC (1024 + 400) -#define TARGET_10X_MAX_FRAG_ENTRIES0 +#define TARGET_10X_MAX_FRAG_ENTRIES10 This is probably enough at 2 (ath10k doesn't send more than 2 tx fragments now). I assume fw crashes with raw tx if this isn't fixed, correct? Sidenote: I guess TARGET_MAX_FRAG_ENTRIES could be fixed as well. It might make sense for QCA61X4 hw2.1 which still uses the old Rx indication event and might be able to do raw txrx + swcrypto. But I'm a bit reluctant to change this without any testing. [...] diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 77220b0..1202150 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -508,7 +508,7 @@ static struct wmi_vdev_param_map wmi_10x_vdev_param_map = { .txbf = WMI_VDEV_PARAM_UNSUPPORTED, .packet_powersave = WMI_VDEV_PARAM_UNSUPPORTED, .drop_unencry = WMI_VDEV_PARAM_UNSUPPORTED, - .tx_encap_type = WMI_VDEV_PARAM_UNSUPPORTED, + .tx_encap_type = WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE, Hmm.. Technically this isn't correct because 10.1 doesn't support this vdev parameter. Practically this might not matter since 10.1 won't ever have the appropriate
[PATCH] staging: wilc1000: fix warning while printing
size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, len2, (sizeof(wb) / sizeof(wb[0]))); result = N_FAIL; return result; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb..6fdb0d6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -638,7 +638,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } - PRINT_D(CFG80211_DBG, Association request info elements length = %d\n, pstrConnectInfo-ReqIEsLen); + PRINT_D(CFG80211_DBG, Association request info elements length = %zu\n, pstrConnectInfo-ReqIEsLen); PRINT_D(CFG80211_DBG, Association response info elements length = %d\n, pstrConnectInfo-u16RespIEsLen); @@ -778,7 +778,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r } PRINT_D(CFG80211_DBG, Requested num of scan channel %d\n, request-n_channels); - PRINT_D(CFG80211_DBG, Scan Request IE len = %d\n, request-ie_len); + PRINT_D(CFG80211_DBG, Scan Request IE len = %zu\n, request-ie_len); PRINT_D(CFG80211_DBG, Number of SSIDs %d\n, request-n_ssids); @@ -3316,7 +3316,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, Starting ap\n); - PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n, + PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %zu Tail length = %zu\n, settings-beacon_interval, settings-dtim_period, beacon-head_len, beacon-tail_len); s32Error = WILC_WFI_CfgSetChannel(wiphy, settings-chandef); -- 1.8.1.2 -- 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: iwlwifi/iwlmvm dies on resume when rfkill is set
On Mon, 2015-06-01 at 23:30 +, Grumbach, Emmanuel wrote: On Mon, 2015-06-01 at 15:51 -0700, Andy Lutomirski wrote: If I switch my laptop into airplane mode (hardware switch) and then suspend and resume, my wireless is dead on resume and it spews all over the kernel log (see below). I can rescue it by switching airplane mode off and then suspending and resuming again. This one is tracked here: https://bugzilla.kernel.org/show_bug.cgi?id=98591 This problem has existed on all kernel versions I've tried, although I haven't tried a 4.0 kernel yet. This is a tricky HW timing issues which (as you can imagine) we can't reproduce internally. You seem to have a LENOVO whereas the submitted of the bugzilla above has some other OEM. We are currently checking with our System people (who know the HW) how we should address that. Right, I'm investigating this. The problem seems to be a quick toggle of the rfkill interrupt that may be caused by the way we reset the device when resuming. I have involved our System and HW people and I'll let you know how it is going as soon as I have more info. Thanks for reporting! -- Luca. N�r��yb�X��ǧv�^�){.n�+{��*ޕ�,�{ay�ʇڙ�,j��f���h���z��w��� ���j:+v���w�j�mzZ+�ݢj��!�i
[PATCH] ath9k: fix DMA stop sequence for AR9003+
AR93xx and newer needs to stop rx before tx to avoid getting the DMA engine or MAC into a stuck state. This should reduce/fix the occurence of Failed to stop Tx DMA logspam. Cc: sta...@vger.kernel.org Signed-off-by: Felix Fietkau n...@openwrt.org --- drivers/net/wireless/ath/ath9k/main.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index d285e3a..cfd45cb 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -216,11 +216,13 @@ static bool ath_prepare_reset(struct ath_softc *sc) ath_stop_ani(sc); ath9k_hw_disable_interrupts(ah); - if (!ath_drain_all_txq(sc)) - ret = false; - - if (!ath_stoprecv(sc)) - ret = false; + if (AR_SREV_9300_20_OR_LATER(ah)) { + ret = ath_stoprecv(sc); + ret = ath_drain_all_txq(sc); + } else { + ret = ath_drain_all_txq(sc); + ret = ath_stoprecv(sc); + } return ret; } -- 2.2.2 -- 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: debian: crda package depends on iw?
On Fri, 2015-05-29 at 14:47 +0100, Ben Hutchings wrote: On Fri, 2015-05-29 at 16:24 +0300, Luca Coelho wrote: Hi Ben, I just noticed that the crda package depends on the iw package in Debian (I'm using jessie): luca@weizen:~$ apt-cache show crda Package: crda Version: 3.13-1 Installed-Size: 293 Maintainer: Ben Hutchings b...@decadent.org.uk Architecture: amd64 Depends: libc6 (= 2.7), libnl-3-200 (= 3.2.7), libnl-genl-3-200 (= 3.2.7), libssl1.0.0 (= 1.0.0), wireless-regdb, iw (= 3.2-1~) Description-en: wireless Central Regulatory Domain Agent This package provides a Central Regulatory Domain Agent (CRDA) to be used by the Linux kernel cfg80211 wireless subsystem to query and apply the regulatory domain settings wireless devices may operate within for a given location. . CRDA queries operational frequency regulations stored within the regulatory database provided by the wireless-regdb package. Description-md5: bacfc9c20ed2cf2120d3c95c8e749666 Multi-Arch: foreign Homepage: http://wireless.kernel.org/en/developers/Regulatory/CRDA Tag: role::program Section: net Priority: optional Filename: pool/main/c/crda/crda_3.13-1_amd64.deb Size: 59958 MD5sum: 6eacfbb62c7647ee3bba653ee5adfe70 SHA1: 0f02aebc61f68b87189c867369dbd5df74f4e5ca SHA256: 52d114e826944a492d68b3e4e77aed0f9c28f6a7c3d5c587027eb283f2cc Is there a specific reason for this or is it just accidental? setregdomain is a script that runs iw. Ah, okay, thanks for clarifying! I wasn't expecting this dependency. -- Cheers, Luca. -- 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] staging: wilc1000: fix warning while printing
On Tue, Jun 02, 2015 at 10:29:17AM +0200, Konrad Zapalowicz wrote: On 06/02, Sudip Mukherjee wrote: size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, Hi, it seems that the above line should use %zu too. Am I correct or I'm missing something? oops. my mistake. %lu is correct but i missed mentioning the warning about long unsigned int in the commit message. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] staging: wilc1000: fix warning while printing
size_t should print using %zu and unsigned long int should use %lu but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- v2: missed mentioning unsigned long int in commit message. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, len2, (sizeof(wb) / sizeof(wb[0]))); result = N_FAIL; return result; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb..6fdb0d6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -638,7 +638,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } - PRINT_D(CFG80211_DBG, Association request info elements length = %d\n, pstrConnectInfo-ReqIEsLen); + PRINT_D(CFG80211_DBG, Association request info elements length = %zu\n, pstrConnectInfo-ReqIEsLen); PRINT_D(CFG80211_DBG, Association response info elements length = %d\n, pstrConnectInfo-u16RespIEsLen); @@ -778,7 +778,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r } PRINT_D(CFG80211_DBG, Requested num of scan channel %d\n, request-n_channels); - PRINT_D(CFG80211_DBG, Scan Request IE len = %d\n, request-ie_len); + PRINT_D(CFG80211_DBG, Scan Request IE len = %zu\n, request-ie_len); PRINT_D(CFG80211_DBG, Number of SSIDs %d\n, request-n_ssids); @@ -3316,7 +3316,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, Starting ap\n); - PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n, + PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %zu Tail length = %zu\n, settings-beacon_interval, settings-dtim_period, beacon-head_len, beacon-tail_len); s32Error = WILC_WFI_CfgSetChannel(wiphy, settings-chandef); -- 1.8.1.2 -- 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 7/7] mac80211: Switch to new AEAD interface
On Mon, Jun 01, 2015 at 05:36:58PM +0200, Stephan Mueller wrote: Am Montag, 1. Juni 2015, 16:35:26 schrieb Johannes Berg: IOW, I think something like this would make sense: That looks definitely cleaner :-) Indeed.. That AAD length-in-the-buffer design came from the over ten year old code that was optimized to cover the CCM construction with the same buffer and that was not cleaned up when this was converted to use cryptoapi couple of years ago. Though, my main concern was just to ensure that the aad length value is not zero. It won't be in IEEE 802.11 use cases. The exact length depends on the IEEE 802.11 frame type, but AAD is constructed in a way that it is normally a bit over 20 octets while allowing CCM to fit the related operations into two AES blocks. -- Jouni MalinenPGP id EFC895FA -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] ath10k: Debugfs entry to enable/disable WLANBlutooth Coexist feature
On Thu, 28 May 2015 12:19:05 -0700, Yanbo Li wrote: As some radio have no connection with BT modules, enable the WLAN/Bluetooth coexist(BTC) feature will has some side effect if the radio's GPIO connect with any other HW modules. Add the control switcher btc_feature at debugfs and set the feature as disable by default to avoid such case. To enable this feature, execute: echo 1 /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature To disable: echo 0 /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature Signed-off-by: Yanbo Li yan...@qca.qualcomm.com IMHO common API for disabling/enabling btcoex is something we would all benefit from and easy enough to implement properly. Burying it in driver-specific debugfs is less than appropriate. I seem to recall there were plans to discuss btcoex at one of the linux-wireless summits. If the consensus was to leave it in debugfs then I apologize for the noise ;) -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ath10k: remove unused variable 'id' in ath10k_pci_tx_pipe_cleanup()
On 2 June 2015 at 09:14, Raja Mani rm...@qti.qualcomm.com wrote: mete_data is extracted from ce descriptor and stored in variable 'id'. later, id is not used anywhere in the same function. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/pci.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 969a123..bbc349a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1275,7 +1275,6 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) struct ath10k_ce_ring *ce_ring; struct ce_desc *ce_desc; struct sk_buff *skb; - unsigned int id; int i; ar = pci_pipe-hif_ce_state; @@ -1299,8 +1298,6 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) continue; ce_ring-per_transfer_context[i] = NULL; - id = MS(__le16_to_cpu(ce_desc[i].flags), - CE_DESC_FLAGS_META_DATA); ar_pci-msg_callbacks_current.tx_completion(ar, skb); Good catch. I forgot to remove this. I guess one could say this qualifies as: Fixes: d84a512dca23 (ath10k: remove transfer_id from ath10k_hif_cb::tx_completion) 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] ath10k: remove unused variable 'id' in ath10k_pci_tx_pipe_cleanup()
mete_data is extracted from ce descriptor and stored in variable 'id'. later, id is not used anywhere in the same function. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/pci.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 969a123..bbc349a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1275,7 +1275,6 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) struct ath10k_ce_ring *ce_ring; struct ce_desc *ce_desc; struct sk_buff *skb; - unsigned int id; int i; ar = pci_pipe-hif_ce_state; @@ -1299,8 +1298,6 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) continue; ce_ring-per_transfer_context[i] = NULL; - id = MS(__le16_to_cpu(ce_desc[i].flags), - CE_DESC_FLAGS_META_DATA); ar_pci-msg_callbacks_current.tx_completion(ar, skb); } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: fix warning while printing
On 06/02, Sudip Mukherjee wrote: size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, Hi, it seems that the above line should use %zu too. Am I correct or I'm missing something? - konrad len2, (sizeof(wb) / sizeof(wb[0]))); result = N_FAIL; return result; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb..6fdb0d6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -638,7 +638,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } - PRINT_D(CFG80211_DBG, Association request info elements length = %d\n, pstrConnectInfo-ReqIEsLen); + PRINT_D(CFG80211_DBG, Association request info elements length = %zu\n, pstrConnectInfo-ReqIEsLen); PRINT_D(CFG80211_DBG, Association response info elements length = %d\n, pstrConnectInfo-u16RespIEsLen); @@ -778,7 +778,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r } PRINT_D(CFG80211_DBG, Requested num of scan channel %d\n, request-n_channels); - PRINT_D(CFG80211_DBG, Scan Request IE len = %d\n, request-ie_len); + PRINT_D(CFG80211_DBG, Scan Request IE len = %zu\n, request-ie_len); PRINT_D(CFG80211_DBG, Number of SSIDs %d\n, request-n_ssids); @@ -3316,7 +3316,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, Starting ap\n); - PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n, + PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %zu Tail length = %zu\n, settings-beacon_interval, settings-dtim_period, beacon-head_len, beacon-tail_len); s32Error = WILC_WFI_CfgSetChannel(wiphy, settings-chandef); -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel -- 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] staging: wilc1000: fix warning while printing
On Tue, Jun 02, 2015 at 10:58:40AM +0200, Konrad Zapalowicz wrote: On 06/02, Sudip Mukherjee wrote: On Tue, Jun 02, 2015 at 10:29:17AM +0200, Konrad Zapalowicz wrote: On 06/02, Sudip Mukherjee wrote: size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, Hi, it seems that the above line should use %zu too. Am I correct or I'm missing something? oops. my mistake. %lu is correct but i missed mentioning the warning about long unsigned int in the commit message. Why %lu here and %zu in other places? I mean that it is the same size_t or I'm missing something? no, this is unsigned long int. The warning here was: drivers/staging/wilc1000/wilc_spi.c:407:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat] so size_t used %zu and unsigned long int should use %lu regards sudip - konrad regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] staging: wilc1000: Fix some compile time warnings
On Tue, Jun 02, 2015 at 01:55:20PM +0900, Greg KH wrote: On Mon, Jun 01, 2015 at 09:56:18PM +0300, Stanislav Kholmanskikh wrote: Signed-off-by: Stanislav Kholmanskikh kholmanskikh@gmail.com --- Changes since V1: Split the V1 series into more logically unrelated patches and updated patch descriptions accordingly. This series doesn't apply on my tree due to other changes from someone else that I just took. Can you rebase it and resend? Sure. Done. I cut off the first two patches, because they are redundant now. Thanks. thanks, greg k-h -- 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 TX PN to public part of key struct
From: Johannes Berg johannes.b...@intel.com For drivers supporting TSO or similar features, but that still have PN assignment in software, there's a need to have some memory to store the current PN value. As mac80211 already stores this and it's somewhat complicated to add a per-driver area to the key struct (due to the dynamic sizing thereof) it makes sense to just move the TX PN to the keyconf, i.e. the public part of the key struct. As TKIP is more complicated and we won't able to offload it in this way right now (fast-xmit is skipped for TKIP unless the HW does it all, and our hardware needs MMIC calculation in software) I've not moved that for now - it's possible but requires exposing a lot of the internal TKIP state. As an bonus side effect, we can remove a lot of code by assuming the keyseq struct has a certain layout - with BUILD_BUG_ON to verify it. This might also improve performance, since now TX and RX no longer share a cacheline. Reviewed-by: Emmanuel Grumbach emmanuel.grumb...@intel.com Signed-off-by: Johannes Berg johannes.b...@intel.com --- include/net/mac80211.h | 4 +++ net/mac80211/cfg.c | 59 ++ net/mac80211/debugfs_key.c | 17 +- net/mac80211/key.c | 80 +- net/mac80211/key.h | 4 --- net/mac80211/tx.c | 10 +- net/mac80211/wpa.c | 10 +++--- 7 files changed, 42 insertions(+), 142 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 887fe95b9805..39e864b35083 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1479,6 +1479,9 @@ enum ieee80211_key_flags { * wants to be given when a frame is transmitted and needs to be * encrypted in hardware. * @cipher: The key's cipher suite selector. + * @tx_pn: PN used for TX on non-TKIP keys, may be used by the driver + * as well if it needs to do software PN assignment by itself + * (e.g. due to TSO) * @flags: key flags, see enum ieee80211_key_flags. * @keyidx: the key index (0-3) * @keylen: key material length @@ -1491,6 +1494,7 @@ enum ieee80211_key_flags { * @iv_len: The IV length for this key type */ struct ieee80211_key_conf { + atomic64_t tx_pn; u32 cipher; u8 icv_len; u8 iv_len; diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index bb9f83640b46..02f48c848ef5 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -361,66 +361,25 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, break; case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_CCMP_256: - if (key-flags KEY_FLAG_UPLOADED_TO_HARDWARE - !(key-conf.flags IEEE80211_KEY_FLAG_GENERATE_IV)) { - drv_get_key_seq(sdata-local, key, kseq); - memcpy(seq, kseq.ccmp.pn, 6); - } else { - pn64 = atomic64_read(key-u.ccmp.tx_pn); - seq[0] = pn64; - seq[1] = pn64 8; - seq[2] = pn64 16; - seq[3] = pn64 24; - seq[4] = pn64 32; - seq[5] = pn64 40; - } - params.seq = seq; - params.seq_len = 6; - break; case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_BIP_CMAC_256: - if (key-flags KEY_FLAG_UPLOADED_TO_HARDWARE - !(key-conf.flags IEEE80211_KEY_FLAG_GENERATE_IV)) { - drv_get_key_seq(sdata-local, key, kseq); - memcpy(seq, kseq.aes_cmac.pn, 6); - } else { - pn64 = atomic64_read(key-u.aes_cmac.tx_pn); - seq[0] = pn64; - seq[1] = pn64 8; - seq[2] = pn64 16; - seq[3] = pn64 24; - seq[4] = pn64 32; - seq[5] = pn64 40; - } - params.seq = seq; - params.seq_len = 6; - break; + BUILD_BUG_ON(offsetof(typeof(kseq), ccmp) != +offsetof(typeof(kseq), aes_cmac)); case WLAN_CIPHER_SUITE_BIP_GMAC_128: case WLAN_CIPHER_SUITE_BIP_GMAC_256: - if (key-flags KEY_FLAG_UPLOADED_TO_HARDWARE - !(key-conf.flags IEEE80211_KEY_FLAG_GENERATE_IV)) { - drv_get_key_seq(sdata-local, key, kseq); - memcpy(seq, kseq.aes_gmac.pn, 6); - } else { - pn64 = atomic64_read(key-u.aes_gmac.tx_pn); - seq[0] = pn64; - seq[1] = pn64 8; - seq[2] = pn64 16; - seq[3] = pn64 24; - seq[4] = pn64 32; - seq[5] = pn64 40; -
Re: [PATCH 1/2] ath10k: add cryptmode param to support sw crypto and raw tx injection.
On Tue, Jun 2, 2015 at 12:17 AM, Michal Kazior michal.kaz...@tieto.com wrote: On 1 June 2015 at 21:44, David Liu cfliu...@gmail.com wrote: [...] --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -91,6 +91,7 @@ struct ath10k_skb_cb { u8 tid; u16 freq; bool is_offchan; + bool nohwcrypt; struct ath10k_htt_txbuf *txbuf; u32 txbuf_paddr; } __packed htt; @@ -349,6 +350,7 @@ struct ath10k_vif { } u; bool use_cts_prot; + bool nohwcrypt; So this is a bit confusing. This is used only for tx policy only, right? It should be named accordingly then. The other nohwcrypt in skb_cb pretty much implies Tx already. No, it's also for Rx. In this patch, in mac.c, if arvif-nohwcrypt is set, ath10k_send_key() won't install the actual key to hardware, but a clear key is installed. This makes all matching STA's encrypted frame passthrough HW and mac80211 can take care of decryption later in host. (in patch V2 I will take care of the IEEE80211_HW_SW_CRYPTO_CONTROL setting) [...] @@ -484,6 +491,12 @@ enum ath10k_dev_flags { * waiters should immediately cancel instead of waiting for a time out. */ ATH10K_FLAG_CRASH_FLUSH, + + /* Use Raw mode for Tx and Rx */ + ATH10K_RAW_MODE, + + /* Disable HW crypto engine */ + ATH10K_HW_CRYPTO_DISABLED, You're missing the _FLAG prefix. Also this isn't documented well enough. RAW_MODE implies sw crypto rx, no? Perhaps a more fine grained approach would be better: Thanks. Will fix. Raw mode doesn't imply SW crypto only. Indeed Raw mode is the only way to get sw crypto support, but it also supports HW crypto. I just tested both HW/SW crypto cases working fine in raw mode. So my plan for the new cryptmode parameter has 3 values: 0Use HW crypto engine only. This uses native WiFi mode Tx/Rx encap 1Use SW crypto engine only. This uses raw mode Tx/Rx encap 2Supports both SW HW crypto engine. This uses raw mode Tx/Rx encap. Once this patch is in, I guess people would only use cryptmode=0 or 1. For cryptmode=2, I have subsequent changes to allow per BSS based control of HW/SW crypto selection. Plan is to make make arvif-nohwcrypt configurable via debugfs or nl80211 (subject to review feedback) ATH10K_FLAG_RAW_TX, ATH10K_FLAG_RAW_RX, ATH10K_FLAG_SW_TX_CRYPTO, ATH10K_FLAG_SW_RX_CRYPTO, Obviously not all combinations are valid/doable but I think this will make the code look more obvious. That would be too many flags and too complex. I'd suggest keep the proposed ATH10K_RAW_MODE and ATH10K_HW_CRYPTO_DISABLED. Let's make Tx/Rx HW crypto always both enabled or both disabled AFA driver is concerned. Ben's CT 10.1 FW is a special use case and would fit into cryptmode=0 where his FW internally does the magic to disable HW Rx which is independent to the driver. Once Ben's FW is ready for raw mode, driver then can switch to use cryptmode=1 or 2. }; enum ath10k_cal_mode { @@ -492,6 +505,15 @@ enum ath10k_cal_mode { ATH10K_CAL_MODE_DT, }; +enum ath10k_crypt_mode { + /* Use HW crypto engine only */ + ATH10K_CRYPT_MODE_HW, + /* HW SW crypto engine only (ie. HW crypto engine disabled) */ + ATH10K_CRYPT_MODE_SW, + /* Both SW HW crypto engine supported */ + ATH10K_CRYPT_MODE_HW_SW, I don't think this is clear enough (and the comments don't help at all): ATH10K_CRYPT_MODE_HW, ATH10K_CRYPT_MODE_SW, ATH10K_CRYPT_MODE_SW_RX_HW_TX, It would also be nice to have some sort of indication in driver logs/dmesg (without any debug_masks) as to what crypto mode driver uses so that if someone reports a bug we can quickly see their base configuration. Having it completely configurable during runtime is a bit of a pain in this regard though.. but most people will likely just set cryptmode in modprobe.conf or something. Thoughts? I will add a log line to print the cryptmode param value. +}; + static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode) { switch (mode) { diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 89eb16b..a7df05d 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1018,8 +1018,7 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar, /* In most cases this will be true for sniffed frames. It makes sense * to deliver them as-is without stripping the crypto param. This would -* also make sense for software based decryption (which is not -* implemented in ath10k). +* also make sense for software based decryption. I guess you should update the comment even more. The would doesn't fit anymore. Instead: This is necessary for software
[PATCH 1/4] mt7601u: unify paged and non-paged RX dma paths
From: Jakub Kicinski kubak...@wp.pl Signed-off-by: Jakub Kicinski kubak...@wp.pl --- drivers/net/wireless/mediatek/mt7601u/dma.c | 62 ++--- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c index 9c9e1288644b..16df67b2e62c 100644 --- a/drivers/net/wireless/mediatek/mt7601u/dma.c +++ b/drivers/net/wireless/mediatek/mt7601u/dma.c @@ -34,56 +34,28 @@ static unsigned int ieee80211_get_hdrlen_from_buf(const u8 *data, unsigned len) static struct sk_buff * mt7601u_rx_skb_from_seg(struct mt7601u_dev *dev, struct mt7601u_rxwi *rxwi, - u8 *data, u32 seg_len) + void *data, u32 seg_len, u32 truesize, struct page *p) { struct sk_buff *skb; u32 true_len; + int hdr_len, copy, frag; - if (rxwi-rxinfo cpu_to_le32(MT_RXINFO_L2PAD)) - seg_len -= 2; - - skb = alloc_skb(seg_len, GFP_ATOMIC); - if (!skb) - return NULL; - - if (rxwi-rxinfo cpu_to_le32(MT_RXINFO_L2PAD)) { - int hdr_len = ieee80211_get_hdrlen_from_buf(data, seg_len); - - memcpy(skb_put(skb, hdr_len), data, hdr_len); - data += hdr_len + 2; - seg_len -= hdr_len; - } - - memcpy(skb_put(skb, seg_len), data, seg_len); - - true_len = mt76_mac_process_rx(dev, skb, skb-data, rxwi); - skb_trim(skb, true_len); - - return skb; -} - -static struct sk_buff * -mt7601u_rx_skb_from_seg_paged(struct mt7601u_dev *dev, - struct mt7601u_rxwi *rxwi, void *data, - u32 seg_len, u32 truesize, struct page *p) -{ - unsigned int hdr_len = ieee80211_get_hdrlen_from_buf(data, seg_len); - unsigned int true_len, copy, frag; - struct sk_buff *skb; - - skb = alloc_skb(128, GFP_ATOMIC); + skb = alloc_skb(p ? 128 : seg_len, GFP_ATOMIC); if (!skb) return NULL; true_len = mt76_mac_process_rx(dev, skb, data, rxwi); + hdr_len = ieee80211_get_hdrlen_from_buf(data, true_len); if (rxwi-rxinfo cpu_to_le32(MT_RXINFO_L2PAD)) { memcpy(skb_put(skb, hdr_len), data, hdr_len); + data += hdr_len + 2; true_len -= hdr_len; hdr_len = 0; } + /* If not doing paged RX allocated skb will always have enough space */ copy = (true_len = skb_tailroom(skb)) ? true_len : hdr_len + 8; frag = true_len - copy; @@ -100,7 +72,7 @@ mt7601u_rx_skb_from_seg_paged(struct mt7601u_dev *dev, } static void mt7601u_rx_process_seg(struct mt7601u_dev *dev, u8 *data, - u32 seg_len, struct page *p, bool paged) + u32 seg_len, struct page *p) { struct sk_buff *skb; struct mt7601u_rxwi *rxwi; @@ -126,11 +98,7 @@ static void mt7601u_rx_process_seg(struct mt7601u_dev *dev, u8 *data, trace_mt_rx(dev, rxwi, fce_info); - if (paged) - skb = mt7601u_rx_skb_from_seg_paged(dev, rxwi, data, seg_len, - truesize, p); - else - skb = mt7601u_rx_skb_from_seg(dev, rxwi, data, seg_len); + skb = mt7601u_rx_skb_from_seg(dev, rxwi, data, seg_len, truesize, p); if (!skb) return; @@ -158,23 +126,17 @@ mt7601u_rx_process_entry(struct mt7601u_dev *dev, struct mt7601u_dma_buf_rx *e) u32 seg_len, data_len = e-urb-actual_length; u8 *data = page_address(e-p); struct page *new_p = NULL; - bool paged = true; int cnt = 0; if (!test_bit(MT7601U_STATE_INITIALIZED, dev-state)) return; /* Copy if there is very little data in the buffer. */ - if (data_len 512) { - paged = false; - } else { + if (data_len 512) new_p = dev_alloc_pages(MT_RX_ORDER); - if (!new_p) - paged = false; - } while ((seg_len = mt7601u_rx_next_seg_len(data, data_len))) { - mt7601u_rx_process_seg(dev, data, seg_len, e-p, paged); + mt7601u_rx_process_seg(dev, data, seg_len, new_p ? e-p : NULL); data_len -= seg_len; data += seg_len; @@ -182,9 +144,9 @@ mt7601u_rx_process_entry(struct mt7601u_dev *dev, struct mt7601u_dma_buf_rx *e) } if (cnt 1) - trace_mt_rx_dma_aggr(dev, cnt, paged); + trace_mt_rx_dma_aggr(dev, cnt, !!new_p); - if (paged) { + if (new_p) { /* we have one extra ref from the allocator */ __free_pages(e-p, MT_RX_ORDER); -- 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
[PATCH 3/4] mt7601u: don't cleanup device second time after .resume()
From: Jakub Kicinski kubak...@wp.pl Make sure .disconnect() doesn't cleanup the device if .resume() failed. This may happen when device is removed during suspend. Signed-off-by: Jakub Kicinski kubak...@wp.pl --- drivers/net/wireless/mediatek/mt7601u/init.c | 3 +++ drivers/net/wireless/mediatek/mt7601u/usb.c | 9 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt7601u/init.c b/drivers/net/wireless/mediatek/mt7601u/init.c index 1fc86e865c8c..45eb0796a2e5 100644 --- a/drivers/net/wireless/mediatek/mt7601u/init.c +++ b/drivers/net/wireless/mediatek/mt7601u/init.c @@ -427,6 +427,9 @@ err: void mt7601u_cleanup(struct mt7601u_dev *dev) { + if (!test_and_clear_bit(MT7601U_STATE_INITIALIZED, dev-state)) + return; + mt7601u_stop_hardware(dev); mt7601u_dma_cleanup(dev); mt7601u_mcu_cmd_deinit(dev); diff --git a/drivers/net/wireless/mediatek/mt7601u/usb.c b/drivers/net/wireless/mediatek/mt7601u/usb.c index 99e2b3997bfa..54dba4001865 100644 --- a/drivers/net/wireless/mediatek/mt7601u/usb.c +++ b/drivers/net/wireless/mediatek/mt7601u/usb.c @@ -338,8 +338,15 @@ static int mt7601u_suspend(struct usb_interface *usb_intf, pm_message_t state) static int mt7601u_resume(struct usb_interface *usb_intf) { struct mt7601u_dev *dev = usb_get_intfdata(usb_intf); + int ret; + + ret = mt7601u_init_hardware(dev); + if (ret) + return ret; + + set_bit(MT7601U_STATE_INITIALIZED, dev-state); - return mt7601u_init_hardware(dev); + return 0; } MODULE_DEVICE_TABLE(usb, mt7601u_device_table); -- 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
[PATCH 2/4] mt7601u: watch out for invalid-length frames
From: Jakub Kicinski kubak...@wp.pl Users of older Ralink devices report that received frames sometimes have zero length. Watch out for that. Signed-off-by: Jakub Kicinski kubak...@wp.pl --- drivers/net/wireless/mediatek/mt7601u/dma.c | 14 -- drivers/net/wireless/mediatek/mt7601u/mac.c | 8 ++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c index 16df67b2e62c..7217da4f1543 100644 --- a/drivers/net/wireless/mediatek/mt7601u/dma.c +++ b/drivers/net/wireless/mediatek/mt7601u/dma.c @@ -37,16 +37,20 @@ mt7601u_rx_skb_from_seg(struct mt7601u_dev *dev, struct mt7601u_rxwi *rxwi, void *data, u32 seg_len, u32 truesize, struct page *p) { struct sk_buff *skb; - u32 true_len; - int hdr_len, copy, frag; + u32 true_len, hdr_len = 0, copy, frag; skb = alloc_skb(p ? 128 : seg_len, GFP_ATOMIC); if (!skb) return NULL; true_len = mt76_mac_process_rx(dev, skb, data, rxwi); + if (!true_len || true_len seg_len) + goto bad_frame; hdr_len = ieee80211_get_hdrlen_from_buf(data, true_len); + if (!hdr_len) + goto bad_frame; + if (rxwi-rxinfo cpu_to_le32(MT_RXINFO_L2PAD)) { memcpy(skb_put(skb, hdr_len), data, hdr_len); @@ -69,6 +73,12 @@ mt7601u_rx_skb_from_seg(struct mt7601u_dev *dev, struct mt7601u_rxwi *rxwi, } return skb; + +bad_frame: + dev_err_ratelimited(dev-dev, Error: incorrect frame len:%u hdr:%u\n, + true_len, hdr_len); + dev_kfree_skb(skb); + return NULL; } static void mt7601u_rx_process_seg(struct mt7601u_dev *dev, u8 *data, diff --git a/drivers/net/wireless/mediatek/mt7601u/mac.c b/drivers/net/wireless/mediatek/mt7601u/mac.c index c161bcc6a7fa..7514bce1ac91 100644 --- a/drivers/net/wireless/mediatek/mt7601u/mac.c +++ b/drivers/net/wireless/mediatek/mt7601u/mac.c @@ -450,10 +450,14 @@ u32 mt76_mac_process_rx(struct mt7601u_dev *dev, struct sk_buff *skb, { struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct mt7601u_rxwi *rxwi = rxi; - u32 ctl = le32_to_cpu(rxwi-ctl); + u32 len, ctl = le32_to_cpu(rxwi-ctl); u16 rate = le16_to_cpu(rxwi-rate); int rssi; + len = MT76_GET(MT_RXWI_CTL_MPDU_LEN, ctl); + if (len 10) + return 0; + if (rxwi-rxinfo cpu_to_le32(MT_RXINFO_DECRYPT)) { status-flag |= RX_FLAG_DECRYPTED; status-flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED; @@ -474,7 +478,7 @@ u32 mt76_mac_process_rx(struct mt7601u_dev *dev, struct sk_buff *skb, dev-avg_rssi = (dev-avg_rssi * 15) / 16 + (rssi 8); spin_unlock_bh(dev-con_mon_lock); - return MT76_GET(MT_RXWI_CTL_MPDU_LEN, ctl); + return len; } static enum mt76_cipher_type -- 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
[PATCH 4/4] mt7601u: set promiscous mode based on FIF_OTHER_BSS
From: Jakub Kicinski kubak...@wp.pl Most drivers use FIF_OTHER_BSS to set promiscous mode. Let us follow their lead even though it doesn't match exactly the HW filter flags. Signed-off-by: Jakub Kicinski kubak...@wp.pl --- drivers/net/wireless/mediatek/mt7601u/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt7601u/main.c b/drivers/net/wireless/mediatek/mt7601u/main.c index ced82abb414f..169384b48b27 100644 --- a/drivers/net/wireless/mediatek/mt7601u/main.c +++ b/drivers/net/wireless/mediatek/mt7601u/main.c @@ -119,6 +119,7 @@ mt76_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, dev-rxfilter = ~MT_RX_FILTR_CFG_OTHER_BSS; + MT76_FILTER(OTHER_BSS, MT_RX_FILTR_CFG_PROMISC); MT76_FILTER(FCSFAIL, MT_RX_FILTR_CFG_CRC_ERR); MT76_FILTER(PLCPFAIL, MT_RX_FILTR_CFG_PHY_ERR); MT76_FILTER(CONTROL, MT_RX_FILTR_CFG_ACK | -- 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
[PATCH] mac80211: Minstrel HT: Handle all SMPS states of the peer STA.
From: Chaitanya Tata chaitanya.m...@gmail.com In case of Dynamic SMPS enable RTS/CTS for all rates. In case of Static SMPS mark the Nss 1 rates as not supported. --- net/mac80211/rc80211_minstrel_ht.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 7430a1d..fdc08d0 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1176,9 +1176,16 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, nss = minstrel_mcs_groups[i].streams; - /* Mark MCS 7 as unsupported if STA is in static SMPS mode */ - if (sta-smps_mode == IEEE80211_SMPS_STATIC nss 1) - continue; + /* Handle STA's SMPS State, if Nss 1. + * a. Use RTS_CTS, if STA is in Dynamic SMPS Mode + * b. Mark Nss 1 as unsupported, if STA is in static SMPS mode + */ + if (nss 1) { + if (sta-smps_mode == IEEE80211_SMPS_DYNAMIC) + gflags |= IEEE80211_TX_RC_USE_RTS_CTS; + else if (sta-smps_mode == IEEE80211_SMPS_STATIC) + continue; + } /* HT rate */ if (gflags IEEE80211_TX_RC_MCS) { -- 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 V2] mac80211: Minstrel HT: Handle all SMPS states of the peer STA.
From: Chaitanya Tata chaitanya.m...@gmail.com In case of Dynamic SMPS enable RTS/CTS for all rates. In case of Static SMPS mark the Nss 1 rates as not supported. Signed-off-by: Chaitanya T K chaitanya.m...@gmail.com --- V2: Fix the Indent and Sign off missing. --- net/mac80211/rc80211_minstrel_ht.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 7430a1d..0889c22 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1176,9 +1176,16 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, nss = minstrel_mcs_groups[i].streams; - /* Mark MCS 7 as unsupported if STA is in static SMPS mode */ - if (sta-smps_mode == IEEE80211_SMPS_STATIC nss 1) - continue; + /* Handle STA's SMPS State, if Nss 1. + * a. Use RTS_CTS, if STA is in Dynamic SMPS Mode + * b. Mark Nss 1 as unsupported, if STA is in static SMPS mode + */ + if (nss 1) { + if (sta-smps_mode == IEEE80211_SMPS_DYNAMIC) + gflags |= IEEE80211_TX_RC_USE_RTS_CTS; + else if (sta-smps_mode == IEEE80211_SMPS_STATIC) + continue; + } /* HT rate */ if (gflags IEEE80211_TX_RC_MCS) { -- 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
[RFC] mac80211: convert HW flags to unsigned long bitmap
From: Johannes Berg johannes.b...@intel.com As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. Signed-off-by: Johannes Berg johannes.b...@intel.com --- drivers/net/wireless/adm8211.c | 8 +- drivers/net/wireless/at76c50x-usb.c| 4 +- drivers/net/wireless/ath/ar5523/ar5523.c | 6 +- drivers/net/wireless/ath/ath10k/mac.c | 24 +++--- drivers/net/wireless/ath/ath5k/base.c | 12 +-- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 20 ++--- drivers/net/wireless/ath/ath9k/init.c | 24 +++--- drivers/net/wireless/ath/carl9170/fw.c | 2 +- drivers/net/wireless/ath/carl9170/main.c | 20 ++--- drivers/net/wireless/ath/wcn36xx/main.c| 12 +-- drivers/net/wireless/b43/main.c| 4 +- drivers/net/wireless/b43legacy/main.c | 5 +- .../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 7 +- drivers/net/wireless/cw1200/main.c | 16 ++-- drivers/net/wireless/iwlegacy/3945-mac.c | 6 +- drivers/net/wireless/iwlegacy/4965-mac.c | 12 +-- drivers/net/wireless/iwlwifi/dvm/mac80211.c| 24 +++--- drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c| 4 +- drivers/net/wireless/iwlwifi/mvm/mac80211.c| 30 +++ drivers/net/wireless/libertas_tf/main.c| 2 +- drivers/net/wireless/mac80211_hwsim.c | 26 +++--- drivers/net/wireless/mwl8k.c | 9 +- drivers/net/wireless/p54/main.c| 12 +-- drivers/net/wireless/rsi/rsi_91x_mac80211.c| 7 +- drivers/net/wireless/rt2x00/rt2400pci.c| 8 +- drivers/net/wireless/rt2x00/rt2500pci.c| 8 +- drivers/net/wireless/rt2x00/rt2500usb.c| 9 +- drivers/net/wireless/rt2x00/rt2800lib.c| 16 ++-- drivers/net/wireless/rt2x00/rt61pci.c | 9 +- drivers/net/wireless/rt2x00/rt73usb.c | 9 +- drivers/net/wireless/rtl818x/rtl8180/dev.c | 9 +- drivers/net/wireless/rtl818x/rtl8187/dev.c | 6 +- drivers/net/wireless/rtlwifi/base.c| 22 +++-- drivers/net/wireless/ti/wl1251/main.c | 3 +- drivers/net/wireless/ti/wlcore/main.c | 26 +++--- drivers/net/wireless/zd1211rw/zd_mac.c | 8 +- drivers/staging/vt6655/device_main.c | 8 +- drivers/staging/vt6656/main_usb.c | 8 +- include/net/mac80211.h | 77 ++--- net/mac80211/agg-tx.c | 4 +- net/mac80211/cfg.c | 10 +-- net/mac80211/debugfs.c | 96 -- net/mac80211/driver-ops.h | 2 +- net/mac80211/iface.c | 10 +-- net/mac80211/key.c | 4 +- net/mac80211/main.c| 14 ++-- net/mac80211/mlme.c| 63 +++--- net/mac80211/offchannel.c | 2 +- net/mac80211/pm.c | 4 +- net/mac80211/rate.c| 6 +- net/mac80211/rc80211_minstrel_ht.c | 2 +- net/mac80211/rx.c | 26 +++--- net/mac80211/scan.c| 10 +-- net/mac80211/sta_info.c| 14 ++-- net/mac80211/status.c | 13 ++- net/mac80211/tdls.c| 2 +- net/mac80211/tx.c | 34 net/mac80211/util.c| 6 +- 58 files changed, 433 insertions(+), 411 deletions(-) diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c index 413528295d72..ad6ead9a8acb 100644 --- a/drivers/net/wireless/adm8211.c +++ b/drivers/net/wireless/adm8211.c @@ -1369,9 +1369,9 @@ static void adm8211_configure_filter(struct ieee80211_hw *dev, ADM8211_CSR_READ(NAR); if (priv-nar ADM8211_NAR_PR) - dev-flags |= IEEE80211_HW_RX_INCLUDES_FCS; + ieee80211_hw_set(dev, RX_INCLUDES_FCS); else - dev-flags = ~IEEE80211_HW_RX_INCLUDES_FCS; + __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, dev-flags); if (*total_flags FIF_BCN_PRBRESP_PROMISC) adm8211_set_bssid(dev, bcast); @@ -1857,8 +1857,8 @@ static int adm8211_probe(struct pci_dev *pdev, SET_IEEE80211_PERM_ADDR(dev, perm_addr); dev-extra_tx_headroom = sizeof(struct adm8211_tx_hdr); - /* dev-flags = IEEE80211_HW_RX_INCLUDES_FCS in promisc mode */ - dev-flags =
Re: [PATCH V2] mac80211: Minstrel HT: Handle all SMPS states of the peer STA.
On Wed, Jun 3, 2015 at 12:07 AM, Chaitanya T K chaitanya.m...@gmail.com wrote: From: Chaitanya Tata chaitanya.m...@gmail.com In case of Dynamic SMPS enable RTS/CTS for all rates. In case of Static SMPS mark the Nss 1 rates as not supported. Signed-off-by: Chaitanya T K chaitanya.m...@gmail.com --- V2: Fix the Indent and Sign off missing. --- net/mac80211/rc80211_minstrel_ht.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 7430a1d..0889c22 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1176,9 +1176,16 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, nss = minstrel_mcs_groups[i].streams; - /* Mark MCS 7 as unsupported if STA is in static SMPS mode */ - if (sta-smps_mode == IEEE80211_SMPS_STATIC nss 1) - continue; + /* Handle STA's SMPS State, if Nss 1. + * a. Use RTS_CTS, if STA is in Dynamic SMPS Mode + * b. Mark Nss 1 as unsupported, if STA is in static SMPS mode + */ + if (nss 1) { + if (sta-smps_mode == IEEE80211_SMPS_DYNAMIC) + gflags |= IEEE80211_TX_RC_USE_RTS_CTS; Just noticed that the minstrel_mcs_groups is a const struct, so this wont work. So may be we can move this check to set_rate we can populate rate_table and also have access to sta info? + else if (sta-smps_mode == IEEE80211_SMPS_STATIC) + continue; + } /* HT rate */ if (gflags IEEE80211_TX_RC_MCS) { -- 1.9.1 -- Thanks, Regards, Chaitanya T K. -- 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: remove obsolete sentence from documentation
From: Jakub Kicinski kubak...@wp.pl FIF_PROMISC_IN_BSS was removed in commit df1404650ccb (mac80211: remove support for IFF_PROMISC). Signed-off-by: Jakub Kicinski kubak...@wp.pl --- include/net/mac80211.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 2f8b7decace0..e117119927ec 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2591,8 +2591,7 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb); * * @FIF_OTHER_BSS: pass frames destined to other BSSes * - * @FIF_PSPOLL: pass PS Poll frames, if PROMISC_IN_BSS is not set then only - * those addressed to this station. + * @FIF_PSPOLL: pass PS Poll frames * * @FIF_PROBE_REQ: pass probe request frames */ -- 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
Re: [PATCH] minstrel_ht: Use RTS_CTS when STA is in DYNAMIC SMPS mode for frames sent using Nss1.
On Tue, Jun 2, 2015 at 3:10 AM, Johannes Berg johan...@sipsolutions.net wrote: On Tue, 2015-06-02 at 03:03 +0530, Krishna Chaitanya wrote: This patch is *ancient*, before we actually used patchwork properly ... Ok, so you want me to send a V2 with the indentation fixed? (or) shall i wait for Felix's review before sending V2? It seems unlikely that anyone would want to review a patch over 15 months later :) Please drop this patch, i have sent a new one in sync with HEAD. -- Thanks, Regards, Chaitanya T K. -- 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: rename single hw-scan flag to follow naming convention
From: Johannes Berg johannes.b...@intel.com The naming convention is to always have the flags prefixed with IEEE80211_HW_ so they're 'namespaced', make this flag follow it. Signed-off-by: Johannes Berg johannes.b...@intel.com --- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 2 +- include/net/mac80211.h | 4 ++-- net/mac80211/scan.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 84555170b6f7..6b45b96ac238 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -450,7 +450,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) !iwlwifi_mod_params.sw_crypto) hw-flags |= IEEE80211_HW_MFP_CAPABLE; - hw-flags |= IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS; + hw-flags |= IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS; hw-wiphy-features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR | NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR; diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 68a3cc9796d2..e09a32cb139f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1885,7 +1885,7 @@ struct ieee80211_txq { * @IEEE80211_HW_SUPPORTS_CLONED_SKBS: The driver will never modify the payload * or tailroom of TX skbs without copying them first. * - * @IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands + * @IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands * in one command, mac80211 doesn't have to run separate scans per band. */ enum ieee80211_hw_flags { @@ -1917,7 +1917,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 127, IEEE80211_HW_CHANCTX_STA_CSA= 128, IEEE80211_HW_SUPPORTS_CLONED_SKBS = 129, - IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS = 130, + IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS = 130, }; /** diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 7bb6a9383f58..3eb121d2aa45 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -257,7 +257,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) if (test_bit(SCAN_HW_CANCELLED, local-scanning)) return false; - if (local-hw.flags IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS) { + if (local-hw.flags IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS) { for (i = 0; i req-n_channels; i++) { local-hw_scan_req-req.channels[i] = req-channels[i]; bands_used |= BIT(req-channels[i]-band); @@ -326,7 +326,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) return; if (hw_scan !aborted - !(local-hw.flags IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS) + !(local-hw.flags IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS) ieee80211_prep_hw_scan(local)) { int rc; @@ -520,7 +520,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, local-hw_scan_ies_bufsize = local-scan_ies_len + req-ie_len; - if (local-hw.flags IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS) { + if (local-hw.flags IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS) { int i, n_bands = 0; u8 bands_counted = 0; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [1/6] mwifiex: fix SDIO firmware dump problem
It's been observed that firmware doesn't go back to normal state when all firmware memories are dumped. As a result, further commands are blocked. This happens due to missing driver change of writing READ DONE to control register for SDIO interface. This patch adds a missing change to fix the problem. Signed-off-by: Amitkumar Karwar akar...@marvell.com Signed-off-by: Cathy Luo c...@marvell.com Thanks, 6 patches applied to wireless-drivers-next.git: e065ddb89175 mwifiex: fix SDIO firmware dump problem 0769b27739ee mwifiex: fix a possible double free issue 38b130e22e40 mwifiex: dump driver information for PCIe interface 9cc0dbf04367 mwifiex: minor changes in debug messages fc697159ad4c mwifiex: use generic name 'device dump' 57670ee882d4 mwifiex: device dump support via devcoredump framework 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: ray_cs: Change 1 to true for bool type variable.
The variable translate is bool type. So assigning true instead of 1. Signed-off-by: Shailendra Verma shailendra.capric...@gmail.com Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v2] ath10k: Debugfs entry to enable/disable WLANBlutooth Coexist feature
-Original Message- From: Jakub Kiciński [mailto:moorr...@wp.pl] Sent: Tuesday, June 02, 2015 2:39 AM To: Li, Yanbo Cc: Valo, Kalle; dreamfly...@gmail.com; ath...@lists.infradead.org; linux- wirel...@vger.kernel.org Subject: Re: [PATCH v2] ath10k: Debugfs entry to enable/disable WLANBlutooth Coexist feature On Thu, 28 May 2015 12:19:05 -0700, Yanbo Li wrote: As some radio have no connection with BT modules, enable the WLAN/Bluetooth coexist(BTC) feature will has some side effect if the radio's GPIO connect with any other HW modules. Add the control switcher btc_feature at debugfs and set the feature as disable by default to avoid such case. To enable this feature, execute: echo 1 /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature To disable: echo 0 /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature Signed-off-by: Yanbo Li yan...@qca.qualcomm.com IMHO common API for disabling/enabling btcoex is something we would all benefit from and easy enough to implement properly. Burying it in driver- specific debugfs is less than appropriate. I seem to recall there were plans to discuss btcoex at one of the linux- wireless summits. If the consensus was to leave it in debugfs then I apologize for the noise ;) Thanks for your comments, agree with a general BTcoex interface will be good for lots of wlan chip/driver. It worth to be consider to implement such framework in future. BR /Yanbo -- 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: [RFC] mac80211: convert HW flags to unsigned long bitmap
Hi Johannes, Minor nit: On Wed, Jun 3, 2015 at 5:39 AM, Johannes Berg johan...@sipsolutions.net wrote: From: Johannes Berg johannes.b...@intel.com As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. Signed-off-by: Johannes Berg johannes.b...@intel.com --- diff --git a/include/net/mac80211.h b/include/net/mac80211.h index e09a32cb139f..dc56734d0154 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2050,6 +2053,20 @@ struct ieee80211_hw { int txq_ac_max_pending; }; +static inline bool _ieee80211_hw_check(struct ieee80211_hw *hw, + enum ieee80211_hw_flags flg) +{ + return test_bit(flg, hw-flags); +} +#define ieee80211_hw_check(hw, flg)_ieee80211_hw_check(hw, IEEE80211_HW_##flg) + +static inline void _ieee80211_hw_set(struct ieee80211_hw *hw, +enum ieee80211_hw_flags flg) +{ + return __set_bit(flg, hw-flags); +} +#define ieee80211_hw_set(hw, flg) _ieee80211_hw_set(hw, IEEE80211_HW_##flg) + Why not add a ieee80211_hw_clear() function? Yes, it'd only be used in 3 places, but it'd look neater. Thanks, -- Julian Calaby Email: julian.cal...@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ -- 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
New USB ID 2001:3c25
Scott, I see that you added the USB ID in the subject for the DWA-130 device in commit ea345c145ff23197eab34d0c4d0c8a93d7bea8c6. Is there any reason that the new ID should not have been sent to Stable as well, or was that an oversight? Thanks, Larry -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] ath10k: add cryptmode param to support sw crypto and raw tx injection.
On 2 June 2015 at 20:21, Liu CF/TW cfliu...@gmail.com wrote: On Tue, Jun 2, 2015 at 12:17 AM, Michal Kazior michal.kaz...@tieto.com wrote: On 1 June 2015 at 21:44, David Liu cfliu...@gmail.com wrote: [...] --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -91,6 +91,7 @@ struct ath10k_skb_cb { u8 tid; u16 freq; bool is_offchan; + bool nohwcrypt; struct ath10k_htt_txbuf *txbuf; u32 txbuf_paddr; } __packed htt; @@ -349,6 +350,7 @@ struct ath10k_vif { } u; bool use_cts_prot; + bool nohwcrypt; So this is a bit confusing. This is used only for tx policy only, right? It should be named accordingly then. The other nohwcrypt in skb_cb pretty much implies Tx already. No, it's also for Rx. In this patch, in mac.c, if arvif-nohwcrypt is set, ath10k_send_key() won't install the actual key to hardware, but a clear key is installed. This makes all matching STA's encrypted frame passthrough HW and mac80211 can take care of decryption later in host. (in patch V2 I will take care of the IEEE80211_HW_SW_CRYPTO_CONTROL setting) Ah, you're right. I've missed that somehow. [...] @@ -484,6 +491,12 @@ enum ath10k_dev_flags { * waiters should immediately cancel instead of waiting for a time out. */ ATH10K_FLAG_CRASH_FLUSH, + + /* Use Raw mode for Tx and Rx */ + ATH10K_RAW_MODE, + + /* Disable HW crypto engine */ + ATH10K_HW_CRYPTO_DISABLED, You're missing the _FLAG prefix. Also this isn't documented well enough. RAW_MODE implies sw crypto rx, no? Perhaps a more fine grained approach would be better: Thanks. Will fix. Raw mode doesn't imply SW crypto only. Indeed Raw mode is the only way to get sw crypto support, but it also supports HW crypto. I just tested both HW/SW crypto cases working fine in raw mode. So my plan for the new cryptmode parameter has 3 values: 0Use HW crypto engine only. This uses native WiFi mode Tx/Rx encap 1Use SW crypto engine only. This uses raw mode Tx/Rx encap 2Supports both SW HW crypto engine. This uses raw mode Tx/Rx encap. Once this patch is in, I guess people would only use cryptmode=0 or 1. For cryptmode=2, I have subsequent changes to allow per BSS based control of HW/SW crypto selection. Plan is to make make arvif-nohwcrypt configurable via debugfs or nl80211 (subject to review feedback) ATH10K_FLAG_RAW_TX, ATH10K_FLAG_RAW_RX, ATH10K_FLAG_SW_TX_CRYPTO, ATH10K_FLAG_SW_RX_CRYPTO, Obviously not all combinations are valid/doable but I think this will make the code look more obvious. That would be too many flags and too complex. I'd suggest keep the proposed ATH10K_RAW_MODE and ATH10K_HW_CRYPTO_DISABLED. Let's make Tx/Rx HW crypto always both enabled or both disabled AFA driver is concerned. Okay. This suggestion was based on my incorrect interpretation of your patch wrt arvif-nohwcrypt. diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 85cca29..37fd2f83 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -296,7 +296,7 @@ enum ath10k_hw_rate_cck { #define TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1 #define TARGET_10X_VOW_CONFIG 0 #define TARGET_10X_NUM_MSDU_DESC (1024 + 400) -#define TARGET_10X_MAX_FRAG_ENTRIES0 +#define TARGET_10X_MAX_FRAG_ENTRIES10 This is probably enough at 2 (ath10k doesn't send more than 2 tx fragments now). I assume fw crashes with raw tx if this isn't fixed, correct? Sidenote: I guess TARGET_MAX_FRAG_ENTRIES could be fixed as well. It might make sense for QCA61X4 hw2.1 which still uses the old Rx indication event and might be able to do raw txrx + swcrypto. But I'm a bit reluctant to change this without any testing. Sure. I change it to 10 because the document I got from QCA says so. Since this is a global setting, I will remove this and keep it =0 for now so it doesn't affect existing HW based datapath. Sure. I recall 10.x on QCA988X isn't really picky on this value. QCA61X4 with wmi-tlv on the other hand needs an adequate value for this configuration parameter or it'll crash horribly. Per QCA, the main issue not changing this would be SW crypto then won't be able to handle large Rx AMSDU. When HW is not doing Rx decryption, the whole AMSDU needs to be DMA to host for SW based decryption AMSDU subframe deaggregation. Hmm.. From what I know this setting refers to the max number of Tx fragments that can be submitted via HTT TX_FRM command eventually to HW MAC, not Rx fragments. 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
[PATCH 2/2] mac80211: stop using pointers as userspace cookies
From: Johannes Berg johannes.b...@intel.com Even if the pointers are really only accessible to root and used pretty much only by wpa_supplicant, this is still not great; even for debugging it'd be easier to have something that's easier to read and guaranteed to never get reused. With the recent change to make mac80211 create an ack_skb for the mgmt-tx path this becomes possible, only the client probe method needs to also allocate an ack_skb, and we can store the cookie in that skb. Signed-off-by: Johannes Berg johannes.b...@intel.com --- include/net/mac80211.h | 3 ++ net/mac80211/cfg.c | 115 +++-- net/mac80211/status.c | 27 ++-- 3 files changed, 90 insertions(+), 55 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 39e864b35083..7466c55bfc0b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -875,6 +875,9 @@ struct ieee80211_tx_info { /* 4 bytes free */ } control; struct { + u64 cookie; + } ack; + struct { struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; s32 ack_signal; u8 ampdu_ack_len; diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5ba528f13300..1a17d3208d8f 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2546,6 +2546,19 @@ static bool ieee80211_coalesce_started_roc(struct ieee80211_local *local, return true; } +static u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local) +{ + lockdep_assert_held(local-mtx); + + local-roc_cookie_counter++; + + /* wow, you wrapped 64 bits ... more likely a bug */ + if (WARN_ON(local-roc_cookie_counter == 0)) + local-roc_cookie_counter++; + + return local-roc_cookie_counter; +} + static int ieee80211_start_roc_work(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, struct ieee80211_channel *channel, @@ -2583,7 +2596,6 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, roc-req_duration = duration; roc-frame = txskb; roc-type = type; - roc-mgmt_tx_cookie = (unsigned long)txskb; roc-sdata = sdata; INIT_DELAYED_WORK(roc-work, ieee80211_sw_roc_work); INIT_LIST_HEAD(roc-dependents); @@ -2593,17 +2605,10 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, * or the SKB (for mgmt TX) */ if (!txskb) { - /* local-mtx protects this */ - local-roc_cookie_counter++; - roc-cookie = local-roc_cookie_counter; - /* wow, you wrapped 64 bits ... more likely a bug */ - if (WARN_ON(roc-cookie == 0)) { - roc-cookie = 1; - local-roc_cookie_counter++; - } + roc-cookie = ieee80211_mgmt_tx_cookie(local); *cookie = roc-cookie; } else { - *cookie = (unsigned long)txskb; + roc-mgmt_tx_cookie = *cookie; } /* if there's one pending or we're scanning, queue this one */ @@ -3284,6 +3289,36 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, return err; } +static struct sk_buff *ieee80211_make_ack_skb(struct ieee80211_local *local, + struct sk_buff *skb, u64 *cookie, + gfp_t gfp) +{ + unsigned long spin_flags; + struct sk_buff *ack_skb; + int id; + + ack_skb = skb_copy(skb, gfp); + if (!ack_skb) + return ERR_PTR(-ENOMEM); + + spin_lock_irqsave(local-ack_status_lock, spin_flags); + id = idr_alloc(local-ack_status_frames, ack_skb, + 1, 0x1, GFP_ATOMIC); + spin_unlock_irqrestore(local-ack_status_lock, spin_flags); + + if (id 0) { + kfree_skb(ack_skb); + return ERR_PTR(-ENOMEM); + } + + IEEE80211_SKB_CB(skb)-ack_frame_id = id; + + *cookie = ieee80211_mgmt_tx_cookie(local); + IEEE80211_SKB_CB(ack_skb)-ack.cookie = *cookie; + + return ack_skb; +} + static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) @@ -3429,40 +3464,22 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, skb-dev = sdata-dev; if (!params-dont_wait_for_ack) { - unsigned long spin_flags; - int id; - - /* make a copy to preserve the original cookie (in case the -* driver decides to reallocate the skb) and the frame contents + /* make
[PATCH 1/2] mac80211: copy nl80211 mgmt TX SKB for status
From: Johannes Berg johannes.b...@intel.com When we return the TX status for an nl80211 mgmt TX SKB, we should also return the original frame with the status to allow userspace to match up the submission (it could also use the cookie but both ways are permissible.) As TX SKBs could be encrypted, at least in the case of ANQP while associated with the AP, copy the original SKB, store it with an ACK frame ID and restructure the status path to use that to return status with the original SKB. Otherwise, userspace (in particular wpa_supplicant) will get confused. Reported-by: Matti Gottlieb matti.gottl...@intel.com Signed-off-by: Johannes Berg johannes.b...@intel.com --- net/mac80211/cfg.c| 39 -- net/mac80211/status.c | 109 +++--- 2 files changed, 104 insertions(+), 44 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 02f48c848ef5..5ba528f13300 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2,7 +2,7 @@ * mac80211 configuration hooks for cfg80211 * * Copyright 2006-2010 Johannes Berg johan...@sipsolutions.net - * Copyright 2013-2014 Intel Mobile Communications GmbH + * Copyright 2013-2015 Intel Mobile Communications GmbH * * This file is GPLv2 as found in COPYING. */ @@ -3290,7 +3290,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, { struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); struct ieee80211_local *local = sdata-local; - struct sk_buff *skb; + struct sk_buff *skb, *ack_skb; struct sta_info *sta; const struct ieee80211_mgmt *mgmt = (void *)params-buf; bool need_offchan = false; @@ -3428,8 +3428,41 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, skb-dev = sdata-dev; + if (!params-dont_wait_for_ack) { + unsigned long spin_flags; + int id; + + /* make a copy to preserve the original cookie (in case the +* driver decides to reallocate the skb) and the frame contents +* in case of encryption. +*/ + ack_skb = skb_copy(skb, GFP_KERNEL); + if (!ack_skb) { + ret = -ENOMEM; + kfree_skb(skb); + goto out_unlock; + } + + spin_lock_irqsave(local-ack_status_lock, spin_flags); + id = idr_alloc(local-ack_status_frames, ack_skb, + 1, 0x1, GFP_ATOMIC); + spin_unlock_irqrestore(local-ack_status_lock, spin_flags); + + if (id 0) { + ret = -ENOMEM; + kfree_skb(ack_skb); + kfree_skb(skb); + goto out_unlock; + } + + IEEE80211_SKB_CB(skb)-ack_frame_id = id; + } else { + /* for cookie below */ + ack_skb = skb; + } + if (!need_offchan) { - *cookie = (unsigned long) skb; + *cookie = (unsigned long)ack_skb; ieee80211_tx_skb(sdata, skb); ret = 0; goto out_unlock; diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 461594966b65..56b73e012757 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -429,6 +429,66 @@ static void ieee80211_tdls_td_tx_handle(struct ieee80211_local *local, } } +static struct ieee80211_sub_if_data * +ieee80211_sdata_from_skb(struct ieee80211_local *local, struct sk_buff *skb) +{ + struct ieee80211_sub_if_data *sdata; + + if (skb-dev) { + list_for_each_entry_rcu(sdata, local-interfaces, list) { + if (!sdata-dev) + continue; + + if (skb-dev == sdata-dev) + return sdata; + } + + return NULL; + } + + return rcu_dereference(local-p2p_sdata); +} + +static void ieee80211_report_ack_skb(struct ieee80211_local *local, +struct ieee80211_tx_info *info, +bool acked, bool dropped) +{ + struct sk_buff *skb; + unsigned long flags; + + spin_lock_irqsave(local-ack_status_lock, flags); + skb = idr_find(local-ack_status_frames, info-ack_frame_id); + if (skb) + idr_remove(local-ack_status_frames, info-ack_frame_id); + spin_unlock_irqrestore(local-ack_status_lock, flags); + + if (!skb) + return; + + if (dropped) { + dev_kfree_skb_any(skb); + return; + } + + if (info-flags IEEE80211_TX_INTFL_NL80211_FRAME_TX) { + struct ieee80211_sub_if_data *sdata; + + rcu_read_lock(); + sdata = ieee80211_sdata_from_skb(local,
[PATCH] staging: wilc1000: Modification in code to use ARRAY_SIZE macro
From: Chaitanya Dhere cvija...@visteon.com In this patch, ARRAY_SIZE() macro is used to determine the size. This change was detected with the help of coccinelle tool. Signed-off-by: Chaitanya Dhere cvija...@visteon.com --- drivers/staging/wilc1000/linux_wlan.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index b033eb8..592b8ae 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1737,7 +1737,7 @@ static int linux_wlan_read_mac_addr(void *vp) mm_segment_t old_fs; loff_t pos = 0; int index; - int array_size = sizeof(path_string) / sizeof(path_string[0]); + int array_size = ARRAY_SIZE(path_string); /* change to KERNEL_DS address limit */ old_fs = get_fs(); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] ath10k: Debugfs entry to enable/disable WLANBlutooth Coexist feature
Jakub Kiciński moorr...@wp.pl writes: On Thu, 28 May 2015 12:19:05 -0700, Yanbo Li wrote: As some radio have no connection with BT modules, enable the WLAN/Bluetooth coexist(BTC) feature will has some side effect if the radio's GPIO connect with any other HW modules. Add the control switcher btc_feature at debugfs and set the feature as disable by default to avoid such case. To enable this feature, execute: echo 1 /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature To disable: echo 0 /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature Signed-off-by: Yanbo Li yan...@qca.qualcomm.com IMHO common API for disabling/enabling btcoex is something we would all benefit from and easy enough to implement properly. Burying it in driver-specific debugfs is less than appropriate. I seem to recall there were plans to discuss btcoex at one of the linux-wireless summits. If the consensus was to leave it in debugfs then I apologize for the noise ;) I agree. I don't recall anymore the discussion in the summit but I think that adding btcoex support to nl80211 would be the right thing to do. It's a common setting for many drivers. But before we have that, ath10k still has to use debugfs. -- Kalle Valo -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] wireless-regdb: Add 60GHz regulatory rules for Russia (RU)
Source is document named Changes to NLA 124_Order №129_22042015.pdf Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com --- db.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db.txt b/db.txt index f361030..79dac92 100644 --- a/db.txt +++ b/db.txt @@ -978,6 +978,8 @@ country RU: DFS-ETSI (5250 - 5330 @ 80), (20), DFS (5650 - 5730 @ 80), (30), DFS (5735 - 5835 @ 80), (30) + # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf + (57000 - 66000 @ 2160), (40) country RW: DFS-FCC (2402 - 2482 @ 40), (20) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [wireless-regdb] [PATCH] wireless-regdb: Add 60GHz regulatory rules for Russia (RU)
On Tue, Jun 02, 2015 at 05:04:09PM +0300, Vladimir Kondratiev wrote: Source is document named Changes to NLA 124_Order №129_22042015.pdf Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com --- db.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db.txt b/db.txt index f361030..79dac92 100644 --- a/db.txt +++ b/db.txt @@ -978,6 +978,8 @@ country RU: DFS-ETSI (5250 - 5330 @ 80), (20), DFS (5650 - 5730 @ 80), (30), DFS (5735 - 5835 @ 80), (30) + # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf + (57000 - 66000 @ 2160), (40) It looks like your tree is out of date and missing: aa1d66d wireless-regdb: Disable VHT80 where 40/80 MHz on 5 GHz is not allowed I see that you directed the patch at John, so I'm guessing that you're still using his tree. I took over maintainership of the database in December, and you should be using this repo for new work: git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git Thanks, Seth -- 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: [PATCHv4 00/17] mwifiex patches
Avinash Patil pat...@marvell.com writes: This patch series mainly adds enhancements for mwifiex AP. With this series, we support verbose information in station dump command also information about AP link. Another important enhancement is related to parsing IEs from tail of beacondata. Few issues seen during DFS testing are also fixed in this series. When you send a new version of a patch or patchset, please add a changelog so that people don't have to guess what has changed since previous version. For example, this cover letter is a good place to add it. You can find lots of examples from the mailing list archives. -- 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: [PATCHv4 00/17] mwifiex patches
-Original Message- From: Kalle Valo [mailto:kv...@codeaurora.org] Sent: Tuesday, June 02, 2015 7:10 PM To: Avinash Patil Cc: linux-wireless@vger.kernel.org; Amitkumar Karwar; Cathy Luo; Xinming Hu Subject: Re: [PATCHv4 00/17] mwifiex patches Avinash Patil pat...@marvell.com writes: This patch series mainly adds enhancements for mwifiex AP. With this series, we support verbose information in station dump command also information about AP link. Another important enhancement is related to parsing IEs from tail of beacondata. Few issues seen during DFS testing are also fixed in this series. When you send a new version of a patch or patchset, please add a changelog so that people don't have to guess what has changed since previous version. For example, this cover letter is a good place to add it. You can find lots of examples from the mailing list archives. Thanks, Kalle. I will soon send v5 with change logs as suggested by you. -- Kalle Valo -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 2/2] wireless-regdb: Add 60GHz regulatory rules for Russia (RU)
Source is document named Changes to NLA 124_Order №129_22042015.pdf Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com --- db.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db.txt b/db.txt index af3aaca..809cd3c 100644 --- a/db.txt +++ b/db.txt @@ -998,6 +998,8 @@ country RU: DFS-ETSI (5250 - 5330 @ 40), (20), DFS (5650 - 5730 @ 40), (30), DFS (5735 - 5835 @ 40), (30) + # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf + (57000 - 66000 @ 2160), (40) country RW: DFS-FCC (2402 - 2482 @ 40), (20) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/2] wireless-regdb: Add 60GHz regulatory rules for Japan (JP)
Source is ARIB STD-T74, available at: http://www.arib.or.jp/english/html/overview/doc/1-STD-T74v1_1.pdf Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com --- db.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db.txt b/db.txt index 37b6c39..af3aaca 100644 --- a/db.txt +++ b/db.txt @@ -590,6 +590,9 @@ country JP: DFS-JP (5170 - 5250 @ 80), (20), AUTO-BW (5250 - 5330 @ 80), (20), DFS, AUTO-BW (5490 - 5710 @ 160), (23), DFS + # 60 GHz band channels 2-4 at 10mW, + # ref: http://www.arib.or.jp/english/html/overview/doc/1-STD-T74v1_1.pdf + (59000 - 66000 @ 2160), (10 mW) country KE: DFS-JP (2402 - 2482 @ 40), (20) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Cannot disable transmission retry
Hello, On kernel 3.13, I was able to disable the transmission retries on the wlan0 interface with 'iwconfig wlan0 retry 0'. Now I updated my kernel to 3.16, and it returns with 'Invalid argument' error. The cause is this commit: cfg80211: add sanity check for retry limit in wext-compat http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f5aa0d21dd5ada040ff42b4d40357285e4ace441 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev, u8 oshort = wdev-wiphy-retry_short; int err; - if (retry-disabled || + if (retry-disabled || retry-value 1 || retry-value 255 || (retry-flags IW_RETRY_TYPE) != IW_RETRY_LIMIT) return -EINVAL; I'm wondering, is the 'retry-value 1' is necessary? I would write 'retry-value 0' instead, to make possible to disable the retries. Should I send a patch? Thanks! Robert Hodaszi