Re: [PATCH] rtlwifi: Change long delays to sleeps
2016-02-16 7:12 GMT+09:00 Larry Finger: > Routine rtl_addr_delay() uses delay statements in code that can > sleep. To improve system responsiveness, the various delay statements > are changed. > > In addition, routines rtl_rfreg_delay() and rtl_bb_delay() are > rewritten to use the code in rtl_addr_delay() for most of their > input values. > > Suggested-by: Byeoungwook Kim > Signed-off-by: Larry Finger > --- Why you are using 'Suggested-by:' of me? I think to that your commit was included a part of my commit(https://patchwork.kernel.org/patch/8197071/). > > Kalle, > > This patch will interfere with a set of 3 patches submitted by Byeoungwook Kim > on Feb. 3, 2016 that are currently in the deferred list > at patchwork. > > Larry > > drivers/net/wireless/realtek/rtlwifi/core.c | 44 > - > 1 file changed, 12 insertions(+), 32 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c > b/drivers/net/wireless/realtek/rtlwifi/core.c > index 02eba0e..16ad0d6 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/core.c > +++ b/drivers/net/wireless/realtek/rtlwifi/core.c > @@ -54,59 +54,39 @@ EXPORT_SYMBOL(channel5g_80m); > void rtl_addr_delay(u32 addr) > { > if (addr == 0xfe) > - mdelay(50); > + msleep(50); > else if (addr == 0xfd) > - mdelay(5); > + msleep(5); > else if (addr == 0xfc) > - mdelay(1); > + msleep(1); > else if (addr == 0xfb) > - udelay(50); > + usleep_range(50, 100); > else if (addr == 0xfa) > - udelay(5); > + usleep_range(5, 10); > else if (addr == 0xf9) > - udelay(1); > + usleep_range(1, 2); > } > EXPORT_SYMBOL(rtl_addr_delay); > > void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 > addr, > u32 mask, u32 data) > { > - if (addr == 0xfe) { > - mdelay(50); > - } else if (addr == 0xfd) { > - mdelay(5); > - } else if (addr == 0xfc) { > - mdelay(1); > - } else if (addr == 0xfb) { > - udelay(50); > - } else if (addr == 0xfa) { > - udelay(5); > - } else if (addr == 0xf9) { > - udelay(1); > + if (addr >= 0xf9 && addr <= 0xfe) { > + rtl_addr_delay(addr); > } else { > rtl_set_rfreg(hw, rfpath, addr, mask, data); > - udelay(1); > + usleep_range(1, 2); > } > } > EXPORT_SYMBOL(rtl_rfreg_delay); > > void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data) > { > - if (addr == 0xfe) { > - mdelay(50); > - } else if (addr == 0xfd) { > - mdelay(5); > - } else if (addr == 0xfc) { > - mdelay(1); > - } else if (addr == 0xfb) { > - udelay(50); > - } else if (addr == 0xfa) { > - udelay(5); > - } else if (addr == 0xf9) { > - udelay(1); > + if (addr >= 0xf9 && addr <= 0xfe) { > + rtl_addr_delay(addr); > } else { > rtl_set_bbreg(hw, addr, MASKDWORD, data); > - udelay(1); > + usleep_range(1, 2); > } > } > EXPORT_SYMBOL(rtl_bb_delay); > -- > 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 Regards, Byeoungwook -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] staging: wilc1000: move WILC_MULTICAST_TABLE_SIZE define to wilc_wlan_if.h file
On Fri, Feb 19, 2016 at 06:57:42PM +0900, Leo Kim wrote: > From: Chris Park> > This patch moves WILC_MULTICAST_TABLE_SIZE define to wilc_wlan_if.h file. > This define is used to three files(host_interface.c,host_interface.h, > linux_wlan.c) these files already include wilc_wlan_if.h file in common. > > Signed-off-by: Chris Park > Signed-off-by: Leo Kim > --- > drivers/staging/wilc1000/linux_wlan_common.h | 2 -- > drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- > 2 files changed, 1 insertion(+), 3 deletions(-) Series doesn't apply :( -- 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/6] staging: wilc1000: removes wilc_dbg()
On Fri, Feb 19, 2016 at 05:37:07PM +0900, Leo Kim wrote: > This patch removes wilc_dbg function because it's not any more. > > Signed-off-by: Leo Kim> --- > drivers/staging/wilc1000/linux_wlan.c | 4 > drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 -- > drivers/staging/wilc1000/wilc_wlan.c | 2 -- > 3 files changed, 8 deletions(-) I didn't apply the other series, so I can't apply this one, please resend this after fixing it up as part of the other series. 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
Re: [PATCH V2 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER
On Thu, Feb 18, 2016 at 08:30:01PM +0900, Leo Kim wrote: > This patches removes PRINT_ER that is unnecessary debug logs. > > Signed-off-by: Leo Kim> --- > drivers/staging/wilc1000/wilc_wlan.c | 2 -- > 1 file changed, 2 deletions(-) What changed in this series from v1? Why should I take it? Please resend a v3 that says exactly what differs. 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
Re: pull-request: wireless-drivers 2016-02-18
From: Kalle ValoDate: Thu, 18 Feb 2016 17:28:14 +0200 > I have some important fixes I would like to get 4.5 still, more info in > the signed tag. Please let me know if you have problems. Pulled, 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: wpa_supplicant bridging problems
On Thu, Feb 18, 2016 at 07:55:30PM -0800, J Mo wrote: > This was a bug already fixed in git. The Debian wpa_supplicant is > old (2.3). Source right now is pre-2.6. I compiled my own and it > works fine. > I suspect this was fixed in git commit > e6dd8196e5daf39e4204ef8ecd26dd50fdca6040, but there are two other > commits which also look like they are related to bridging and EAPOL. That is not really a fix for the real problem.. It is only a workaround to avoid the quite unfortunate and already years old kernel regression.. While that workaround covers some cases, it has a cost (more CPU use) and it is possible to come up with sequences that break even that workaround. Unfortunately, I'm not aware of any robust way of working around this from user space without significant CPU load increase. This thread from 2013 discusses that root issue: http://marc.info/?l=linux-wireless=136743495526905=2 Unfortunately, there is still no fix for this in the kernel.. There is a proposed fix that is included in OpenWrt, but it is unclear how this issue could be fixed properly. -- 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: [PATCHv2 3/4] ARM: tegra: use build-in device properties with rfkill_gpio
On Thu, Feb 18, 2016 at 09:04:49PM +0100, Johannes Berg wrote: > On Tue, 2016-01-26 at 09:42 +0100, Johannes Berg wrote: > > On Mon, 2016-01-25 at 13:18 +0100, Thierry Reding wrote: > > > > > > Johannes, I assume that you'll want to take this through your tree > > > because of the dependency? In that case: > > > > > > Acked-by: Thierry Reding> > > > I can, but I don't really care - perhaps you'd rather take the entire > > series through your tree to get it into one place for Marc? > > > > In which case, you have my > > > > Acked-by: Johannes Berg > > > > for the other 3 patches. > > > > Let me know which you prefer. > > > Did these patches get applied anywhere? Otherwise I'm willing to pick > them up. Might be easier for everyone if you took this one patch. My earlier Acked-by still stands: Acked-by: Thierry Reding signature.asc Description: PGP signature
RE: [RFC 0/2] mac80211: add support for ht_caps mcs rxmask override
> What are you working on that you need this? We are working on critical industrial networks where a specific (generally high) bandwidth is required. Supressing low MCSs (that are not able to handle the desired bandwidth) allows us to be sure that the wireless link can sustain the requested bandwidth. If the radio conditions do not allow high enough MCSs, we prefer increase the AP density rather than not being able to communicate at the requested speed. > I think my comments to him apply to this too - see the thread at > http://thread.gmane.org/gmane.linux.kernel.wireless.general/143789 Thanks for the link, I didn't noticed Ben Grear's request. According to the given patches, it seems the targeted goal is quite similar. So your comments also apply on my demand. Anyway, thanks for your answer. Cedric -- 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: add extap functionality
On 2016-02-19 13:05, Grzegorz Bajorski wrote: > 2016-02-18 15:08 GMT+01:00 Felix Fietkau: >> On 2016-02-18 14:36, Grzegorz Bajorski wrote: >>> 2016-02-17 17:55 GMT+01:00 Felix Fietkau : On 2016-02-17 12:55, Grzegorz Bajorski wrote: > Client interface briding was only possible when 4addr frames were used > with > a 4addr/WDS aware AP. It was not possible to do it otherwise due to 3addr > frame limitation. > > The extap logic introduces a smart MAC address masking/translation > (including modyfing packets beyond SA/DA, e.g. DHCP broadcast flag is > set). > > There are still some unsolved problems and bugs: > - due to bridge port routing and sk_buff payload sharing skb_copy() is >performed; this ideally should be reworked > - ipv6 support is still not finished > - extap is enabled by default currently; it should be configurable via >nl80211 the same way 4addr is > > There's also an idea to move this as a generic link driver (just like > macvlan, et al) which would allow unmodified cfg80211 drivers to enjoy the > extap functionality. Thoughts? > > Note: This changes cfg80211 file in this single patch only for reviewing > convienence. > > This is an early draft to solicit comments on the design. > > Signed-off-by: Grzegorz Bajorski You can get a lot of the same effect (sharing the same subnet between hosts behind multiple interfaces and having forwarding between them) without any changes to mac80211. OpenWrt uses a daemon called 'relayd' which I wrote some years ago. It does ARP translation, DHCP packet mangling and sets up policy routing to forward packets between multiple interfaces. You can find it here: http://git.openwrt.org/?p=project/relayd.git;a=summary git://git.openwrt.org/project/relayd.git Since you can cover the same use cases with user space code, I don't think it's a good idea to put bridge emulation hacks in the kernel's wireless stack. >>> >>> What about performance? Quick test show that is slow ~ 100-120 mbps >>> (UDP tests) and procesor is overloaded. Am I missing something? I >>> would expect it to be greater. (4 x 4 antena setup VHT80) >> What platform are you testing it on, and what kind of UDP test are you >> running? > > My setup it is as follows: > [laptop1] --eth-- [EA6500 AP] ~~rf~~ [AP148 STA w/ QCA99X0] --eth-- > [laptop2]. I run UDP traffic between Laptop1 and Laptop2 using iperf. > Laptop1: iperf -s -i1 -u > Laptop2: iperf -i1 -c 192.168.1.108 -b 200M -t100 -u -P5 (without -P5, > I got similar results) So what kind of kernel are you running? Maybe you should use perf to figure out why routing is so slow. - Felix -- 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] b43: fix memory leak
On Friday 19 February 2016 01:14 PM, Kalle Valo wrote: Michael Büschwrites: On Thu, 18 Feb 2016 18:04:36 +0530 Sudip Mukherjee wrote: From: Sudip Mukherjee On error we jumped to the label bcma_out and returned the error code but we missed freeing dev. Signed-off-by: Sudip Mukherjee --- drivers/net/wireless/broadcom/b43/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index c279211..78f670a 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -5671,6 +5671,7 @@ static int b43_bcma_probe(struct bcma_device *core) wl = b43_wireless_init(dev); if (IS_ERR(wl)) { err = PTR_ERR(wl); + kfree(dev); goto bcma_out; } We recently had a patch that fixes this, among more leaks. Subject: [PATCH v2 resend] b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init Please test that patch instead, so we can finally apply it. It needs to be tested on both ssb and bcma. Come on. This isn't too hard. :) Please somebody with any hardware test it. (I currently don't have any b43 hardware) And the patch can be downloaded from patchwork: https://patchwork.kernel.org/patch/8049041/ I have an old laptop running on 800Mhz CPU. It has "Broadcom BCM4311 [14e4:4311] (rev 01)". I will try to test it on this weekend. 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: [RFC] mac80211: add extap functionality
2016-02-18 15:08 GMT+01:00 Felix Fietkau: > On 2016-02-18 14:36, Grzegorz Bajorski wrote: >> 2016-02-17 17:55 GMT+01:00 Felix Fietkau : >>> On 2016-02-17 12:55, Grzegorz Bajorski wrote: Client interface briding was only possible when 4addr frames were used with a 4addr/WDS aware AP. It was not possible to do it otherwise due to 3addr frame limitation. The extap logic introduces a smart MAC address masking/translation (including modyfing packets beyond SA/DA, e.g. DHCP broadcast flag is set). There are still some unsolved problems and bugs: - due to bridge port routing and sk_buff payload sharing skb_copy() is performed; this ideally should be reworked - ipv6 support is still not finished - extap is enabled by default currently; it should be configurable via nl80211 the same way 4addr is There's also an idea to move this as a generic link driver (just like macvlan, et al) which would allow unmodified cfg80211 drivers to enjoy the extap functionality. Thoughts? Note: This changes cfg80211 file in this single patch only for reviewing convienence. This is an early draft to solicit comments on the design. Signed-off-by: Grzegorz Bajorski >>> You can get a lot of the same effect (sharing the same subnet between >>> hosts behind multiple interfaces and having forwarding between them) >>> without any changes to mac80211. >>> >>> OpenWrt uses a daemon called 'relayd' which I wrote some years ago. It >>> does ARP translation, DHCP packet mangling and sets up policy routing to >>> forward packets between multiple interfaces. >>> >>> You can find it here: >>> http://git.openwrt.org/?p=project/relayd.git;a=summary >>> git://git.openwrt.org/project/relayd.git >>> >>> Since you can cover the same use cases with user space code, I don't >>> think it's a good idea to put bridge emulation hacks in the kernel's >>> wireless stack. >> >> What about performance? Quick test show that is slow ~ 100-120 mbps >> (UDP tests) and procesor is overloaded. Am I missing something? I >> would expect it to be greater. (4 x 4 antena setup VHT80) > What platform are you testing it on, and what kind of UDP test are you > running? My setup it is as follows: [laptop1] --eth-- [EA6500 AP] ~~rf~~ [AP148 STA w/ QCA99X0] --eth-- [laptop2]. I run UDP traffic between Laptop1 and Laptop2 using iperf. Laptop1: iperf -s -i1 -u Laptop2: iperf -i1 -c 192.168.1.108 -b 200M -t100 -u -P5 (without -P5, I got similar results) /Grzegorz -- 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: fix wiphy supported_band access
Fix wiphy supported_band access in tx radiotap parsing introduced in commit 5ec3aed9ba4c ("mac80211: Parse legacy and HT rate in injected frames"). In particular, info->band is always set to 0 (IEEE80211_BAND_2GHZ) since it has not assigned yet. This cause a kernel crash on 5GHz only devices. Move ieee80211_parse_tx_radiotap() after info->band assignment Signed-off-by: Lorenzo Bianconi--- v2: - improved the commit message --- net/mac80211/tx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 7bb67fa..b07d037 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1892,10 +1892,6 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_INJECTED; - /* process and remove the injection radiotap header */ - if (!ieee80211_parse_tx_radiotap(local, skb)) - goto fail; - rcu_read_lock(); /* @@ -1957,6 +1953,10 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, goto fail_rcu; info->band = chandef->chan->band; + /* process and remove the injection radiotap header */ + if (!ieee80211_parse_tx_radiotap(local, skb)) + goto fail_rcu; + ieee80211_xmit(sdata, NULL, skb); rcu_read_unlock(); -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6] staging: wilc1000: removes unnecessary wilc_debug print log
On Fri, Feb 19, 2016 at 05:37:10PM +0900, Leo Kim wrote: > This patch removes unnecessary wilc_debug print log. > The print log was written when if condition fail. > The condition is chip-id check function. > Also, replaces this condition with normal function. > > Signed-off-by: Leo Kim> --- > drivers/staging/wilc1000/wilc_wlan.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/staging/wilc1000/wilc_wlan.c > b/drivers/staging/wilc1000/wilc_wlan.c > index a51c66b..4873106 100644 > --- a/drivers/staging/wilc1000/wilc_wlan.c > +++ b/drivers/staging/wilc1000/wilc_wlan.c > @@ -508,9 +508,7 @@ void chip_wakeup(struct wilc *wilc) > > do { > usleep_range(2 * 1000, 2 * 1000); > - if ((wilc_get_chipid(wilc, true) == 0)) > - wilc_debug(N_ERR, "Couldn't read chip > id. Wake up failed\n"); > - > + wilc_get_chipid(wilc, true); Why do we need this function when we call it again on the next line? > } while ((wilc_get_chipid(wilc, true) == 0) && > ((++trials % 3) == 0)); ^^^ Also what the heck is ((++trials % 3) == 0))??? It looks like we are supposed to retry 3 times but actually we don't retry at all. :P regards, dan carpenter -- 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 2/2] mac80211: parse VHT info in injected frames
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested using a d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver Signed-off-by: Lorenzo Bianconi--- Documentation/networking/mac80211-injection.txt | 10 net/mac80211/tx.c | 31 + 2 files changed, 41 insertions(+) diff --git a/Documentation/networking/mac80211-injection.txt b/Documentation/networking/mac80211-injection.txt index ec8f934..ef57cc0 100644 --- a/Documentation/networking/mac80211-injection.txt +++ b/Documentation/networking/mac80211-injection.txt @@ -45,6 +45,16 @@ radiotap headers and used to control injection: number of retries when either IEEE80211_RADIOTAP_RATE or IEEE80211_RADIOTAP_MCS was used + * IEEE80211_RADIOTAP_VHT + + VHT rate for the transmission (only for devices without own rate control). + Also some flags are parsed + + IEEE80211_TX_RC_SHORT_GI: use short guard interval + IEEE80211_TX_RC_40_MHZ_WIDTH: send in HT40 mode + IEEE80211_TX_RC_80_MHZ_WIDTH: send in HT80 mode + IEEE80211_TX_RC_160_MHZ_WIDTH: send in HT160 mode + The injection code can also skip all other currently defined radiotap fields facilitating replay of captured radiotap headers directly. diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 7bb67fa..17db889 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1692,6 +1692,8 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local, u8 rate_retries = 0; u16 rate_flags = 0; u8 mcs_known, mcs_flags; + u16 vht_known; + u8 vht_mcs = 0, vht_nss = 0; int i; info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT | @@ -1772,6 +1774,32 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local, rate_flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; break; + case IEEE80211_RADIOTAP_VHT: + vht_known = get_unaligned_le16(iterator.this_arg); + rate_found = true; + + rate_flags = IEEE80211_TX_RC_VHT_MCS; + if ((vht_known & IEEE80211_RADIOTAP_VHT_KNOWN_GI) && + (iterator.this_arg[2] & +IEEE80211_RADIOTAP_VHT_FLAG_SGI)) + rate_flags |= IEEE80211_TX_RC_SHORT_GI; + if (vht_known & + IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH) { + if (iterator.this_arg[3] == 1) + rate_flags |= + IEEE80211_TX_RC_40_MHZ_WIDTH; + else if (iterator.this_arg[3] == 4) + rate_flags |= + IEEE80211_TX_RC_80_MHZ_WIDTH; + else if (iterator.this_arg[3] == 11) + rate_flags |= + IEEE80211_TX_RC_160_MHZ_WIDTH; + } + + vht_mcs = iterator.this_arg[4] >> 4; + vht_nss = iterator.this_arg[4] & 0xF; + break; + /* * Please update the file * Documentation/networking/mac80211-injection.txt @@ -1797,6 +1825,9 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local, if (rate_flags & IEEE80211_TX_RC_MCS) { info->control.rates[0].idx = rate; + } else if (rate_flags & IEEE80211_TX_RC_VHT_MCS) { + ieee80211_rate_set_vht(info->control.rates, vht_mcs, + vht_nss); } else { for (i = 0; i < sband->n_bitrates; i++) { if (rate * 5 != sband->bitrates[i].bitrate) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes
Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in order to define alignment and size of VHT info in tx radiotap Signed-off-by: Lorenzo Bianconi--- net/wireless/radiotap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c index 722da61..6582d15 100644 --- a/net/wireless/radiotap.c +++ b/net/wireless/radiotap.c @@ -43,6 +43,7 @@ static const struct radiotap_align_size rtap_namespace_sizes[] = { [IEEE80211_RADIOTAP_DATA_RETRIES] = { .align = 1, .size = 1, }, [IEEE80211_RADIOTAP_MCS] = { .align = 1, .size = 3, }, [IEEE80211_RADIOTAP_AMPDU_STATUS] = { .align = 4, .size = 8, }, + [IEEE80211_RADIOTAP_VHT] = { .align = 2, .size = 12, }, /* * add more here as they are defined in radiotap.h */ -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/2] add VHT radiotap parsing support to mac80211
Changelog: v2: - added cfg80211 patch to the patchset Lorenzo Bianconi (2): cfg80211: add radiotap VHT info to rtap_namespace_sizes mac80211: parse VHT info in injected frames Documentation/networking/mac80211-injection.txt | 10 net/mac80211/tx.c | 31 + net/wireless/radiotap.c | 1 + 3 files changed, 42 insertions(+) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes
> On Wed, 2016-02-10 at 17:31 +0100, Lorenzo Bianconi wrote: >> Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in >> order to >> define alignment and size of VHT info in tx radiotap >> > I think you forgot this patch in your [PATCH] resend, can you resend it > properly? Sorry, my fault :) v2 on the way. Best regards, Lorenzo > > johannes -- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] mac80211: add NEED_ALIGNED4_SKBS hw flag
HW/driver should set NEED_ALIGNED4_SKBS flag in case require aligned skbs to four-byte boundaries. This affect only TX direction. Padding is added after ieee80211_hdr, before IV/LLC. Before we have to do memmove(hdrlen) twice in the dirver. Once before we pass this to HW and next in tx completion (to be sure monitor will report this tx frame correctly). With this patch we can skip this memmove() and save CPU. Currently this was tested with ath9k, both hw/sw crypt for wep/tkip/ccmp. Signed-off-by: Janusz Dziedzic--- include/net/mac80211.h | 3 +++ net/mac80211/debugfs.c | 1 + net/mac80211/ieee80211_i.h | 23 +++ net/mac80211/sta_info.h| 2 +- net/mac80211/status.c | 13 + net/mac80211/tkip.c| 4 +++- net/mac80211/tx.c | 21 +++-- net/mac80211/util.c| 3 ++- 8 files changed, 61 insertions(+), 9 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 31337f8..561605c 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1961,6 +1961,8 @@ struct ieee80211_txq { * reordering buffer internally, guaranteeing mac80211 receives frames in * order and does not need to manage its own reorder buffer or BA session * timeout. + * @IEEE80211_HW_NEEDS_ALIGNED4_SKBS: Driver need aligned skbs to four-byte. + * Padding will be added after ieee80211_hdr, before IV/LLC. * * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ @@ -1999,6 +2001,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_BEACON_TX_STATUS, IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR, IEEE80211_HW_SUPPORTS_REORDERING_BUFFER, + IEEE80211_HW_NEEDS_ALIGNED4_SKBS, /* keep last, obviously */ NUM_IEEE80211_HW_FLAGS diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 4ab5c52..c48905e 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -127,6 +127,7 @@ static const char *hw_flag_names[] = { FLAG(BEACON_TX_STATUS), FLAG(NEEDS_UNIQUE_STA_ADDR), FLAG(SUPPORTS_REORDERING_BUFFER), + FLAG(NEEDS_ALIGNED4_SKBS), #undef FLAG }; diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 81a476a..0687f94 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1476,6 +1476,29 @@ ieee80211_have_rx_timestamp(struct ieee80211_rx_status *status) return false; } +static inline unsigned int +ieee80211_hdr_padsize(struct ieee80211_hw *hw, unsigned int hdrlen) +{ + /* +* While hdrlen is already aligned to two-byte boundaries, +* simple check with & 2 will return correct padsize. +*/ + if (ieee80211_hw_check(hw, NEEDS_ALIGNED4_SKBS)) + return hdrlen & 2; + return 0; +} + +static inline unsigned int +ieee80211_padded_hdrlen(struct ieee80211_hw *hw, __le16 fc) +{ + unsigned int hdrlen; + + hdrlen = ieee80211_hdrlen(fc); + hdrlen += ieee80211_hdr_padsize(hw, hdrlen); + + return hdrlen; +} + u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, struct ieee80211_rx_status *status, unsigned int mpdu_len, diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index f4d3899..c432f4a 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -271,7 +271,7 @@ struct ieee80211_fast_tx { u8 hdr_len; u8 sa_offs, da_offs, pn_offs; u8 band; - u8 hdr[30 + 2 + IEEE80211_FAST_XMIT_MAX_IV + + u8 hdr[30 + 2 + 2 + IEEE80211_FAST_XMIT_MAX_IV + sizeof(rfc1042_header)]; struct rcu_head rcu_head; diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 6101deb..d2b0273 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -683,9 +683,22 @@ void ieee80211_tx_monitor(struct ieee80211_local *local, struct sk_buff *skb, struct sk_buff *skb2; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_sub_if_data *sdata; + struct ieee80211_hdr *hdr = (void *)skb->data; struct net_device *prev_dev = NULL; + unsigned int hdrlen, padsize; int rtap_len; + /* Remove padding if was added */ + if (ieee80211_hw_check(>hw, NEEDS_ALIGNED4_SKBS)) { + hdrlen = ieee80211_hdrlen(hdr->frame_control); + padsize = ieee80211_hdr_padsize(>hw, hdrlen); + + if (padsize && skb->len > hdrlen + padsize) { + memmove(skb->data + padsize, skb->data, hdrlen); + skb_pull(skb, padsize); + } + } + /* send frame to monitor interfaces now */ rtap_len = ieee80211_tx_radiotap_len(info); if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c index 0ae2077..b3ab779
[PATCH 1/2] mac80211: add hdrlen to ieee80211_tx_data
Add hdrlen to ieee80211_tx_data and use this when wep/ccmd/tkip. This is preparation for aligned4 code. Signed-off-by: Janusz Dziedzic--- net/mac80211/ieee80211_i.h | 1 + net/mac80211/tx.c | 6 +++--- net/mac80211/util.c| 5 - net/mac80211/wep.c | 11 ++- net/mac80211/wep.h | 1 + net/mac80211/wpa.c | 13 + 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a29f61d..81a476a 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -172,6 +172,7 @@ struct ieee80211_tx_data { struct ieee80211_tx_rate rate; unsigned int flags; + unsigned int hdrlen; }; diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 3311ce0..cd4c361 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -915,7 +915,7 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr = (void *)skb->data; int frag_threshold = tx->local->hw.wiphy->frag_threshold; - int hdrlen; + int hdrlen = tx->hdrlen; int fragnum; /* no matter what happens, tx->skb moves to tx->skbs */ @@ -936,8 +936,6 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU)) return TX_DROP; - hdrlen = ieee80211_hdrlen(hdr->frame_control); - /* internal error, why isn't DONTFRAG set? */ if (WARN_ON(skb->len + FCS_LEN <= frag_threshold)) return TX_DROP; @@ -1165,6 +1163,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, hdr = (struct ieee80211_hdr *) skb->data; + tx->hdrlen = ieee80211_hdrlen(hdr->frame_control); + if (likely(sta)) { if (!IS_ERR(sta)) tx->sta = sta; diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 54afbf4..b3c6515 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1225,6 +1225,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, struct ieee80211_local *local = sdata->local; struct sk_buff *skb; struct ieee80211_mgmt *mgmt; + unsigned int hdrlen; int err; /* 24 + 6 = header + auth_algo + auth_transaction + status_code */ @@ -1249,8 +1250,10 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, memcpy(skb_put(skb, extra_len), extra, extra_len); if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) { + hdrlen = ieee80211_hdrlen(mgmt->frame_control); mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); - err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); + err = ieee80211_wep_encrypt(local, skb, hdrlen, key, + key_len, key_idx); WARN_ON(err); } diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index efa3f48..d14bdb0 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c @@ -89,11 +89,11 @@ static void ieee80211_wep_get_iv(struct ieee80211_local *local, static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local, struct sk_buff *skb, + unsigned int hdrlen, int keylen, int keyidx) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - unsigned int hdrlen; u8 *newhdr; hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); @@ -101,7 +101,6 @@ static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local, if (WARN_ON(skb_headroom(skb) < IEEE80211_WEP_IV_LEN)) return NULL; - hdrlen = ieee80211_hdrlen(hdr->frame_control); newhdr = skb_push(skb, IEEE80211_WEP_IV_LEN); memmove(newhdr, newhdr + IEEE80211_WEP_IV_LEN, hdrlen); @@ -160,6 +159,7 @@ int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key, */ int ieee80211_wep_encrypt(struct ieee80211_local *local, struct sk_buff *skb, + unsigned int hdrlen, const u8 *key, int keylen, int keyidx) { u8 *iv; @@ -169,7 +169,7 @@ int ieee80211_wep_encrypt(struct ieee80211_local *local, if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN)) return -1; - iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); + iv = ieee80211_wep_add_iv(local, skb, hdrlen, keylen, keyidx); if (!iv) return -1; @@ -306,13 +306,14 @@ static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) struct ieee80211_key_conf *hw_key = info->control.hw_key; if (!hw_key) { -
[PATCH 4/4] staging: wilc1000: removes linux_wlan_common.h file
From: Chris ParkThis patch removes linux_wlan_common.h file and also removes the following preprocessor at files that include it: - #include 'linux_wlan_common.h' Signed-off-by: Chris Park Signed-off-by: Leo Kim --- drivers/staging/wilc1000/linux_mon.c | 1 - drivers/staging/wilc1000/linux_wlan.c| 1 - drivers/staging/wilc1000/linux_wlan_common.h | 3 --- drivers/staging/wilc1000/wilc_msgqueue.c | 1 - drivers/staging/wilc1000/wilc_spi.c | 1 - drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 6 files changed, 8 deletions(-) delete mode 100644 drivers/staging/wilc1000/linux_wlan_common.h diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 28e52eb..637233b 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -7,7 +7,6 @@ * @version 1.0 */ #include "wilc_wfi_cfgoperations.h" -#include "linux_wlan_common.h" #include "wilc_wlan_if.h" #include "wilc_wlan.h" diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index b0cd21b..4bf3440 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1,5 +1,4 @@ #include "wilc_wfi_cfgoperations.h" -#include "linux_wlan_common.h" #include "wilc_wlan_if.h" #include "wilc_wlan.h" diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h deleted file mode 100644 index 18d902b..000 --- a/drivers/staging/wilc1000/linux_wlan_common.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef LINUX_WLAN_COMMON_H -#define LINUX_WLAN_COMMON_H -#endif diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index 780ddd3..6cb894e 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -1,7 +1,6 @@ #include "wilc_msgqueue.h" #include -#include "linux_wlan_common.h" #include #include diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 2928712..83b6910 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -18,7 +18,6 @@ #include #include -#include "linux_wlan_common.h" #include #include "wilc_wlan_if.h" #include "wilc_wlan.h" diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index c33f7a6..fbe34eb 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -11,7 +11,6 @@ #define WILC_WLAN_IF_H #include -#include "linux_wlan_common.h" #include / -- 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 3/4] staging: wilc1000: remove useless define in linux_wlan_common.h file
From: Chris ParkThis patch removes useless define in linux_wlan_common.h file Signed-off-by: Chris Park Signed-off-by: Leo Kim --- drivers/staging/wilc1000/linux_wlan_common.h | 32 1 file changed, 32 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h index 37848c0..18d902b 100644 --- a/drivers/staging/wilc1000/linux_wlan_common.h +++ b/drivers/staging/wilc1000/linux_wlan_common.h @@ -1,35 +1,3 @@ #ifndef LINUX_WLAN_COMMON_H #define LINUX_WLAN_COMMON_H - -#if defined(BEAGLE_BOARD) - #define SPI_CHANNEL 4 - - #if SPI_CHANNEL == 4 - #define MODALIAS"wilc_spi4" - #define GPIO_NUM162 - #else - #define MODALIAS"wilc_spi3" - #define GPIO_NUM133 - #endif -#elif defined(PLAT_WMS8304) /* rachel */ - #define MODALIAS"wilc_spi" - #define GPIO_NUM139 -#elif defined(PLAT_RK) - #define MODALIAS "WILC_IRQ" - #define GPIO_NUM RK30_PIN3_PD2 /* RK30_PIN3_PA1 */ -/* RK30_PIN3_PD2 */ -/* RK2928_PIN1_PA7 */ - -#elif defined(CUSTOMER_PLATFORM) -/* - TODO : specify MODALIAS name and GPIO number. This is certainly necessary for SPI interface. - * - * ex) - * #define MODALIAS "WILC_SPI" - * #define GPIO_NUM 139 - */ - -#else -/* base on SAMA5D3_Xplained Board */ -#endif #endif -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] staging: wilc1000: move MODALIS and GPIO_NUM define to wilc_wlan.h file
From: Chris ParkThis patch moves MODALIS and GPIO_NUM define to wilc_wlan.h file. MODALIS and GPIO_NUM define are used to two files (wilc_sdio.c, wilc_spi.c), these files already include wilc_wlan.h file in common. Signed-off-by: Chris Park Signed-off-by: Leo Kim --- drivers/staging/wilc1000/linux_wlan_common.h | 2 -- drivers/staging/wilc1000/wilc_wlan.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h index 5a53512..37848c0 100644 --- a/drivers/staging/wilc1000/linux_wlan_common.h +++ b/drivers/staging/wilc1000/linux_wlan_common.h @@ -31,7 +31,5 @@ #else /* base on SAMA5D3_Xplained Board */ - #define MODALIAS"WILC_SPI" - #define GPIO_NUM0x44 #endif #endif diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index 792d338..bcd4bfa 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -131,6 +131,8 @@ #define LINUX_RX_SIZE (96 * 1024) #define LINUX_TX_SIZE (64 * 1024) +#define MODALIAS "WILC_SPI" +#define GPIO_NUM 0x44 /***/ /*E0 and later Interrupt flags.*/ /***/ -- 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 1/4] staging: wilc1000: move WILC_MULTICAST_TABLE_SIZE define to wilc_wlan_if.h file
From: Chris ParkThis patch moves WILC_MULTICAST_TABLE_SIZE define to wilc_wlan_if.h file. This define is used to three files(host_interface.c,host_interface.h, linux_wlan.c) these files already include wilc_wlan_if.h file in common. Signed-off-by: Chris Park Signed-off-by: Leo Kim --- drivers/staging/wilc1000/linux_wlan_common.h | 2 -- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h index aa2c026..5a53512 100644 --- a/drivers/staging/wilc1000/linux_wlan_common.h +++ b/drivers/staging/wilc1000/linux_wlan_common.h @@ -1,8 +1,6 @@ #ifndef LINUX_WLAN_COMMON_H #define LINUX_WLAN_COMMON_H -#define WILC_MULTICAST_TABLE_SIZE 8 - #if defined(BEAGLE_BOARD) #define SPI_CHANNEL 4 diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 269c56e..c33f7a6 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -95,7 +95,7 @@ typedef void (*wilc_tx_complete_func_t)(void *, int); * Wlan Configuration ID * / - +#define WILC_MULTICAST_TABLE_SIZE 8 #define MAX_SSID_LEN33 #define MAX_RATES_SUPPORTED 12 -- 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 6/6] staging: wilc1000: wilc_wlan_cfg_init: changes unused argument
This patch changes the argument of the wilc_wlan_cfg_init function, wilc_debug to void type because wilc_debug function is not used any more. In addition, finally removes wilc_debug and related variables. Signed-off-by: Leo Kim--- drivers/staging/wilc1000/wilc_wlan.c | 17 + drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +- drivers/staging/wilc1000/wilc_wlan_cfg.h | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 4873106..461abfc 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -3,21 +3,6 @@ #include "wilc_wfi_netdevice.h" #include "wilc_wlan_cfg.h" -static u32 dbgflag = N_INIT | N_ERR | N_INTR | N_TXQ | N_RXQ; - -/* FIXME: replace with dev_debug() */ -static void wilc_debug(u32 flag, char *fmt, ...) -{ - char buf[256]; - va_list args; - - if (flag & dbgflag) { - va_start(args, fmt); - vsprintf(buf, fmt, args); - va_end(args); - } -} - static CHIP_PS_STATE_T chip_ps_state = CHIP_WAKEDUP; static inline void acquire_bus(struct wilc *wilc, BUS_ACQUIRE_T acquire) @@ -1460,7 +1445,7 @@ int wilc_wlan_init(struct net_device *dev) goto _fail_; } - if (!wilc_wlan_cfg_init(wilc_debug)) { + if (!wilc_wlan_cfg_init()) { ret = -ENOBUFS; goto _fail_; } diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index e73381d..631bbf1 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -531,7 +531,7 @@ int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size, return ret; } -int wilc_wlan_cfg_init(wilc_debug_func func) +int wilc_wlan_cfg_init(void) { memset((void *)_mac, 0, sizeof(wilc_mac_cfg_t)); return 1; diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000/wilc_wlan_cfg.h index 5f74eb8..00e5dd5 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.h +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.h @@ -36,6 +36,6 @@ int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id); int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, u32 buffer_size); int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size, struct wilc_cfg_rsp *rsp); -int wilc_wlan_cfg_init(wilc_debug_func func); +int wilc_wlan_cfg_init(void); #endif -- 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 3/6] staging: wilc1000: removes unnecessary wilc_debug print log
This patch removes unnecessary wilc_debug print log and the check routine. Signed-off-by: Leo Kim--- drivers/staging/wilc1000/wilc_wlan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 2719c3d..a51c66b 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -529,9 +529,6 @@ void chip_wakeup(struct wilc *wilc) wilc->hif_func->hif_read_reg(wilc, 0xf1, _status_reg); - - if ((clk_status_reg & 0x1) == 0) - wilc_debug(N_ERR, "clocks still OFF. Wake up failed\n"); } if ((clk_status_reg & 0x1) == 0) { wilc->hif_func->hif_write_reg(wilc, 0xf0, -- 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 4/6] staging: wilc1000: removes unnecessary wilc_debug print log
This patch removes unnecessary wilc_debug print log. The print log was written when if condition fail. The condition is chip-id check function. Also, replaces this condition with normal function. Signed-off-by: Leo Kim--- drivers/staging/wilc1000/wilc_wlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index a51c66b..4873106 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -508,9 +508,7 @@ void chip_wakeup(struct wilc *wilc) do { usleep_range(2 * 1000, 2 * 1000); - if ((wilc_get_chipid(wilc, true) == 0)) - wilc_debug(N_ERR, "Couldn't read chip id. Wake up failed\n"); - + wilc_get_chipid(wilc, true); } while ((wilc_get_chipid(wilc, true) == 0) && ((++trials % 3) == 0)); } while (wilc_get_chipid(wilc, true) == 0); -- 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 5/6] staging: wilc1000: removes unnecessary variable of wilc_mac_cfg_t structure
This patch removes unnecessary variable of wilc_mac_cfg_t structure. The variable is debug print function pointer. Removes all what used this variable. Signed-off-by: Leo Kim--- drivers/staging/wilc1000/wilc_wlan_cfg.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 2bb684a..e73381d 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -20,8 +20,6 @@ / typedef struct { - wilc_debug_func dPrint; - int mac_status; u8 mac_address[7]; u8 ip_address[5]; @@ -389,8 +387,6 @@ int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size) ret = wilc_wlan_cfg_set_str(frame, offset, id, buf, size); } else if (type == 4) { /* binary command */ ret = wilc_wlan_cfg_set_bin(frame, offset, id, buf, size); - } else { - g_mac.dPrint(N_ERR, "illegal id\n"); } return ret; @@ -481,8 +477,6 @@ int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, u32 buffer_size) } i++; } while (1); - } else { - g_mac.dPrint(N_ERR, "[CFG]: illegal type (%08x)\n", wid); } return ret; @@ -540,6 +534,5 @@ int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size, int wilc_wlan_cfg_init(wilc_debug_func func) { memset((void *)_mac, 0, sizeof(wilc_mac_cfg_t)); - g_mac.dPrint = func; return 1; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] staging: wilc1000: replaces wilc_debug with netdev_err
This patches replaces wilc_debug with netdev_err. Signed-off-by: Leo Kim--- drivers/staging/wilc1000/wilc_wlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 81a40e8..2719c3d 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1401,18 +1401,18 @@ static u32 init_chip(struct net_device *dev) if ((chipid & 0xfff) != 0xa0) { ret = wilc->hif_func->hif_read_reg(wilc, 0x1118, ); if (!ret) { - wilc_debug(N_ERR, "[wilc start]: fail read reg 0x1118 ...\n"); + netdev_err(dev, "fail read reg 0x1118\n"); return ret; } reg |= BIT(0); ret = wilc->hif_func->hif_write_reg(wilc, 0x1118, reg); if (!ret) { - wilc_debug(N_ERR, "[wilc start]: fail write reg 0x1118 ...\n"); + netdev_err(dev, "fail write reg 0x1118\n"); return ret; } ret = wilc->hif_func->hif_write_reg(wilc, 0xc, 0x71); if (!ret) { - wilc_debug(N_ERR, "[wilc start]: fail write reg 0xc ...\n"); + netdev_err(dev, "fail write reg 0xc\n"); return ret; } } -- 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 1/6] staging: wilc1000: removes wilc_dbg()
This patch removes wilc_dbg function because it's not any more. Signed-off-by: Leo Kim--- drivers/staging/wilc1000/linux_wlan.c | 4 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 -- drivers/staging/wilc1000/wilc_wlan.c | 2 -- 3 files changed, 8 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 660bf63..b0cd21b 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -224,10 +224,6 @@ static void deinit_irq(struct net_device *dev) } } -void wilc_dbg(u8 *buff) -{ -} - int wilc_lock_timeout(struct wilc *nic, void *vp, u32 timeout) { /* FIXME: replace with mutex_lock or wait_for_completion */ diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 3077f5d4..786f5fd 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -228,8 +228,6 @@ int wilc1000_wlan_init(struct net_device *dev, struct wilc_vif *vif); void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset); void wilc_mac_indicate(struct wilc *wilc, int flag); -void wilc_dbg(u8 *buff); - int wilc_lock_timeout(struct wilc *wilc, void *, u32 timeout); void wilc_netdev_cleanup(struct wilc *wilc); int wilc_netdev_init(struct wilc **wilc, struct device *, int io_type, int gpio, diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 0cd3ed8..81a40e8 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -15,8 +15,6 @@ static void wilc_debug(u32 flag, char *fmt, ...) va_start(args, fmt); vsprintf(buf, fmt, args); va_end(args); - - wilc_dbg(buf); } } -- 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