* Re: [PATCHv3 4/5] mac80211: add channel switch command and beacon callbacks
From: Michal Kazior @ 2013-07-09 7:17 UTC (permalink / raw)
To: Simon Wunderlich
Cc: Johannes Berg, linux-wireless, Mathias Kretschmer,
Simon Wunderlich
In-Reply-To: <1373289250-12259-5-git-send-email-siwu@hrz.tu-chemnitz.de>
Hi Simon,
On 8 July 2013 15:14, Simon Wunderlich
<simon.wunderlich@s2003.tu-chemnitz.de> wrote:
> +static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
> + struct cfg80211_csa_settings *params)
> +{
> + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> + struct ieee80211_local *local = sdata->local;
> + struct ieee80211_chanctx_conf *chanctx_conf;
> + struct ieee80211_chanctx *chanctx;
> + int err;
> +
> + if (!list_empty(&local->roc_list) || local->scanning)
> + return -EBUSY;
> +
> + if (sdata->wdev.cac_started)
> + return -EBUSY;
> +
> + /* don't handle if chanctx is used */
> + if (local->use_chanctx)
> + return -EBUSY;
> +
> + rcu_read_lock();
> + chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
> + if (!chanctx_conf) {
> + rcu_read_unlock();
> + return -EBUSY;
> + }
> +
> + /* don't handle for multi-VIF cases */
> + chanctx = container_of(chanctx_conf, struct ieee80211_chanctx, conf);
> + if (chanctx->refcount > 1) {
> + rcu_read_unlock();
> + return -EBUSY;
> + }
> + rcu_read_unlock();
I'm wondering if it's a huge hassle to support drivers that depend on
channel context API? Perhaps local->open_count could be used instead
of local->use_chantx and chanctx->refcount?
I'm also worried this can possibly do silly things if someone starts
an interface while CSA is under way. Consider the following:
* start AP
* initiate channel switch
[ while channel switch is in progress and driver is yet to call
ieee80211_csa_finish() ]
* start another STA interface and associate
[ CSA completes ]
Upon CSA completion the STA will be moved to a different channel
silently and most likely end up with a beacon loss quickly. I think
mac80211 should forbid bringing up any new interfaces during CSA.
It seems there's nothing preventing from multiple calls to channel
switch callback. Is this expected? Can this work if CSA is invoked
while other CSA is still in progress?
Pozdrawiam / Best regards,
Michał Kazior.
^ permalink raw reply
* RE: [PATCH 3/3] [RFC] cfg80211: Enable GO operation on additional channels
From: Peer, Ilan @ 2013-07-09 5:40 UTC (permalink / raw)
To: Jouni Malinen
Cc: linux-wireless@vger.kernel.org, mcgrof@do-not-panic.com,
Spinadel, David
In-Reply-To: <20130708100418.GA10670@w1.fi>
> -----Original Message-----
> From: Jouni Malinen [mailto:j@w1.fi]
> Sent: Monday, July 08, 2013 13:04
> To: Peer, Ilan
> Cc: linux-wireless@vger.kernel.org; mcgrof@do-not-panic.com; Spinadel, David
> Subject: Re: [PATCH 3/3] [RFC] cfg80211: Enable GO operation on additional
> channels
>
> On Tue, Jul 02, 2013 at 03:28:15PM +0300, Ilan Peer wrote:
> > Allow GO operation on a channel marked with
> IEEE80211_CHAN_INDOOR_ONLY
> > or IEEE80211_CHAN_GO_CONCURRENT iff there is an active station
> > interface that is associated to an AP operating on this channel.
> >
> > Note that this is a permissive approach to the FCC definitions, that
> > require a clear assessment that either the platform device is an
> > indoor device, or the device operating the AP is an indoor device,
> > i.e., AC powered.
> > It is assumed that these restrictions are enforced by user space.
>
> The introduction in 0/3 mentioned DFS, but I did not see it being addressed in
> any of the actual changes. Is this only for indoors vs.
> outdoors?
>
The DFS was mentioned in 0/3 in the context of an example for a case where a device can support WFD on bands where an authorized master is operating. The example assumes that the master has radar detection capabilities and is able to evacuate its operating channel if needed (which must be followed by the device also evicting the WFD operation from this channel).
The purpose of this patch was to allow the instantiation of a GO on channels marked as indoor/Concurrent GO assuming some conditions are met, ignoring the NO_IBSS and PASSIVE channels. I intend to implement to full restriction logic in the wpa_supplicant (based on the device type etc.), and also handle the actual indication that this channel can no longer be used, eviction and new channel selection in the wpa_supplicant.
> > Furthermore, it is assumed, that if the conditions that allowed for
> > the operation of the GO on such a channel change, it is the
> > responsibility of user space to evacuate the GO from the channel.
>
> Do you have plans or changes to address this? I'd assume wpa_supplicant could
> stop the group on channel list changes, but I don't think it does that currently.
Yes. This is currently WIP :)
^ permalink raw reply
* Re: [PATCH] rtlwifi: Fix Kconfig for some corner cases
From: Larry Finger @ 2013-07-09 2:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, Fengguang Wu
In-Reply-To: <1373165244-9536-1-git-send-email-Larry.Finger@lwfinger.net>
On 07/06/2013 09:47 PM, Larry Finger wrote:
> Fengguang Wu reported the following errors in the build of rtlwifi with
> a random configuration:
John,
Please drop this patch. A better one will be submitted later.
Larry
^ permalink raw reply
* Re: [PATCH] rtlwifi: Fix Kconfig for some corner cases
From: Larry Finger @ 2013-07-09 2:33 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linville, linux-wireless, netdev, Fengguang Wu
In-Reply-To: <1373330415.1860.14.camel@bwh-desktop.uk.level5networks.com>
On 07/08/2013 07:40 PM, Ben Hutchings wrote:
> On Sun, 2013-07-07 at 13:13 -0500, Larry Finger wrote:
>> On 07/07/2013 04:42 AM, Ben Hutchings wrote:
>>> On Sat, 2013-07-06 at 21:47 -0500, Larry Finger wrote:
>>>>
>>>> Although I could not duplicate this result on my machine, it seemed likely
>>>> that it was due to the unusual configuration where rtlwifi was being built,
>>>> but none of its dependent drivers were selected.
>>>
>>> I think it just requires:
>>>
>>> CONFIG_USB=m
>>> CONFIG_RTLWIFI=y
>>>
>>>> The fix is to select rtlwifi only when it is needed.
>>>
>>> I don't think so. Consider this configuration:
>>>
>>> CONFIG_PCI=y
>>> CONFIG_USB=m
>>> CONFIG_RTL_CARDS=y
>>> CONFIG_RTL8192CE=y
>>> CONFIG_RTL8192CU=m
>>> CONFIG_RTLWIFI=y # maximum of RTL8192CE=y and RTL8192CU=m
>>>
>>> The same breakage occurs.
>>
>> Ben,
>>
>> Thanks for your comments. I certainly do not claim to understand very much about
>> the whole Kbuild process.
>>
>> After setting up the above configuration manually, I ran 'make oldconfig' and
>> got back
>>
>> CONFIG_RTL_CARDS=m
>> CONFIG_RTL8192CE=m
>> CONFIG_RTL8192SE=m
>> CONFIG_RTL8192DE=m
>> CONFIG_RTL8723AE=m
>> CONFIG_RTL8188EE=m
>> CONFIG_RTL8192CU=m
>> CONFIG_RTLWIFI=m
>> CONFIG_RTLWIFI_DEBUG=y
>> CONFIG_RTL8192C_COMMON=m
>>
>> That set of configuration parameters built normally.
>
> But you can still manually set:
>
> CONFIG_PCI=y
> CONFIG_USB=m
> CONFIG_MAC80211=y # maybe you had =m here?
> CONFIG_RTL_CARDS=y
> CONFIG_RTL8192CE=y
>
> and that will select:
>
> CONFIG_RTLWIFI=y
>
>>>> While making this
>>>> change, I simplified the configuration so that variable RTLWIFI is never seen
>>>> by the user.
>>> [...]
>>>
>>> This will break existing configurations as RTL_CARDS defaults to n.
>>
>> I added a 'default y' to the RTL_CARDS stanza. I now get the following:
>>
>> finger@larrylap:~/staging> make
>> scripts/kconfig/conf --silentoldconfig Kconfig
>> *
>> * Restart config...
>> *
>> *
>> * Realtek rtlwifi family of devices
>> *
>> Realtek rtlwifi family of devices (RTL_CARDS) [M/n/?] (NEW)
>>
>> That should prevent breakage of existing configurations. It defaults to "m"
>> because mac80211 is built as a module in my configuration.
>>
>>> Perhaps you should introduce separate modules for the common PCI and USB
>>> support code, similarly to how the rt2x00 modules are organised.
>>
>> That would not be very difficult, but it would involve converting the single
>> module rtlwifi into 3 separate entities. Does that make sense to you? I'm not sure.
>
> Yes it does make sense.
I will be submitting a new patch as an RFC.
Larry
^ permalink raw reply
* Re: [PATCH] rtlwifi: Fix Kconfig for some corner cases
From: Ben Hutchings @ 2013-07-09 0:40 UTC (permalink / raw)
To: Larry Finger; +Cc: linville, linux-wireless, netdev, Fengguang Wu
In-Reply-To: <51D9AFB2.2030707@lwfinger.net>
On Sun, 2013-07-07 at 13:13 -0500, Larry Finger wrote:
> On 07/07/2013 04:42 AM, Ben Hutchings wrote:
> > On Sat, 2013-07-06 at 21:47 -0500, Larry Finger wrote:
> >>
> >> Although I could not duplicate this result on my machine, it seemed likely
> >> that it was due to the unusual configuration where rtlwifi was being built,
> >> but none of its dependent drivers were selected.
> >
> > I think it just requires:
> >
> > CONFIG_USB=m
> > CONFIG_RTLWIFI=y
> >
> >> The fix is to select rtlwifi only when it is needed.
> >
> > I don't think so. Consider this configuration:
> >
> > CONFIG_PCI=y
> > CONFIG_USB=m
> > CONFIG_RTL_CARDS=y
> > CONFIG_RTL8192CE=y
> > CONFIG_RTL8192CU=m
> > CONFIG_RTLWIFI=y # maximum of RTL8192CE=y and RTL8192CU=m
> >
> > The same breakage occurs.
>
> Ben,
>
> Thanks for your comments. I certainly do not claim to understand very much about
> the whole Kbuild process.
>
> After setting up the above configuration manually, I ran 'make oldconfig' and
> got back
>
> CONFIG_RTL_CARDS=m
> CONFIG_RTL8192CE=m
> CONFIG_RTL8192SE=m
> CONFIG_RTL8192DE=m
> CONFIG_RTL8723AE=m
> CONFIG_RTL8188EE=m
> CONFIG_RTL8192CU=m
> CONFIG_RTLWIFI=m
> CONFIG_RTLWIFI_DEBUG=y
> CONFIG_RTL8192C_COMMON=m
>
> That set of configuration parameters built normally.
But you can still manually set:
CONFIG_PCI=y
CONFIG_USB=m
CONFIG_MAC80211=y # maybe you had =m here?
CONFIG_RTL_CARDS=y
CONFIG_RTL8192CE=y
and that will select:
CONFIG_RTLWIFI=y
> >> While making this
> >> change, I simplified the configuration so that variable RTLWIFI is never seen
> >> by the user.
> > [...]
> >
> > This will break existing configurations as RTL_CARDS defaults to n.
>
> I added a 'default y' to the RTL_CARDS stanza. I now get the following:
>
> finger@larrylap:~/staging> make
> scripts/kconfig/conf --silentoldconfig Kconfig
> *
> * Restart config...
> *
> *
> * Realtek rtlwifi family of devices
> *
> Realtek rtlwifi family of devices (RTL_CARDS) [M/n/?] (NEW)
>
> That should prevent breakage of existing configurations. It defaults to "m"
> because mac80211 is built as a module in my configuration.
>
> > Perhaps you should introduce separate modules for the common PCI and USB
> > support code, similarly to how the rt2x00 modules are organised.
>
> That would not be very difficult, but it would involve converting the single
> module rtlwifi into 3 separate entities. Does that make sense to you? I'm not sure.
Yes it does make sense.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: wl127x: Unable to associate with a WPA2-PSK AP
From: José Miguel Gonçalves @ 2013-07-08 22:47 UTC (permalink / raw)
To: Arik Nemtsov; +Cc: linux-wireless, Luciano Coelho
In-Reply-To: <CA+XVXfcakDiN1pPqGDQAN=VR8p_C1LUWGt_nX-rGXDLsBkk+Dw@mail.gmail.com>
Hi Arik,
Yep, that patch solved the kernel warning, but the association with the AP is
still lost after 3 warnings;
wlcore: Beacon loss detected. roles:0xff
To use the driver in the Luca's tree I need to do some work to adapt my platform
to the latest kernel version, what I would like to avoid for now.
Is there any set of patches to put the driver in vanilla kernel 3.9 in a more
stable condition?
Best regards,
Jose Gonçalves
On 08-07-2013 20:08, Arik Nemtsov wrote:
> Hey,
>
> About the second issue - seems the following patch is missing from your tree:
> http://permalink.gmane.org/gmane.linux.kernel.wireless.general/105449
>
> So the warning is bogus. It will happen if you're working on a single
> processor (UP) system.
>
> To get the latest driver, you can use Luca's tree, which already
> contains this patch:
> git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
>
> Arik
>
>
> On Mon, Jul 8, 2013 at 9:54 PM, José Miguel Gonçalves
> <jose.goncalves@inov.pt> wrote:
>> Hi,
>>
>> After solving some initial platform issues, I'm now blocked in two more
>> issues using the wl127x driver with kernel 3.9.9 in a S3C2416 hardware based
>> platform.
>>
>> The first one is that the command "iw wlan0 scan" does not scan all
>> frequencies. I've seen a patch submitted to fix an issue in the driver for
>> the 5 GHz band
>> (http://permalink.gmane.org/gmane.linux.kernel.wireless.general/107771) but
>> this is not my issue, because I can not see also several APs in the 2.4GHz
>> band after a scan.
>>
>> The second issue is when I try to associate with an AP using WPA2-PSK with
>> wpa_supplicant (only able to reach this point by setting "scan_freq" in
>> wpa_supplicat.conf file to the frequency used by the AP, because of the
>> inability to perform of a complete scan) I get an error in the driver, as
>> shown in the log bellow:
>>
>>
>> [root ~]$ wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
>> Successfully initialized wpa_supplicant
>> [ 33.915000] wlcore: firmware booted (Rev 6.3.10.0.133)
>> [ 34.280000] cfg80211: Calling CRDA for country: PT
>> [ 34.290000] cfg80211: Regulatory domain changed to country: PT
>> [ 34.290000] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp)
>> [ 34.305000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 34.320000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 34.320000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 34.330000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A,
>> 2700 mBm)
>> [ 34.340000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm)
>> wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[
>> 34.585000] wlan0: authenticate with 88:43:e1:57:79:c0
>> A. Guidance' freq=2452 MHz)
>> [ 34.595000] ------------[ cut here ]------------
>> [ 34.595000] WARNING: at drivers/net/wireless/ti/wlcore/tx.c:1307
>> wlcore_is_queue_stopped_by_reason_locked+0x98/0xb4 [wlcore]()
>> [ 34.595000] Modules linked in: arc4 wl12xx wlcore mac80211 wlcore_sdio
>> lm70
>> [ 34.595000] Backtrace:
>> [ 34.595000] [<c000b92c>] (dump_backtrace+0x0/0x10c) from [<c02ed4a4>]
>> (dump_stack+0x18/0x1c)
>> [ 34.595000] r6:bf05ddd8 r5:00000009 r4:00000000 r3:00000000
>> [ 34.595000] [<c02ed48c>] (dump_stack+0x0/0x1c) from [<c0019ecc>]
>> (warn_slowpath_common+0x54/0x70)
>> [ 34.595000] [<c0019e78>] (warn_slowpath_common+0x0/0x70) from
>> [<c0019f0c>] (warn_slowpath_null+0x24/0x2c)
>> [ 34.595000] r8:c39e2acc r7:00000000 r6:c305b160 r5:bf06ca36 r4:00000002
>> r3:00000009
>> [ 34.595000] [<c0019ee8>] (warn_slowpath_null+0x0/0x2c) from [<bf05ddd8>]
>> (wlcore_is_queue_stopped_by_reason_locked+0x98/0xb4 [wlcore])
>> [ 34.595000] [<bf05dd40>]
>> (wlcore_is_queue_stopped_by_reason_locked+0x0/0xb4 [wlcore]) from
>> [<bf05de38>] (wlcore_is_queue_stopped_by_reason+0x44/0x7c [wlcore])
>> [ 34.595000] r6:00000000 r5:c305b160 r4:80000013
>> [ 34.595000] [<bf05ddf4>] (wlcore_is_queue_stopped_by_reason+0x0/0x7c
>> [wlcore]) from [<bf05deb4>] (wl1271_handle_tx_low_watermark+0x44/0x94
>> [wlcore])
>> [ 34.595000] r8:c305b160 r7:c39e2acc r6:00000000 r5:c39e2acc r4:00000000
>> r3:00000000
>> [ 34.595000] [<bf05de70>] (wl1271_handle_tx_low_watermark+0x0/0x94
>> [wlcore]) from [<bf05e050>] (wl1271_tx_reset_link_queues+0x14c/0x174
>> [wlcore])
>> [ 34.595000] [<bf05df04>] (wl1271_tx_reset_link_queues+0x0/0x174 [wlcore])
>> from [<bf05970c>] (wl12xx_free_link+0xec/0x150 [wlcore])
>> [ 34.595000] [<bf059620>] (wl12xx_free_link+0x0/0x150 [wlcore]) from
>> [<bf059b50>] (wl12xx_cmd_role_stop_sta+0x98/0x100 [wlcore])
>> [ 34.595000] r7:c305b160 r6:00000000 r5:c39e2acc r4:c3a89ac0
>> [ 34.595000] [<bf059ab8>] (wl12xx_cmd_role_stop_sta+0x0/0x100 [wlcore])
>> from [<bf0546d8>] (wl1271_bss_info_changed_sta+0x840/0x9a4 [wlcore])
>> [ 34.595000] r7:c39e2acc r6:c305b160 r5:c39e2a10 r4:000000e0
>> [ 34.595000] [<bf053e98>] (wl1271_bss_info_changed_sta+0x0/0x9a4 [wlcore])
>> from [<bf054a0c>] (wl1271_op_bss_info_changed+0x1d0/0x46c [wlcore])
>> [ 34.595000] [<bf05483c>] (wl1271_op_bss_info_changed+0x0/0x46c [wlcore])
>> from [<bf009538>] (ieee80211_bss_info_change_notify+0x6c/0x10c [mac80211])
>> [ 34.595000] [<bf0094cc>] (ieee80211_bss_info_change_notify+0x0/0x10c
>> [mac80211]) from [<bf02bf1c>] (ieee80211_prep_connection+0x2dc/0x76c
>> [mac80211])
>> [ 34.595000] r7:00000fff r6:c39cfe48 r5:c305b8e4 r4:c39e2440
>> [ 34.595000] [<bf02bc40>] (ieee80211_prep_connection+0x0/0x76c [mac80211])
>> from [<bf030d70>] (ieee80211_mgd_auth+0x228/0x29c [mac80211])
>> [ 34.595000] [<bf030b48>] (ieee80211_mgd_auth+0x0/0x29c [mac80211]) from
>> [<bf01afd4>] (ieee80211_auth+0x18/0x1c [mac80211])
>> [ 34.595000] [<bf01afbc>] (ieee80211_auth+0x0/0x1c [mac80211]) from
>> [<c02e40a8>] (__cfg80211_mlme_auth+0x170/0x188)
>> [ 34.595000] [<c02e3f38>] (__cfg80211_mlme_auth+0x0/0x188) from
>> [<c02e4154>] (cfg80211_mlme_auth+0x94/0xb8)
>> [ 34.595000] [<c02e40c0>] (cfg80211_mlme_auth+0x0/0xb8) from [<c02dffbc>]
>> (nl80211_authenticate+0x258/0x27c)
>> [ 34.595000] [<c02dfd64>] (nl80211_authenticate+0x0/0x27c) from
>> [<c0260044>] (genl_rcv_msg+0x23c/0x274)
>> [ 34.595000] [<c025fe08>] (genl_rcv_msg+0x0/0x274) from [<c025f458>]
>> (netlink_rcv_skb+0xb4/0xc8)
>> [ 34.595000] [<c025f3a4>] (netlink_rcv_skb+0x0/0xc8) from [<c025fdfc>]
>> (genl_rcv+0x20/0x2c)
>> [ 34.595000] r6:00000048 r5:c3a5b400 r4:c38c4bc0 r3:c025fddc
>> [ 34.595000] [<c025fddc>] (genl_rcv+0x0/0x2c) from [<c025ee40>]
>> (netlink_unicast+0x1b0/0x214)
>> [ 34.595000] r4:c38c5e00 r3:c025fddc
>> [ 34.595000] [<c025ec90>] (netlink_unicast+0x0/0x214) from [<c025f230>]
>> (netlink_sendmsg+0x2e0/0x358)
>> [ 34.595000] [<c025ef50>] (netlink_sendmsg+0x0/0x358) from [<c0230944>]
>> (sock_sendmsg+0x88/0xa8)
>> [ 34.595000] [<c02308bc>] (sock_sendmsg+0x0/0xa8) from [<c0230d64>]
>> (___sys_sendmsg+0x2c8/0x2e0)
>> [ 34.595000] [<c0230a9c>] (___sys_sendmsg+0x0/0x2e0) from [<c0232920>]
>> (__sys_sendmsg+0x44/0x70)
>> [ 34.595000] [<c02328dc>] (__sys_sendmsg+0x0/0x70) from [<c023295c>]
>> (sys_sendmsg+0x10/0x14)
>> [ 34.595000] r6:be94fa8c r5:017940a0 r4:00000000
>> [ 34.595000] [<c023294c>] (sys_sendmsg+0x0/0x14) from [<c0009400>]
>> (ret_fast_syscall+0x0/0x2c)
>> [ 34.595000] ---[ end trace a2c5f3d5ef286154 ]---
>> [ 34.605000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
>> [ 34.605000] ------------[ cut here ]------------
>> [ 34.605000] WARNING: at drivers/net/wireless/ti/wlcore/tx.c:1316
>> wlcore_is_queue_stopped_locked+0x74/0x8c [wlcore]()
>> [ 34.605000] Modules linked in: arc4 wl12xx wlcore mac80211 wlcore_sdio
>> lm70
>> [ 34.605000] Backtrace:
>> [ 34.605000] [<c000b92c>] (dump_backtrace+0x0/0x10c) from [<c02ed4a4>]
>> (dump_stack+0x18/0x1c)
>> [ 34.605000] r6:bf05f240 r5:00000009 r4:00000000 r3:00000000
>> [ 34.605000] [<c02ed48c>] (dump_stack+0x0/0x1c) from [<c0019ecc>]
>> (warn_slowpath_common+0x54/0x70)
>> [ 34.605000] [<c0019e78>] (warn_slowpath_common+0x0/0x70) from
>> [<c0019f0c>] (warn_slowpath_null+0x24/0x2c)
>> [ 34.605000] r8:40000013 r7:c305b160 r6:c305b160 r5:bf06ca36 r4:00000000
>> r3:00000009
>> [ 34.605000] [<c0019ee8>] (warn_slowpath_null+0x0/0x2c) from [<bf05f240>]
>> (wlcore_is_queue_stopped_locked+0x74/0x8c [wlcore])
>> [ 34.605000] [<bf05f1cc>] (wlcore_is_queue_stopped_locked+0x0/0x8c
>> [wlcore]) from [<bf05225c>] (wl1271_op_tx+0x104/0x290 [wlcore])
>> [ 34.605000] r6:c39e2a10 r5:00000001 r4:c38c4a40 r3:00000003
>> [ 34.605000] [<bf052158>] (wl1271_op_tx+0x0/0x290 [wlcore]) from
>> [<bf023e64>] (__ieee80211_tx+0x134/0x384 [mac80211])
>> [ 34.605000] [<bf023d30>] (__ieee80211_tx+0x0/0x384 [mac80211]) from
>> [<bf024174>] (ieee80211_tx+0xc0/0xe8 [mac80211])
>> [ 34.605000] [<bf0240b4>] (ieee80211_tx+0x0/0xe8 [mac80211]) from
>> [<bf02474c>] (ieee80211_xmit+0x80/0x94 [mac80211])
>> [ 34.605000] [<bf0246cc>] (ieee80211_xmit+0x0/0x94 [mac80211]) from
>> [<bf025698>] (__ieee80211_tx_skb_tid_band+0x58/0x64 [mac80211])
>> [ 34.605000] r8:00000000 r7:00000001 r6:00000000 r5:c39e2440 r4:c38c4a40
>> r3:c3ae8000
>> [ 34.605000] [<bf025640>] (__ieee80211_tx_skb_tid_band+0x0/0x64
>> [mac80211]) from [<bf0286c4>] (ieee80211_send_auth+0x158/0x1e0 [mac80211])
>> [ 34.605000] r6:c39e2440 r5:c38c4a40 r4:c3ac8b94 r3:00000000
>> [ 34.605000] [<bf02856c>] (ieee80211_send_auth+0x0/0x1e0 [mac80211]) from
>> [<bf02c550>] (ieee80211_probe_auth+0x174/0x2c8 [mac80211])
>> [ 34.605000] [<bf02c3dc>] (ieee80211_probe_auth+0x0/0x2c8 [mac80211]) from
>> [<bf030d80>] (ieee80211_mgd_auth+0x238/0x29c [mac80211])
>> [ 34.605000] r8:c39e2798 r7:00000000 r6:c39e2440 r5:c3a72c20 r4:c3ae9af8
>> [ 34.605000] [<bf030b48>] (ieee80211_mgd_auth+0x0/0x29c [mac80211]) from
>> [<bf01afd4>] (ieee80211_auth+0x18/0x1c [mac80211])
>> [ 34.605000] [<bf01afbc>] (ieee80211_auth+0x0/0x1c [mac80211]) from
>> [<c02e40a8>] (__cfg80211_mlme_auth+0x170/0x188)
>> [ 34.605000] [<c02e3f38>] (__cfg80211_mlme_auth+0x0/0x188) from
>> [<c02e4154>] (cfg80211_mlme_auth+0x94/0xb8)
>> [ 34.605000] [<c02e40c0>] (cfg80211_mlme_auth+0x0/0xb8) from [<c02dffbc>]
>> (nl80211_authenticate+0x258/0x27c)
>> [ 34.605000] [<c02dfd64>] (nl80211_authenticate+0x0/0x27c) from
>> [<c0260044>] (genl_rcv_msg+0x23c/0x274)
>> [ 34.605000] [<c025fe08>] (genl_rcv_msg+0x0/0x274) from [<c025f458>]
>> (netlink_rcv_skb+0xb4/0xc8)
>> [ 34.605000] [<c025f3a4>] (netlink_rcv_skb+0x0/0xc8) from [<c025fdfc>]
>> (genl_rcv+0x20/0x2c)
>> [ 34.605000] r6:00000048 r5:c3a5b400 r4:c38c4bc0 r3:c025fddc
>> [ 34.605000] [<c025fddc>] (genl_rcv+0x0/0x2c) from [<c025ee40>]
>> (netlink_unicast+0x1b0/0x214)
>> [ 34.605000] r4:c38c5e00 r3:c025fddc
>> [ 34.605000] [<c025ec90>] (netlink_unicast+0x0/0x214) from [<c025f230>]
>> (netlink_sendmsg+0x2e0/0x358)
>> [ 34.605000] [<c025ef50>] (netlink_sendmsg+0x0/0x358) from [<c0230944>]
>> (sock_sendmsg+0x88/0xa8)
>> [ 34.605000] [<c02308bc>] (sock_sendmsg+0x0/0xa8) from [<c0230d64>]
>> (___sys_sendmsg+0x2c8/0x2e0)
>> [ 34.605000] [<c0230a9c>] (___sys_sendmsg+0x0/0x2e0) from [<c0232920>]
>> (__sys_sendmsg+0x44/0x70)
>> [ 34.605000] [<c02328dc>] (__sys_sendmsg+0x0/0x70) from [<c023295c>]
>> (sys_sendmsg+0x10/0x14)
>> [ 34.605000] r6:be94fa8c r5:017940a0 r4:00000000
>> [ 34.605000] [<c023294c>] (sys_sendmsg+0x0/0x14) from [<c0009400>]
>> (ret_fast_syscall+0x0/0x2c)
>> [ 34.605000] ---[ end trace a2c5f3d5ef286155 ]---
>> [ 34.625000] wlan0: send auth to 88:43:e1:57:79:c0 (try 2/3)
>> [ 34.640000] wlan0: send auth to 88:43:e1:57:79:c0 (try 3/3)
>> [ 34.650000] wlan0: authentication with 88:43:e1:57:79:c0 timed out
>> wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[
>> 34.875000] wlan0: authenticate with 88:43:e1:57:79:c0
>> A. Guidance' freq=2452 MHz)
>> [ 34.915000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
>> [ 34.920000] wlan0: authenticated
>> wlan0: Trying to associate with 88:43:e1:57:79:c0 (SSID='A. Guidance'
>> freq=2452 MHz)
>> [ 34.995000] wlan0: associate with 88:43:e1:57:79:c0 (try 1/3)
>> [ 35.015000] wlan0: associate with 88:43:e1:57:79:c0 (try 2/3)
>> [ 35.035000] wlan0: associate with 88:43:e1:57:79:c0 (try 3/3)
>> [ 35.060000] wlan0: association with 88:43:e1:57:79:c0 timed out
>> wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[
>> 35.620000] wlan0: authenticate with 88:43:e1:57:79:c0
>> A. Guidance' freq=2452 MHz)
>> [ 35.660000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
>> [ 35.665000] wlan0: authenticated
>> wlan0: Trying to associate with 88:43:e1:57:79:c0 (SSID='A. Guidance'
>> freq=2452 MHz)
>> [ 35.740000] wlan0: associate with 88:43:e1:57:79:c0 (try 1/3)
>> [ 35.745000] wlan0: RX AssocResp from 88:43:e1:57:79:c0 (capab=0x431
>> status=0 aid=2)
>> [ 35.765000] wlan0: associated
>> [ 35.770000] cfg80211: Calling CRDA for country: PT
>> [ 35.780000] cfg80211: Regulatory domain changed to country: PT
>> [ 35.780000] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp)
>> [ 35.790000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 35.790000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 35.800000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 35.800000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A,
>> 2700 mBm)
>> [ 35.810000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm)
>> wlan0: Associated with 88:43:e1:57:79:c0
>> [ 37.585000] wlcore: Beacon loss detected. roles:0xff
>> [ 39.250000] wlcore: Beacon loss detected. roles:0xff
>> [ 40.935000] wlcore: Beacon loss detected. roles:0xff
>> [ 42.400000] wlcore: Connection loss work (role_id: 0).
>> [ 42.400000] wlan0: Connection to AP 88:43:e1:57:79:c0 lost
>> [ 42.475000] cfg80211: Calling CRDA to update world regulatory domain
>> [ 42.485000] cfg80211: World regulatory domain updated:
>> [ 42.485000] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp)
>> [ 42.500000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300
>> mBi, 2000 mBm)
>> [ 42.500000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300
>> mBi, 2000 mBm)
>> [ 42.515000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300
>> mBi, 2000 mBm)
>> [ 42.515000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300
>> mBi, 2000 mBm)
>> [ 42.525000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300
>> mBi, 2000 mBm)
>> [ 42.525000] cfg80211: Calling CRDA for country: PT
>> [ 42.540000] cfg80211: Regulatory domain changed to country: PT
>> [ 42.540000] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp)
>> [ 42.550000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 42.550000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 42.560000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
>> 2000 mBm)
>> [ 42.560000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A,
>> 2700 mBm)
>> wlan0: CTRL-EVENT-DISCONNECTED bssid=88:43:e1:57:79:c0 reason=4 l[
>> 42.575000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A,
>> 4000 mBm)
>> ocally_generated=1
>> wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
>> wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="A. Guidance" auth_failures=1
>> duration=10
>>
>>
>> Any ideas in what could be wrong?
>>
>> Best regards,
>> José Gonçalves
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
____________________________________________________________
José Miguel P. Gonçalves * email: jose.goncalves@inov.pt
*
INOV * Tel.(Phone): +351 213 100 474
Av. Duque de Ávila, 23 *
1000-138 Lisboa *
PORTUGAL * WWW: http://www.inov.pt
____________________________________________________________
^ permalink raw reply
* Re: [PATCH 3/3] [RFC] cfg80211: Enable GO operation on additional channels
From: Luis R. Rodriguez @ 2013-07-08 22:04 UTC (permalink / raw)
To: Ilan Peer
Cc: David Spinadel, linux-wireless,
wireless-regdb@lists.infradead.org, Jouni Malinen
In-Reply-To: <1372768095-26053-4-git-send-email-ilan.peer@intel.com>
On Tue, Jul 2, 2013 at 5:28 AM, Ilan Peer <ilan.peer@intel.com> wrote:
> From: David Spinadel <david.spinadel@intel.com>
>
> Allow GO operation on a channel marked with
> IEEE80211_CHAN_INDOOR_ONLY or IEEE80211_CHAN_GO_CONCURRENT
> iff there is an active station interface that is associated to
> an AP operating on this channel.
>
> Note that this is a permissive approach to the FCC definitions,
> that require a clear assessment that either the platform device
> is an indoor device, or the device operating the AP is an indoor
> device, i.e., AC powered.
> It is assumed that these restrictions are enforced by user space.
> Furthermore, it is assumed, that if the conditions that allowed for
> the operation of the GO on such a channel change, it is the
> responsibility of user space to evacuate the GO from the channel.
In the context of strict regulatory data we currently do not
differentiate specifically between a device that can initiate
radiation between AP and Group Owner (GO) but in your earlier patches
you proposed a way to do that. I reviewed feedback on that patch
there. It may make sense however to define clearly what you mean by
why the flag is being introduced by documenting the use case, ie what
you describe here. Other regulatory bodies may follow and it helps to
provide context here.
My review below.
> Signed-off-by: David Spinadel <david.spinadel@intel.com>
> Signed-off-by: Ilan Peer <ilan.peer@intel.com>
> ---
> include/net/cfg80211.h | 4 +-
> net/mac80211/ibss.c | 2 +-
> net/wireless/Kconfig | 10 +++++
> net/wireless/chan.c | 98 ++++++++++++++++++++++++++++++++++++++++++++----
> net/wireless/mesh.c | 2 +-
> net/wireless/nl80211.c | 8 ++--
> net/wireless/trace.h | 11 ++++--
> 7 files changed, 118 insertions(+), 17 deletions(-)
>
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index f0badeb..17d693d 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -4070,12 +4070,14 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy,
> * cfg80211_reg_can_beacon - check if beaconing is allowed
> * @wiphy: the wiphy
> * @chandef: the channel definition
> + * @p2p_go: if the interface type is a P2P GO
> *
> * Return: %true if there is no secondary channel or the secondary channel(s)
> * can be used for beaconing (i.e. is not a radar channel etc.)
> */
> bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
> - struct cfg80211_chan_def *chandef);
> + struct cfg80211_chan_def *chandef,
> + bool p2p_go);
>
> /*
> * cfg80211_ch_switch_notify - update wdev channel and notify userspace
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index ea7b9c2..1e0fac1 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -82,7 +82,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
> sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
>
> chandef = ifibss->chandef;
> - if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
> + if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef, false)) {
> chandef.width = NL80211_CHAN_WIDTH_20;
> chandef.center_freq1 = chan->center_freq;
> }
> diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
> index de76078..d9e2be7 100644
> --- a/net/wireless/Kconfig
> +++ b/net/wireless/Kconfig
> @@ -102,6 +102,16 @@ config CFG80211_REG_CELLULAR_HINTS
> This option adds support for drivers that can receive regulatory
> hints from cellular base stations
>
> +config CFG80211_REG_SOFT_CONFIGURATIONS
> + bool "cfg80211 support for GO operation on additional channels"
> + depends on CFG80211 && CFG80211_CERTIFICATION_ONUS
> + ---help---
> + This option enables the operation of a P2P Group Owner on
> + additional channels, if there is a clear assessment that
> + the platform device operates in an indoor environment or
> + in case that there is an additional BSS interface which is
> + connected to an AP which is an indoor device.
> +
I like this approach, indeed this is great work and reflects usage of
the onus kconfig option appropriately in this case due dilligence
required more in part on userspace / other components for full
regulatory compliance.
> config CFG80211_DEFAULT_PS
> bool "enable powersave by default"
> depends on CFG80211
> diff --git a/net/wireless/chan.c b/net/wireless/chan.c
> index 50f6195..92d9e3c 100644
> --- a/net/wireless/chan.c
> +++ b/net/wireless/chan.c
> @@ -457,18 +457,102 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
> }
> EXPORT_SYMBOL(cfg80211_chandef_usable);
>
> +#ifdef CPTCFG_CFG80211_REG_SOFT_CONFIGURATIONS
> +static int cfg80211_get_unii_band(int freq)
> +{
> + /* UNII-1 */
> + if (freq >= 5150 && freq <= 5250)
> + return 0;
> +
> + /* UNII-2 */
> + if (freq > 5250 && freq <= 5350)
> + return 1;
> +
> + /* UNII-2E */
> + if (freq >= 5470 && freq <= 5725)
> + return 2;
> +
> + /* UNII-3 */
> + if (freq > 5725 && freq <= 5825)
> + return 3;
> +
> + WARN_ON(1);
> + return -EINVAL;
> +}
> +#endif
#else?
Are you aware of UNII-1, UNII-2, UNII-2E, UNII-3 are specific world
regulatory language bands? When I last tried to look for a clear
definition I could not find a clear definition of them and its why on
the ath module on for QCA modules I state "we call these" in reference
to the UNII nomenclature. If we can get a clear resource for its
definition that would help here.
> +
> +/* For GO only, check if the channel can be used under permissive conditions
> + * mandated by the FCC, i.e., the channel is marked as:
Ah -- note - FCC, you are making an FCC specific rule global, that
doesn't seems right. The implementation should reflect that *some*
regulatory bodies are implicating software requirements for GO
operation and in that case this tries to implement such known current
interpretations.
Hope is that regulatory bodies will stick to this singular
interpretation / preference when required.
So my point: your code treats this appropriately as agnostic to the
regulatory body but your comments do not, just modify the comments
more to make it more agnostic.
> + * 1. Indoor only: a GO can be operational on such a channel, iff there is
> + * clear assessment that the platform device is indoor.
> + * 2. Concurrent GO: a GO can be operational on such a channel, iff there is an
> + * additional station interface connected to an AP on this channel.
> + *
> + * TODO: The function is too permissive, as it does not verify the platform
> + * device type is indeed indoor, or that the AP is indoor/AC powered.
So to do this properly we need an eventual userspace API to throw to
kernelspace if we are AC powered? We'll need this to enhance this
routine here?
> + */
> +static bool cfg80211_can_go_use_chan(struct cfg80211_registered_device *rdev,
> + struct ieee80211_channel *chan)
> +{
> +#ifdef CPTCFG_CFG80211_REG_SOFT_CONFIGURATIONS
> + struct wireless_dev *wdev_iter;
> +
> + ASSERT_RTNL();
> +
> + if (!(chan->flags & (IEEE80211_CHAN_INDOOR_ONLY |
> + IEEE80211_CHAN_GO_CONCURRENT)))
> + return false;
> +
> + if (chan->band == IEEE80211_BAND_60GHZ)
> + return false;
> +
> + list_for_each_entry(wdev_iter, &rdev->wdev_list, list) {
> + struct ieee80211_channel *other_chan = NULL;
> +
> + if (wdev_iter->iftype != NL80211_IFTYPE_STATION ||
> + (!netif_running(wdev_iter->netdev)))
> + continue;
> +
> +
> + wdev_lock(wdev_iter);
> + if (wdev_iter->current_bss)
> + other_chan = wdev_iter->current_bss->pub.channel;
> + wdev_unlock(wdev_iter);
> +
> + if (!other_chan)
> + continue;
> +
> + if (chan == other_chan)
> + return true;
> + else if ((chan->band == IEEE80211_BAND_5GHZ) &&
> + (cfg80211_get_unii_band(chan->center_freq) ==
> + cfg80211_get_unii_band(other_chan->center_freq)))
> + return true;
> + }
> +#endif
> + return false;
> +}
Please wrap code as follows:
#ifdef FOO
static int foo(void)
{
return true;
}
#else
static int foo(void)
return false;
}
#endif
In the meantime, while you get all your patch sets properly developed
I'd recommend to define the code returning false there strictly or
perhaps for any flag on the channel requiring DFS / no-ibss, or
passive scan. The stricter case, defining false always, seems to be
what you are suggesting here.
Do you have a white list that can exclude some channels for now
globally or somehow as all this lines up?
Luis
^ permalink raw reply
* Re:
From: Joe Perches @ 2013-07-08 22:04 UTC (permalink / raw)
To: Jeffrey (Sheng-Hui) Chu; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <90AC93A0CCA054488FFC508D6F62B6F40FED489B@IRVEXCHMB07.corp.ad.broadcom.com>
On Mon, 2013-07-08 at 21:52 +0000, Jeffrey (Sheng-Hui) Chu wrote:
[]
> diff --git a/drivers/nfc/bcm2079x/bcm2079x-i2c.c b/drivers/nfc/bcm2079x/bcm2079x-i2c.c
[]
> +/* do not change below */
> +#define MAX_BUFFER_SIZE 780
[]
> +static ssize_t bcm2079x_dev_read(struct file *filp, char __user *buf,
> + size_t count, loff_t *offset)
> +{
> + struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
> + unsigned char tmp[MAX_BUFFER_SIZE];
780 bytes on stack isn't a great idea.
> +static ssize_t bcm2079x_dev_write(struct file *filp, const char __user *buf,
> + size_t count, loff_t *offset)
> +{
> + struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
> + char tmp[MAX_BUFFER_SIZE];
etc.
> + int ret;
> +
> + if (count > MAX_BUFFER_SIZE) {
> + dev_err(&bcm2079x_dev->client->dev, "out of memory\n");
Out of memory isn't really true.
The packet size is just too big for your
little buffer.
> +static int bcm2079x_dev_open(struct inode *inode, struct file *filp)
> +{
> + int ret = 0;
> +
> + struct bcm2079x_dev *bcm2079x_dev = container_of(filp->private_data,
> + struct bcm2079x_dev,
> + bcm2079x_device);
> + filp->private_data = bcm2079x_dev;
> + bcm2079x_init_stat(bcm2079x_dev);
> + bcm2079x_enable_irq(bcm2079x_dev);
> + dev_info(&bcm2079x_dev->client->dev,
> + "%d,%d\n", imajor(inode), iminor(inode));
Looks to me like this should be dev_dbg not dev_info
^ permalink raw reply
* (no subject)
From: Jeffrey (Sheng-Hui) Chu @ 2013-07-08 21:52 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
>From b4555081b1d27a31c22abede8e0397f1d61fbb04 Mon Sep 17 00:00:00 2001
From: Jeffrey Chu <jeffchu@broadcom.com>
Date: Mon, 8 Jul 2013 17:50:21 -0400
Subject: [PATCH] Add bcm2079x-i2c driver for Bcm2079x NFC Controller.
Signed-off-by: Jeffrey Chu <jeffchu@broadcom.com>
---
drivers/nfc/Kconfig | 1 +
drivers/nfc/Makefile | 1 +
drivers/nfc/bcm2079x/Kconfig | 10 +
drivers/nfc/bcm2079x/Makefile | 4 +
drivers/nfc/bcm2079x/bcm2079x-i2c.c | 416 +++++++++++++++++++++++++++++++++++
drivers/nfc/bcm2079x/bcm2079x.h | 34 +++
6 files changed, 466 insertions(+)
create mode 100644 drivers/nfc/bcm2079x/Kconfig
create mode 100644 drivers/nfc/bcm2079x/Makefile
create mode 100644 drivers/nfc/bcm2079x/bcm2079x-i2c.c
create mode 100644 drivers/nfc/bcm2079x/bcm2079x.h
diff --git a/drivers/nfc/Kconfig b/drivers/nfc/Kconfig
index 74a852e..fa540f4 100644
--- a/drivers/nfc/Kconfig
+++ b/drivers/nfc/Kconfig
@@ -38,5 +38,6 @@ config NFC_MEI_PHY
source "drivers/nfc/pn544/Kconfig"
source "drivers/nfc/microread/Kconfig"
+source "drivers/nfc/bcm2079x/Kconfig"
endmenu
diff --git a/drivers/nfc/Makefile b/drivers/nfc/Makefile
index aa6bd65..a56adf6 100644
--- a/drivers/nfc/Makefile
+++ b/drivers/nfc/Makefile
@@ -7,5 +7,6 @@ obj-$(CONFIG_NFC_MICROREAD) += microread/
obj-$(CONFIG_NFC_PN533) += pn533.o
obj-$(CONFIG_NFC_WILINK) += nfcwilink.o
obj-$(CONFIG_NFC_MEI_PHY) += mei_phy.o
+obj-$(CONFIG_NFC_PN544) += bcm2079x/
ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG
diff --git a/drivers/nfc/bcm2079x/Kconfig b/drivers/nfc/bcm2079x/Kconfig
new file mode 100644
index 0000000..889e181
--- /dev/null
+++ b/drivers/nfc/bcm2079x/Kconfig
@@ -0,0 +1,10 @@
+config NFC_BCM2079X_I2C
+ tristate "NFC BCM2079x i2c support"
+ depends on I2C
+ default n
+ ---help---
+ Broadcom BCM2079x i2c driver.
+ This is a driver that allows transporting NCI/HCI command and response
+ to/from Broadcom bcm2079x NFC Controller. Select this if your
+ platform is using i2c bus to controll this chip.
+
diff --git a/drivers/nfc/bcm2079x/Makefile b/drivers/nfc/bcm2079x/Makefile
new file mode 100644
index 0000000..be64d35
--- /dev/null
+++ b/drivers/nfc/bcm2079x/Makefile
@@ -0,0 +1,4 @@
+#
+# Makefile for bcm2079x NFC driver
+#
+obj-$(CONFIG_NFC_BCM2079X_I2C) += bcm2079x-i2c.o
diff --git a/drivers/nfc/bcm2079x/bcm2079x-i2c.c b/drivers/nfc/bcm2079x/bcm2079x-i2c.c
new file mode 100644
index 0000000..988a65e
--- /dev/null
+++ b/drivers/nfc/bcm2079x/bcm2079x-i2c.c
@@ -0,0 +1,416 @@
+/*
+ * Copyright (C) 2013 Broadcom Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/slab.h>
+#include <linux/i2c.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/gpio.h>
+#include <linux/miscdevice.h>
+#include <linux/spinlock.h>
+#include <linux/poll.h>
+
+#include "bcm2079x.h"
+
+/* do not change below */
+#define MAX_BUFFER_SIZE 780
+
+/* Read data */
+#define PACKET_HEADER_SIZE_NCI (4)
+#define PACKET_HEADER_SIZE_HCI (3)
+#define PACKET_TYPE_NCI (16)
+#define PACKET_TYPE_HCIEV (4)
+#define MAX_PACKET_SIZE (PACKET_HEADER_SIZE_NCI + 255)
+
+struct bcm2079x_dev {
+ wait_queue_head_t read_wq;
+ struct mutex read_mutex;
+ struct i2c_client *client;
+ struct miscdevice bcm2079x_device;
+ unsigned int wake_gpio;
+ unsigned int en_gpio;
+ unsigned int irq_gpio;
+ bool irq_enabled;
+ spinlock_t irq_enabled_lock;
+ unsigned int count_irq;
+};
+
+static void bcm2079x_init_stat(struct bcm2079x_dev *bcm2079x_dev)
+{
+ bcm2079x_dev->count_irq = 0;
+}
+
+static void bcm2079x_disable_irq(struct bcm2079x_dev *bcm2079x_dev)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&bcm2079x_dev->irq_enabled_lock, flags);
+ if (bcm2079x_dev->irq_enabled) {
+ disable_irq_nosync(bcm2079x_dev->client->irq);
+ bcm2079x_dev->irq_enabled = false;
+ }
+ spin_unlock_irqrestore(&bcm2079x_dev->irq_enabled_lock, flags);
+}
+
+static void bcm2079x_enable_irq(struct bcm2079x_dev *bcm2079x_dev)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&bcm2079x_dev->irq_enabled_lock, flags);
+ if (!bcm2079x_dev->irq_enabled) {
+ bcm2079x_dev->irq_enabled = true;
+ enable_irq(bcm2079x_dev->client->irq);
+ }
+ spin_unlock_irqrestore(&bcm2079x_dev->irq_enabled_lock, flags);
+}
+
+static void set_client_addr(struct bcm2079x_dev *bcm2079x_dev, int addr)
+{
+ struct i2c_client *client = bcm2079x_dev->client;
+ dev_info(&client->dev,
+ "Set client device address from 0x%04X flag = "
+ "%02x, to 0x%04X\n",
+ client->addr, client->flags, addr);
+ client->addr = addr;
+ if (addr < 0x80)
+ client->flags &= ~I2C_CLIENT_TEN;
+ else
+ client->flags |= I2C_CLIENT_TEN;
+}
+
+static irqreturn_t bcm2079x_dev_irq_handler(int irq, void *dev_id)
+{
+ struct bcm2079x_dev *bcm2079x_dev = dev_id;
+ unsigned long flags;
+
+ spin_lock_irqsave(&bcm2079x_dev->irq_enabled_lock, flags);
+ bcm2079x_dev->count_irq++;
+ spin_unlock_irqrestore(&bcm2079x_dev->irq_enabled_lock, flags);
+ wake_up(&bcm2079x_dev->read_wq);
+
+ return IRQ_HANDLED;
+}
+
+static unsigned int bcm2079x_dev_poll(struct file *filp, poll_table *wait)
+{
+ struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
+ unsigned int mask = 0;
+ unsigned long flags;
+
+ poll_wait(filp, &bcm2079x_dev->read_wq, wait);
+
+ spin_lock_irqsave(&bcm2079x_dev->irq_enabled_lock, flags);
+ if (bcm2079x_dev->count_irq > 0) {
+ bcm2079x_dev->count_irq--;
+ mask |= POLLIN | POLLRDNORM;
+ }
+ spin_unlock_irqrestore(&bcm2079x_dev->irq_enabled_lock, flags);
+
+ return mask;
+}
+
+static ssize_t bcm2079x_dev_read(struct file *filp, char __user *buf,
+ size_t count, loff_t *offset)
+{
+ struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
+ unsigned char tmp[MAX_BUFFER_SIZE];
+ int total, len, ret;
+
+ total = 0;
+ len = 0;
+
+ if (count > MAX_BUFFER_SIZE)
+ count = MAX_BUFFER_SIZE;
+
+ mutex_lock(&bcm2079x_dev->read_mutex);
+
+ /* Read the first 4 bytes to include the length of the NCI or
+ HCI packet.*/
+ ret = i2c_master_recv(bcm2079x_dev->client, tmp, 4);
+ if (ret == 4) {
+ total = ret;
+ /* First byte is the packet type*/
+ switch (tmp[0]) {
+ case PACKET_TYPE_NCI:
+ len = tmp[PACKET_HEADER_SIZE_NCI-1];
+ break;
+
+ case PACKET_TYPE_HCIEV:
+ len = tmp[PACKET_HEADER_SIZE_HCI-1];
+ if (len == 0)
+ total--;
+ else
+ len--;
+ break;
+
+ default:
+ len = 0;/*Unknown packet byte */
+ break;
+ } /* switch*/
+
+ /* make sure full packet fits in the buffer*/
+ if (len > 0 && (len + total) <= count) {
+ /** read the remainder of the packet.
+ **/
+ ret = i2c_master_recv(bcm2079x_dev->client, tmp+total,
+ len);
+ if (ret == len)
+ total += len;
+ } /* if */
+ } /* if */
+
+ mutex_unlock(&bcm2079x_dev->read_mutex);
+
+ if (total > count || copy_to_user(buf, tmp, total)) {
+ dev_err(&bcm2079x_dev->client->dev,
+ "failed to copy to user space, total = %d\n", total);
+ total = -EFAULT;
+ }
+
+ return total;
+}
+
+static ssize_t bcm2079x_dev_write(struct file *filp, const char __user *buf,
+ size_t count, loff_t *offset)
+{
+ struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
+ char tmp[MAX_BUFFER_SIZE];
+ int ret;
+
+ if (count > MAX_BUFFER_SIZE) {
+ dev_err(&bcm2079x_dev->client->dev, "out of memory\n");
+ return -ENOMEM;
+ }
+
+ if (copy_from_user(tmp, buf, count)) {
+ dev_err(&bcm2079x_dev->client->dev,
+ "failed to copy from user space\n");
+ return -EFAULT;
+ }
+
+ mutex_lock(&bcm2079x_dev->read_mutex);
+ /* Write data */
+
+ ret = i2c_master_send(bcm2079x_dev->client, tmp, count);
+ if (ret != count) {
+ dev_err(&bcm2079x_dev->client->dev,
+ "failed to write %d\n", ret);
+ ret = -EIO;
+ }
+ mutex_unlock(&bcm2079x_dev->read_mutex);
+
+ return ret;
+}
+
+static int bcm2079x_dev_open(struct inode *inode, struct file *filp)
+{
+ int ret = 0;
+
+ struct bcm2079x_dev *bcm2079x_dev = container_of(filp->private_data,
+ struct bcm2079x_dev,
+ bcm2079x_device);
+ filp->private_data = bcm2079x_dev;
+ bcm2079x_init_stat(bcm2079x_dev);
+ bcm2079x_enable_irq(bcm2079x_dev);
+ dev_info(&bcm2079x_dev->client->dev,
+ "%d,%d\n", imajor(inode), iminor(inode));
+
+ return ret;
+}
+
+static long bcm2079x_dev_unlocked_ioctl(struct file *filp,
+ unsigned int cmd, unsigned long arg)
+{
+ struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
+
+ switch (cmd) {
+ case BCMNFC_POWER_CTL:
+ gpio_set_value(bcm2079x_dev->en_gpio, arg);
+ break;
+ case BCMNFC_WAKE_CTL:
+ gpio_set_value(bcm2079x_dev->wake_gpio, arg);
+ break;
+ case BCMNFC_SET_ADDR:
+ set_client_addr(bcm2079x_dev, arg);
+ break;
+ default:
+ dev_err(&bcm2079x_dev->client->dev,
+ "%s, unknown cmd (%x, %lx)\n", __func__, cmd, arg);
+ return -ENOSYS;
+ }
+
+ return 0;
+}
+
+static const struct file_operations bcm2079x_dev_fops = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .poll = bcm2079x_dev_poll,
+ .read = bcm2079x_dev_read,
+ .write = bcm2079x_dev_write,
+ .open = bcm2079x_dev_open,
+ .unlocked_ioctl = bcm2079x_dev_unlocked_ioctl
+};
+
+static int bcm2079x_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+{
+ int ret;
+ struct bcm2079x_platform_data *platform_data;
+ struct bcm2079x_dev *bcm2079x_dev;
+
+ platform_data = client->dev.platform_data;
+
+ dev_info(&client->dev, "%s, probing bcm2079x driver flags = %x\n",
+ __func__, client->flags);
+ if (platform_data == NULL) {
+ dev_err(&client->dev, "nfc probe fail\n");
+ return -ENODEV;
+ }
+
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
+ dev_err(&client->dev, "need I2C_FUNC_I2C\n");
+ return -ENODEV;
+ }
+
+ ret = gpio_request_one(platform_data->irq_gpio, GPIOF_IN, "nfc_irq");
+ if (ret)
+ return -ENODEV;
+ ret = gpio_request_one(platform_data->en_gpio, GPIOF_OUT_INIT_LOW,
+ "nfc_en");
+ if (ret)
+ goto err_en;
+ ret = gpio_request_one(platform_data->wake_gpio, GPIOF_OUT_INIT_LOW,
+ "nfc_wake");
+ if (ret)
+ goto err_wake;
+
+ gpio_set_value(platform_data->en_gpio, 0);
+ gpio_set_value(platform_data->wake_gpio, 0);
+
+ bcm2079x_dev = kzalloc(sizeof(*bcm2079x_dev), GFP_KERNEL);
+ if (bcm2079x_dev == NULL) {
+ dev_err(&client->dev,
+ "failed to allocate memory for module data\n");
+ ret = -ENOMEM;
+ goto err_exit;
+ }
+
+ bcm2079x_dev->wake_gpio = platform_data->wake_gpio;
+ bcm2079x_dev->irq_gpio = platform_data->irq_gpio;
+ bcm2079x_dev->en_gpio = platform_data->en_gpio;
+ bcm2079x_dev->client = client;
+
+ /* init mutex and queues */
+ init_waitqueue_head(&bcm2079x_dev->read_wq);
+ mutex_init(&bcm2079x_dev->read_mutex);
+ spin_lock_init(&bcm2079x_dev->irq_enabled_lock);
+
+ bcm2079x_dev->bcm2079x_device.minor = MISC_DYNAMIC_MINOR;
+ bcm2079x_dev->bcm2079x_device.name = "bcm2079x-i2c";
+ bcm2079x_dev->bcm2079x_device.fops = &bcm2079x_dev_fops;
+
+ ret = misc_register(&bcm2079x_dev->bcm2079x_device);
+ if (ret) {
+ dev_err(&client->dev, "misc_register failed\n");
+ goto err_misc_register;
+ }
+
+ /* request irq. the irq is set whenever the chip has data available
+ * for reading. it is cleared when all data has been read.
+ */
+ dev_info(&client->dev, "requesting IRQ %d\n", client->irq);
+ bcm2079x_dev->irq_enabled = true;
+ ret = request_irq(client->irq, bcm2079x_dev_irq_handler,
+ IRQF_TRIGGER_RISING, client->name, bcm2079x_dev);
+ if (ret) {
+ dev_err(&client->dev, "request_irq failed\n");
+ goto err_request_irq_failed;
+ }
+ bcm2079x_disable_irq(bcm2079x_dev);
+ i2c_set_clientdata(client, bcm2079x_dev);
+ dev_info(&client->dev,
+ "%s, probing bcm2079x driver exited successfully\n",
+ __func__);
+ return 0;
+
+err_request_irq_failed:
+ misc_deregister(&bcm2079x_dev->bcm2079x_device);
+err_misc_register:
+ mutex_destroy(&bcm2079x_dev->read_mutex);
+ kfree(bcm2079x_dev);
+err_exit:
+ gpio_free(platform_data->wake_gpio);
+err_wake:
+ gpio_free(platform_data->en_gpio);
+err_en:
+ gpio_free(platform_data->irq_gpio);
+ return ret;
+}
+
+static int bcm2079x_remove(struct i2c_client *client)
+{
+ struct bcm2079x_dev *bcm2079x_dev;
+
+ bcm2079x_dev = i2c_get_clientdata(client);
+ free_irq(client->irq, bcm2079x_dev);
+ misc_deregister(&bcm2079x_dev->bcm2079x_device);
+ mutex_destroy(&bcm2079x_dev->read_mutex);
+ gpio_free(bcm2079x_dev->irq_gpio);
+ gpio_free(bcm2079x_dev->en_gpio);
+ gpio_free(bcm2079x_dev->wake_gpio);
+ kfree(bcm2079x_dev);
+
+ return 0;
+}
+
+static const struct i2c_device_id bcm2079x_id[] = {
+ {"bcm2079x-i2c", 0},
+ {}
+};
+
+static struct i2c_driver bcm2079x_driver = {
+ .id_table = bcm2079x_id,
+ .probe = bcm2079x_probe,
+ .remove = bcm2079x_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "bcm2079x-i2c",
+ },
+};
+
+/*
+ * module load/unload record keeping
+ */
+
+static int __init bcm2079x_dev_init(void)
+{
+ return i2c_add_driver(&bcm2079x_driver);
+}
+module_init(bcm2079x_dev_init);
+
+static void __exit bcm2079x_dev_exit(void)
+{
+ i2c_del_driver(&bcm2079x_driver);
+}
+module_exit(bcm2079x_dev_exit);
+
+MODULE_AUTHOR("Broadcom");
+MODULE_DESCRIPTION("NFC bcm2079x driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/nfc/bcm2079x/bcm2079x.h b/drivers/nfc/bcm2079x/bcm2079x.h
new file mode 100644
index 0000000..b8b243f
--- /dev/null
+++ b/drivers/nfc/bcm2079x/bcm2079x.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2013 Broadcom Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _BCM2079X_H
+#define _BCM2079X_H
+
+#define BCMNFC_MAGIC 0xFA
+
+#define BCMNFC_POWER_CTL _IO(BCMNFC_MAGIC, 0x01)
+#define BCMNFC_WAKE_CTL _IO(BCMNFC_MAGIC, 0x05)
+#define BCMNFC_SET_ADDR _IO(BCMNFC_MAGIC, 0x07)
+
+struct bcm2079x_platform_data {
+ unsigned int irq_gpio;
+ unsigned int en_gpio;
+ unsigned int wake_gpio;
+};
+
+#endif
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH 1/3] [RFC] cfg80211: Add indoor only and GO concurrent channel attributes
From: Luis R. Rodriguez @ 2013-07-08 21:45 UTC (permalink / raw)
To: Ilan Peer, wireless-regdb@lists.infradead.org
Cc: linux-wireless, David Spinadel
In-Reply-To: <1372768095-26053-2-git-send-email-ilan.peer@intel.com>
Cc'ing a few other lists for a wider review.
On Tue, Jul 2, 2013 at 5:28 AM, Ilan Peer <ilan.peer@intel.com> wrote:
> From: David Spinadel <david.spinadel@intel.com>
>
> The FCC are clarifying some soft configuration requirements,
> which among other includes the following:
>
> 1. Concurrent GO operation, where devices may support WFD in
> bands where an authorized master (for example with DFS and
> DFS and radar detection capability in the UNII band) is operating.
Is WFD WiFi Display? Is there any strict relationship here to WFD and
GO and regulatory or is WFD just a use case example? Are you
indicating that the FCC is making special rules for cases in specific
bands where GO *can* co-exist with other GO devices ?
You annotate that this is somehow related to DFS, are the GO
concurrent rules that the FCC is defining only applicable to DFS
frequency ranges? If so would it suffice to only use DFS flag ? Or are
there other special cases beyond DFS frequency ranges that the FCC is
creating special handling?
Apart from the FCC are you aware of special cases handling for other
regulatory bodies at this point?
Note that we have already these on regdb.h from CRDA:
/*
* The Linux map defined in <linux/uapi/nl80211.h> enum nl80211_reg_rule_flags
*/
enum reg_rule_flags {
RRF_NO_OFDM = 1<<0, /* OFDM modulation not allowed */
RRF_NO_CCK = 1<<1, /* CCK modulation not allowed */
RRF_NO_INDOOR = 1<<2, /* indoor operation not allowed */
RRF_NO_OUTDOOR = 1<<3, /* outdoor operation not allowed */
RRF_DFS = 1<<4, /* DFS support is required to be
* used */
RRF_PTP_ONLY = 1<<5, /* this is only for Point To Point
* links */
RRF_PTMP_ONLY = 1<<6, /* this is only for Point To Multi
* Point links */
RRF_PASSIVE_SCAN = 1<<7, /* passive scan is required */
RRF_NO_IBSS = 1<<8, /* IBSS is not allowed */
};
Historically we don't distinguish then a type of 802.11 device that
initiates radiation except for the NO_IBSS rule, but that rule can be
treated more as legacy given that the intent and motivation behind
that was that some ODMs simply preferred an interpretation of
regulatory rules and we *currently* don't use that in much places
other than custom regulatory domains defined in the kernel. The
PTP_ONLY and PTMP_ONLY are example other rules that could potentially
have been used but to this day we haven't found a use case for it
given that typical 802.11 devices are PTMP.
I mention the NO_IBSS case as I'd like to try to avoid adding GO
specific flag if we can figure out a way to make this more generic. At
this point for example I think a more appropriate flag is in place:
* NO_IR - cannot initiate radiation
And this could in turn end up replacing most use cases of NO_IBSS and
PASSIVE_SCAN givne that both of these imply we cannot initiate
radiation unless specific things are done. I wonder if we can fold the
GO flag into this and perhaps rename the NO_IBSS flag to the GO one.
Also note that we should keep the flags in sync with the uapi nl80211
change. Please review these suggestions and let me know what you
think.
> 2. Indoor operation, where in bands requiring indoor operation, the
> device must be programmed to detect indoor operation, or
> - Device must be connected to AC Power
Does anyone know if the FCC considers "indoor" if we power a device
through the car on AC power through a converter ? Are we willing to
ignore that corner case?
> - Device must be under the control of a local master that is acting
Interesting, so some APIs would be defined, I take it on hostapd to do
the proper callbacks to 'slave' type of devices that depend on the
local master(s). I could envision this being implemented on hostapd by
expanding the AP interface type and associating 'slave' devices and
callbacks for updates on AP device updates (channel changes, and so
on). Is this work being planned?
Luis
> as an AP and is connected to AC Power.
>
> See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
>
> Add support for advertising Indoor-only and Concurrent-GO channel
> properties.
>
> Signed-off-by: David Spinadel <david.spinadel@intel.com>
> Signed-off-by: Ilan Peer <ilan.peer@intel.com>
> ---
> include/net/cfg80211.h | 6 ++++++
> include/uapi/linux/nl80211.h | 7 +++++++
> net/wireless/nl80211.c | 6 ++++++
> 3 files changed, 19 insertions(+)
>
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index 7b0730a..f0badeb 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -110,6 +110,10 @@ enum ieee80211_band {
> * channel as the control or any of the secondary channels.
> * This may be due to the driver or due to regulatory bandwidth
> * restrictions.
> + * @IEEE80211_CHAN_INDOOR_ONLY: Only indoor use is permitted on this channel.
> + * @IEEE80211_CHAN_GO_CONCURRENT: GO operation is allowed on this channel if
> + * it's connected concurrently to a BSS on the same channel on 2.4 or
> + * to a channel in the same UNII band on 5.2.
> */
> enum ieee80211_channel_flags {
> IEEE80211_CHAN_DISABLED = 1<<0,
> @@ -121,6 +125,8 @@ enum ieee80211_channel_flags {
> IEEE80211_CHAN_NO_OFDM = 1<<6,
> IEEE80211_CHAN_NO_80MHZ = 1<<7,
> IEEE80211_CHAN_NO_160MHZ = 1<<8,
> + IEEE80211_CHAN_INDOOR_ONLY = 1<<9,
> + IEEE80211_CHAN_GO_CONCURRENT = 1<<10,
> };
>
> #define IEEE80211_CHAN_NO_HT40 \
> diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
> index 861e5eb..09a4f6b 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -2158,6 +2158,11 @@ enum nl80211_band_attr {
> * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
> * using this channel as the primary or any of the secondary channels
> * isn't possible
> + * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Indoor only use is permitted
> + * on this channel in current regulatory domain.
> + * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
> + * channel if it's connected concurrently to a BSS on the same channel on
> + * 2.4 or to a channel in the same UNII band on 5.2.
> * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
> * currently defined
> * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
> @@ -2176,6 +2181,8 @@ enum nl80211_frequency_attr {
> NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
> NL80211_FREQUENCY_ATTR_NO_80MHZ,
> NL80211_FREQUENCY_ATTR_NO_160MHZ,
> + NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
> + NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
>
> /* keep last */
> __NL80211_FREQUENCY_ATTR_AFTER_LAST,
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 7dc3343..cf22b22 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -563,6 +563,12 @@ static int nl80211_msg_put_channel(struct sk_buff *msg,
> if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
> nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ))
> goto nla_put_failure;
> + if ((chan->flags & IEEE80211_CHAN_INDOOR_ONLY) &&
> + nla_put_flag(msg, NL80211_FREQUENCY_ATTR_INDOOR_ONLY))
> + goto nla_put_failure;
> + if ((chan->flags & IEEE80211_CHAN_GO_CONCURRENT) &&
> + nla_put_flag(msg, NL80211_FREQUENCY_ATTR_GO_CONCURRENT))
> + goto nla_put_failure;
> }
>
> if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
> --
> 1.7.10.4
>
^ permalink raw reply
* Re: [RFC 42/53] wireless-regdb: ID, Indonesia - enable 5 GHz and VHT80
From: Luis R. Rodriguez @ 2013-07-08 20:23 UTC (permalink / raw)
To: Paul Stewart
Cc: John Linville, wireless-regdb@lists.infradead.org, linux-wireless
In-Reply-To: <CAMcMvsiQb=byYEV4z2aZUYCLjRmqJUm_SQrUrOPUXrrfkcjeLA@mail.gmail.com>
On Thu, Jul 4, 2013 at 10:51 AM, Paul Stewart <pstew@chromium.org> wrote:
> On Wed, Jul 3, 2013 at 6:04 PM, Luis R. Rodriguez
> <mcgrof@do-not-panic.com> wrote:
>>
>> From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
>>
>> Pursuant to:
>>
>> http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf,
>>
>> provide a 5GHz rule for Indonesian regulatory domain. QCA has
>> also verified VHT80 can be enabled. Patch originally posted by
>> Paul Stewart <pstew@chromium.org>, I just modified to enable 80 MHz
>> bandwidth.
>>
>> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
> Signed-off-by: Paul Stewart <pstew@chromium.org>
Given I've been promoting the idea of taking the Linux kernel DCO and
making it a standalone project [0] it is critical for me to promote
proper usage of the Signed-off-by tag. In this case it is not
required, and a more appropriate tag is either Acked-by or
Reviewed-by. I'll add Acked-by for you and respin, thanks!
[0] https://docs.google.com/presentation/d/1J4VTSTuiJ88xcvOrYg7HRvwUoxOW9qvnBqOfoPPuc64/edit
Luis
^ permalink raw reply
* Re: [RFC 42/53] wireless-regdb: ID, Indonesia - enable 5 GHz and VHT80
From: Luis R. Rodriguez @ 2013-07-08 20:20 UTC (permalink / raw)
To: Krishna Chaitanya
Cc: Arend van Spriel, John W. Linville,
wireless-regdb@lists.infradead.org, linux-wireless
In-Reply-To: <CABPxzYLD3xp9vyTA42PsCdNo1qAm4+X4OrqFTN70-aGvO52FeQ@mail.gmail.com>
On Thu, Jul 4, 2013 at 12:29 PM, Krishna Chaitanya
<chaitanya.mgit@gmail.com> wrote:
> On Thu, Jul 4, 2013 at 11:53 PM, Arend van Spriel <arend@broadcom.com> wrote:
>>
>> On 07/04/2013 03:04 AM, Luis R. Rodriguez wrote:
>>>
>>> From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
>>>
>>> Pursuant to:
>>>
>>> http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf,
>>>
>>> provide a 5GHz rule for Indonesian regulatory domain. QCA has
>>> also verified VHT80 can be enabled. Patch originally posted by
>>> Paul Stewart <pstew@chromium.org>, I just modified to enable 80 MHz
>>> bandwidth.
>>
>>
>> Hi Luis,
>>
>> Is it just me or did you make a typo. Should '@ 20' be '@ 80' ?
Indeed, typo, I'll fix in my next iteration!
> But as per the document shared above the maximum BW allowed is 20MHz only, no?
> So is the VHT80 tested by QCA compliant to the reg rules?
Yes it is.
Luis
^ permalink raw reply
* Re: 3.9.5+: Crash in tcp_input.c:4810.
From: Ben Greear @ 2013-07-08 20:17 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, linux-wireless@vger.kernel.org
In-Reply-To: <1373314235.4979.121.camel@edumazet-glaptop>
On 07/08/2013 01:10 PM, Eric Dumazet wrote:
> On Mon, 2013-07-08 at 12:59 -0700, Ben Greear wrote:
>
>>> There is this thing in ath9k about aggregating two frags
>>>
>>> drivers/net/wireless/ath/ath9k/recv.c line 1298 contains :
>>>
>>> RX_STAT_INC(rx_frags);
>>>
>>> Could you check these stats (I do not know if they are reported by
>>> ethtool -S or another debugging facility) and check if rx_frags is ever
>>> increasing ?
>>
>> They are in debugfs, and they appear to increase fairly often, for
>> instance:
>>
>> [root@lec2010-ath9k-1 lanforge]# cat /debug/ieee80211/wiphy0/ath9k/recv|tail -5
>> RX-Pkts-All : 288009442
>> RX-Bytes-All : 4067932166
>> RX-Beacons : 14826735
>> RX-Frags : 3944
>> RX-Spectral : 0
>>
>> I don't have the stats from the system that reproduced the bug
>> (it has been rebooted), but if I do see the bug again, I'll
>> grab the rx-frags and other stats just in case it shows
>> some anomaly.
>>
>
> Reading this code again, I believe following patch is needed.
>
> Could you test it ?
Sure, will do. Adding the linux-wireless mailing list as well.
Thanks,
Ben
>
> Thanks
>
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index 8be2b5d..f642f04 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -1317,7 +1317,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
> if (sc->rx.frag) {
> int space = skb->len - skb_tailroom(hdr_skb);
>
> - if (pskb_expand_head(hdr_skb, 0, space, GFP_ATOMIC) < 0) {
> + if (space > 0 &&
> + pskb_expand_head(hdr_skb, 0, space, GFP_ATOMIC) < 0) {
> dev_kfree_skb(skb);
> RX_STAT_INC(rx_oom_err);
> goto requeue_drop_frag;
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: wl127x: Unable to associate with a WPA2-PSK AP
From: Arik Nemtsov @ 2013-07-08 19:08 UTC (permalink / raw)
To: José Miguel Gonçalves; +Cc: linux-wireless, Luciano Coelho
In-Reply-To: <51DB0ACC.7050800@inov.pt>
Hey,
About the second issue - seems the following patch is missing from your tree:
http://permalink.gmane.org/gmane.linux.kernel.wireless.general/105449
So the warning is bogus. It will happen if you're working on a single
processor (UP) system.
To get the latest driver, you can use Luca's tree, which already
contains this patch:
git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
Arik
On Mon, Jul 8, 2013 at 9:54 PM, José Miguel Gonçalves
<jose.goncalves@inov.pt> wrote:
> Hi,
>
> After solving some initial platform issues, I'm now blocked in two more
> issues using the wl127x driver with kernel 3.9.9 in a S3C2416 hardware based
> platform.
>
> The first one is that the command "iw wlan0 scan" does not scan all
> frequencies. I've seen a patch submitted to fix an issue in the driver for
> the 5 GHz band
> (http://permalink.gmane.org/gmane.linux.kernel.wireless.general/107771) but
> this is not my issue, because I can not see also several APs in the 2.4GHz
> band after a scan.
>
> The second issue is when I try to associate with an AP using WPA2-PSK with
> wpa_supplicant (only able to reach this point by setting "scan_freq" in
> wpa_supplicat.conf file to the frequency used by the AP, because of the
> inability to perform of a complete scan) I get an error in the driver, as
> shown in the log bellow:
>
>
> [root ~]$ wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
> Successfully initialized wpa_supplicant
> [ 33.915000] wlcore: firmware booted (Rev 6.3.10.0.133)
> [ 34.280000] cfg80211: Calling CRDA for country: PT
> [ 34.290000] cfg80211: Regulatory domain changed to country: PT
> [ 34.290000] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
> [ 34.305000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 34.320000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 34.320000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 34.330000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A,
> 2700 mBm)
> [ 34.340000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm)
> wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[
> 34.585000] wlan0: authenticate with 88:43:e1:57:79:c0
> A. Guidance' freq=2452 MHz)
> [ 34.595000] ------------[ cut here ]------------
> [ 34.595000] WARNING: at drivers/net/wireless/ti/wlcore/tx.c:1307
> wlcore_is_queue_stopped_by_reason_locked+0x98/0xb4 [wlcore]()
> [ 34.595000] Modules linked in: arc4 wl12xx wlcore mac80211 wlcore_sdio
> lm70
> [ 34.595000] Backtrace:
> [ 34.595000] [<c000b92c>] (dump_backtrace+0x0/0x10c) from [<c02ed4a4>]
> (dump_stack+0x18/0x1c)
> [ 34.595000] r6:bf05ddd8 r5:00000009 r4:00000000 r3:00000000
> [ 34.595000] [<c02ed48c>] (dump_stack+0x0/0x1c) from [<c0019ecc>]
> (warn_slowpath_common+0x54/0x70)
> [ 34.595000] [<c0019e78>] (warn_slowpath_common+0x0/0x70) from
> [<c0019f0c>] (warn_slowpath_null+0x24/0x2c)
> [ 34.595000] r8:c39e2acc r7:00000000 r6:c305b160 r5:bf06ca36 r4:00000002
> r3:00000009
> [ 34.595000] [<c0019ee8>] (warn_slowpath_null+0x0/0x2c) from [<bf05ddd8>]
> (wlcore_is_queue_stopped_by_reason_locked+0x98/0xb4 [wlcore])
> [ 34.595000] [<bf05dd40>]
> (wlcore_is_queue_stopped_by_reason_locked+0x0/0xb4 [wlcore]) from
> [<bf05de38>] (wlcore_is_queue_stopped_by_reason+0x44/0x7c [wlcore])
> [ 34.595000] r6:00000000 r5:c305b160 r4:80000013
> [ 34.595000] [<bf05ddf4>] (wlcore_is_queue_stopped_by_reason+0x0/0x7c
> [wlcore]) from [<bf05deb4>] (wl1271_handle_tx_low_watermark+0x44/0x94
> [wlcore])
> [ 34.595000] r8:c305b160 r7:c39e2acc r6:00000000 r5:c39e2acc r4:00000000
> r3:00000000
> [ 34.595000] [<bf05de70>] (wl1271_handle_tx_low_watermark+0x0/0x94
> [wlcore]) from [<bf05e050>] (wl1271_tx_reset_link_queues+0x14c/0x174
> [wlcore])
> [ 34.595000] [<bf05df04>] (wl1271_tx_reset_link_queues+0x0/0x174 [wlcore])
> from [<bf05970c>] (wl12xx_free_link+0xec/0x150 [wlcore])
> [ 34.595000] [<bf059620>] (wl12xx_free_link+0x0/0x150 [wlcore]) from
> [<bf059b50>] (wl12xx_cmd_role_stop_sta+0x98/0x100 [wlcore])
> [ 34.595000] r7:c305b160 r6:00000000 r5:c39e2acc r4:c3a89ac0
> [ 34.595000] [<bf059ab8>] (wl12xx_cmd_role_stop_sta+0x0/0x100 [wlcore])
> from [<bf0546d8>] (wl1271_bss_info_changed_sta+0x840/0x9a4 [wlcore])
> [ 34.595000] r7:c39e2acc r6:c305b160 r5:c39e2a10 r4:000000e0
> [ 34.595000] [<bf053e98>] (wl1271_bss_info_changed_sta+0x0/0x9a4 [wlcore])
> from [<bf054a0c>] (wl1271_op_bss_info_changed+0x1d0/0x46c [wlcore])
> [ 34.595000] [<bf05483c>] (wl1271_op_bss_info_changed+0x0/0x46c [wlcore])
> from [<bf009538>] (ieee80211_bss_info_change_notify+0x6c/0x10c [mac80211])
> [ 34.595000] [<bf0094cc>] (ieee80211_bss_info_change_notify+0x0/0x10c
> [mac80211]) from [<bf02bf1c>] (ieee80211_prep_connection+0x2dc/0x76c
> [mac80211])
> [ 34.595000] r7:00000fff r6:c39cfe48 r5:c305b8e4 r4:c39e2440
> [ 34.595000] [<bf02bc40>] (ieee80211_prep_connection+0x0/0x76c [mac80211])
> from [<bf030d70>] (ieee80211_mgd_auth+0x228/0x29c [mac80211])
> [ 34.595000] [<bf030b48>] (ieee80211_mgd_auth+0x0/0x29c [mac80211]) from
> [<bf01afd4>] (ieee80211_auth+0x18/0x1c [mac80211])
> [ 34.595000] [<bf01afbc>] (ieee80211_auth+0x0/0x1c [mac80211]) from
> [<c02e40a8>] (__cfg80211_mlme_auth+0x170/0x188)
> [ 34.595000] [<c02e3f38>] (__cfg80211_mlme_auth+0x0/0x188) from
> [<c02e4154>] (cfg80211_mlme_auth+0x94/0xb8)
> [ 34.595000] [<c02e40c0>] (cfg80211_mlme_auth+0x0/0xb8) from [<c02dffbc>]
> (nl80211_authenticate+0x258/0x27c)
> [ 34.595000] [<c02dfd64>] (nl80211_authenticate+0x0/0x27c) from
> [<c0260044>] (genl_rcv_msg+0x23c/0x274)
> [ 34.595000] [<c025fe08>] (genl_rcv_msg+0x0/0x274) from [<c025f458>]
> (netlink_rcv_skb+0xb4/0xc8)
> [ 34.595000] [<c025f3a4>] (netlink_rcv_skb+0x0/0xc8) from [<c025fdfc>]
> (genl_rcv+0x20/0x2c)
> [ 34.595000] r6:00000048 r5:c3a5b400 r4:c38c4bc0 r3:c025fddc
> [ 34.595000] [<c025fddc>] (genl_rcv+0x0/0x2c) from [<c025ee40>]
> (netlink_unicast+0x1b0/0x214)
> [ 34.595000] r4:c38c5e00 r3:c025fddc
> [ 34.595000] [<c025ec90>] (netlink_unicast+0x0/0x214) from [<c025f230>]
> (netlink_sendmsg+0x2e0/0x358)
> [ 34.595000] [<c025ef50>] (netlink_sendmsg+0x0/0x358) from [<c0230944>]
> (sock_sendmsg+0x88/0xa8)
> [ 34.595000] [<c02308bc>] (sock_sendmsg+0x0/0xa8) from [<c0230d64>]
> (___sys_sendmsg+0x2c8/0x2e0)
> [ 34.595000] [<c0230a9c>] (___sys_sendmsg+0x0/0x2e0) from [<c0232920>]
> (__sys_sendmsg+0x44/0x70)
> [ 34.595000] [<c02328dc>] (__sys_sendmsg+0x0/0x70) from [<c023295c>]
> (sys_sendmsg+0x10/0x14)
> [ 34.595000] r6:be94fa8c r5:017940a0 r4:00000000
> [ 34.595000] [<c023294c>] (sys_sendmsg+0x0/0x14) from [<c0009400>]
> (ret_fast_syscall+0x0/0x2c)
> [ 34.595000] ---[ end trace a2c5f3d5ef286154 ]---
> [ 34.605000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
> [ 34.605000] ------------[ cut here ]------------
> [ 34.605000] WARNING: at drivers/net/wireless/ti/wlcore/tx.c:1316
> wlcore_is_queue_stopped_locked+0x74/0x8c [wlcore]()
> [ 34.605000] Modules linked in: arc4 wl12xx wlcore mac80211 wlcore_sdio
> lm70
> [ 34.605000] Backtrace:
> [ 34.605000] [<c000b92c>] (dump_backtrace+0x0/0x10c) from [<c02ed4a4>]
> (dump_stack+0x18/0x1c)
> [ 34.605000] r6:bf05f240 r5:00000009 r4:00000000 r3:00000000
> [ 34.605000] [<c02ed48c>] (dump_stack+0x0/0x1c) from [<c0019ecc>]
> (warn_slowpath_common+0x54/0x70)
> [ 34.605000] [<c0019e78>] (warn_slowpath_common+0x0/0x70) from
> [<c0019f0c>] (warn_slowpath_null+0x24/0x2c)
> [ 34.605000] r8:40000013 r7:c305b160 r6:c305b160 r5:bf06ca36 r4:00000000
> r3:00000009
> [ 34.605000] [<c0019ee8>] (warn_slowpath_null+0x0/0x2c) from [<bf05f240>]
> (wlcore_is_queue_stopped_locked+0x74/0x8c [wlcore])
> [ 34.605000] [<bf05f1cc>] (wlcore_is_queue_stopped_locked+0x0/0x8c
> [wlcore]) from [<bf05225c>] (wl1271_op_tx+0x104/0x290 [wlcore])
> [ 34.605000] r6:c39e2a10 r5:00000001 r4:c38c4a40 r3:00000003
> [ 34.605000] [<bf052158>] (wl1271_op_tx+0x0/0x290 [wlcore]) from
> [<bf023e64>] (__ieee80211_tx+0x134/0x384 [mac80211])
> [ 34.605000] [<bf023d30>] (__ieee80211_tx+0x0/0x384 [mac80211]) from
> [<bf024174>] (ieee80211_tx+0xc0/0xe8 [mac80211])
> [ 34.605000] [<bf0240b4>] (ieee80211_tx+0x0/0xe8 [mac80211]) from
> [<bf02474c>] (ieee80211_xmit+0x80/0x94 [mac80211])
> [ 34.605000] [<bf0246cc>] (ieee80211_xmit+0x0/0x94 [mac80211]) from
> [<bf025698>] (__ieee80211_tx_skb_tid_band+0x58/0x64 [mac80211])
> [ 34.605000] r8:00000000 r7:00000001 r6:00000000 r5:c39e2440 r4:c38c4a40
> r3:c3ae8000
> [ 34.605000] [<bf025640>] (__ieee80211_tx_skb_tid_band+0x0/0x64
> [mac80211]) from [<bf0286c4>] (ieee80211_send_auth+0x158/0x1e0 [mac80211])
> [ 34.605000] r6:c39e2440 r5:c38c4a40 r4:c3ac8b94 r3:00000000
> [ 34.605000] [<bf02856c>] (ieee80211_send_auth+0x0/0x1e0 [mac80211]) from
> [<bf02c550>] (ieee80211_probe_auth+0x174/0x2c8 [mac80211])
> [ 34.605000] [<bf02c3dc>] (ieee80211_probe_auth+0x0/0x2c8 [mac80211]) from
> [<bf030d80>] (ieee80211_mgd_auth+0x238/0x29c [mac80211])
> [ 34.605000] r8:c39e2798 r7:00000000 r6:c39e2440 r5:c3a72c20 r4:c3ae9af8
> [ 34.605000] [<bf030b48>] (ieee80211_mgd_auth+0x0/0x29c [mac80211]) from
> [<bf01afd4>] (ieee80211_auth+0x18/0x1c [mac80211])
> [ 34.605000] [<bf01afbc>] (ieee80211_auth+0x0/0x1c [mac80211]) from
> [<c02e40a8>] (__cfg80211_mlme_auth+0x170/0x188)
> [ 34.605000] [<c02e3f38>] (__cfg80211_mlme_auth+0x0/0x188) from
> [<c02e4154>] (cfg80211_mlme_auth+0x94/0xb8)
> [ 34.605000] [<c02e40c0>] (cfg80211_mlme_auth+0x0/0xb8) from [<c02dffbc>]
> (nl80211_authenticate+0x258/0x27c)
> [ 34.605000] [<c02dfd64>] (nl80211_authenticate+0x0/0x27c) from
> [<c0260044>] (genl_rcv_msg+0x23c/0x274)
> [ 34.605000] [<c025fe08>] (genl_rcv_msg+0x0/0x274) from [<c025f458>]
> (netlink_rcv_skb+0xb4/0xc8)
> [ 34.605000] [<c025f3a4>] (netlink_rcv_skb+0x0/0xc8) from [<c025fdfc>]
> (genl_rcv+0x20/0x2c)
> [ 34.605000] r6:00000048 r5:c3a5b400 r4:c38c4bc0 r3:c025fddc
> [ 34.605000] [<c025fddc>] (genl_rcv+0x0/0x2c) from [<c025ee40>]
> (netlink_unicast+0x1b0/0x214)
> [ 34.605000] r4:c38c5e00 r3:c025fddc
> [ 34.605000] [<c025ec90>] (netlink_unicast+0x0/0x214) from [<c025f230>]
> (netlink_sendmsg+0x2e0/0x358)
> [ 34.605000] [<c025ef50>] (netlink_sendmsg+0x0/0x358) from [<c0230944>]
> (sock_sendmsg+0x88/0xa8)
> [ 34.605000] [<c02308bc>] (sock_sendmsg+0x0/0xa8) from [<c0230d64>]
> (___sys_sendmsg+0x2c8/0x2e0)
> [ 34.605000] [<c0230a9c>] (___sys_sendmsg+0x0/0x2e0) from [<c0232920>]
> (__sys_sendmsg+0x44/0x70)
> [ 34.605000] [<c02328dc>] (__sys_sendmsg+0x0/0x70) from [<c023295c>]
> (sys_sendmsg+0x10/0x14)
> [ 34.605000] r6:be94fa8c r5:017940a0 r4:00000000
> [ 34.605000] [<c023294c>] (sys_sendmsg+0x0/0x14) from [<c0009400>]
> (ret_fast_syscall+0x0/0x2c)
> [ 34.605000] ---[ end trace a2c5f3d5ef286155 ]---
> [ 34.625000] wlan0: send auth to 88:43:e1:57:79:c0 (try 2/3)
> [ 34.640000] wlan0: send auth to 88:43:e1:57:79:c0 (try 3/3)
> [ 34.650000] wlan0: authentication with 88:43:e1:57:79:c0 timed out
> wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[
> 34.875000] wlan0: authenticate with 88:43:e1:57:79:c0
> A. Guidance' freq=2452 MHz)
> [ 34.915000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
> [ 34.920000] wlan0: authenticated
> wlan0: Trying to associate with 88:43:e1:57:79:c0 (SSID='A. Guidance'
> freq=2452 MHz)
> [ 34.995000] wlan0: associate with 88:43:e1:57:79:c0 (try 1/3)
> [ 35.015000] wlan0: associate with 88:43:e1:57:79:c0 (try 2/3)
> [ 35.035000] wlan0: associate with 88:43:e1:57:79:c0 (try 3/3)
> [ 35.060000] wlan0: association with 88:43:e1:57:79:c0 timed out
> wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[
> 35.620000] wlan0: authenticate with 88:43:e1:57:79:c0
> A. Guidance' freq=2452 MHz)
> [ 35.660000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
> [ 35.665000] wlan0: authenticated
> wlan0: Trying to associate with 88:43:e1:57:79:c0 (SSID='A. Guidance'
> freq=2452 MHz)
> [ 35.740000] wlan0: associate with 88:43:e1:57:79:c0 (try 1/3)
> [ 35.745000] wlan0: RX AssocResp from 88:43:e1:57:79:c0 (capab=0x431
> status=0 aid=2)
> [ 35.765000] wlan0: associated
> [ 35.770000] cfg80211: Calling CRDA for country: PT
> [ 35.780000] cfg80211: Regulatory domain changed to country: PT
> [ 35.780000] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
> [ 35.790000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 35.790000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 35.800000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 35.800000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A,
> 2700 mBm)
> [ 35.810000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm)
> wlan0: Associated with 88:43:e1:57:79:c0
> [ 37.585000] wlcore: Beacon loss detected. roles:0xff
> [ 39.250000] wlcore: Beacon loss detected. roles:0xff
> [ 40.935000] wlcore: Beacon loss detected. roles:0xff
> [ 42.400000] wlcore: Connection loss work (role_id: 0).
> [ 42.400000] wlan0: Connection to AP 88:43:e1:57:79:c0 lost
> [ 42.475000] cfg80211: Calling CRDA to update world regulatory domain
> [ 42.485000] cfg80211: World regulatory domain updated:
> [ 42.485000] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
> [ 42.500000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 42.500000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 42.515000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300
> mBi, 2000 mBm)
> [ 42.515000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 42.525000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 42.525000] cfg80211: Calling CRDA for country: PT
> [ 42.540000] cfg80211: Regulatory domain changed to country: PT
> [ 42.540000] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
> [ 42.550000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 42.550000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 42.560000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
> 2000 mBm)
> [ 42.560000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A,
> 2700 mBm)
> wlan0: CTRL-EVENT-DISCONNECTED bssid=88:43:e1:57:79:c0 reason=4 l[
> 42.575000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A,
> 4000 mBm)
> ocally_generated=1
> wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
> wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="A. Guidance" auth_failures=1
> duration=10
>
>
> Any ideas in what could be wrong?
>
> Best regards,
> José Gonçalves
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* wl127x: Unable to associate with a WPA2-PSK AP
From: José Miguel Gonçalves @ 2013-07-08 18:54 UTC (permalink / raw)
To: linux-wireless; +Cc: Luciano Coelho
Hi,
After solving some initial platform issues, I'm now blocked in two more issues
using the wl127x driver with kernel 3.9.9 in a S3C2416 hardware based platform.
The first one is that the command "iw wlan0 scan" does not scan all frequencies.
I've seen a patch submitted to fix an issue in the driver for the 5 GHz band
(http://permalink.gmane.org/gmane.linux.kernel.wireless.general/107771) but this
is not my issue, because I can not see also several APs in the 2.4GHz band after a
scan.
The second issue is when I try to associate with an AP using WPA2-PSK with
wpa_supplicant (only able to reach this point by setting "scan_freq" in
wpa_supplicat.conf file to the frequency used by the AP, because of the inability
to perform of a complete scan) I get an error in the driver, as shown in the log
bellow:
[root ~]$ wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
[ 33.915000] wlcore: firmware booted (Rev 6.3.10.0.133)
[ 34.280000] cfg80211: Calling CRDA for country: PT
[ 34.290000] cfg80211: Regulatory domain changed to country: PT
[ 34.290000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain,
max_eirp)
[ 34.305000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.320000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.320000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.330000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
[ 34.340000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000
mBm)
wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[ 34.585000]
wlan0: authenticate with 88:43:e1:57:79:c0
A. Guidance' freq=2452 MHz)
[ 34.595000] ------------[ cut here ]------------
[ 34.595000] WARNING: at drivers/net/wireless/ti/wlcore/tx.c:1307
wlcore_is_queue_stopped_by_reason_locked+0x98/0xb4 [wlcore]()
[ 34.595000] Modules linked in: arc4 wl12xx wlcore mac80211 wlcore_sdio lm70
[ 34.595000] Backtrace:
[ 34.595000] [<c000b92c>] (dump_backtrace+0x0/0x10c) from [<c02ed4a4>]
(dump_stack+0x18/0x1c)
[ 34.595000] r6:bf05ddd8 r5:00000009 r4:00000000 r3:00000000
[ 34.595000] [<c02ed48c>] (dump_stack+0x0/0x1c) from [<c0019ecc>]
(warn_slowpath_common+0x54/0x70)
[ 34.595000] [<c0019e78>] (warn_slowpath_common+0x0/0x70) from [<c0019f0c>]
(warn_slowpath_null+0x24/0x2c)
[ 34.595000] r8:c39e2acc r7:00000000 r6:c305b160 r5:bf06ca36 r4:00000002
r3:00000009
[ 34.595000] [<c0019ee8>] (warn_slowpath_null+0x0/0x2c) from [<bf05ddd8>]
(wlcore_is_queue_stopped_by_reason_locked+0x98/0xb4 [wlcore])
[ 34.595000] [<bf05dd40>] (wlcore_is_queue_stopped_by_reason_locked+0x0/0xb4
[wlcore]) from [<bf05de38>] (wlcore_is_queue_stopped_by_reason+0x44/0x7c [wlcore])
[ 34.595000] r6:00000000 r5:c305b160 r4:80000013
[ 34.595000] [<bf05ddf4>] (wlcore_is_queue_stopped_by_reason+0x0/0x7c [wlcore])
from [<bf05deb4>] (wl1271_handle_tx_low_watermark+0x44/0x94 [wlcore])
[ 34.595000] r8:c305b160 r7:c39e2acc r6:00000000 r5:c39e2acc r4:00000000
r3:00000000
[ 34.595000] [<bf05de70>] (wl1271_handle_tx_low_watermark+0x0/0x94 [wlcore])
from [<bf05e050>] (wl1271_tx_reset_link_queues+0x14c/0x174 [wlcore])
[ 34.595000] [<bf05df04>] (wl1271_tx_reset_link_queues+0x0/0x174 [wlcore]) from
[<bf05970c>] (wl12xx_free_link+0xec/0x150 [wlcore])
[ 34.595000] [<bf059620>] (wl12xx_free_link+0x0/0x150 [wlcore]) from
[<bf059b50>] (wl12xx_cmd_role_stop_sta+0x98/0x100 [wlcore])
[ 34.595000] r7:c305b160 r6:00000000 r5:c39e2acc r4:c3a89ac0
[ 34.595000] [<bf059ab8>] (wl12xx_cmd_role_stop_sta+0x0/0x100 [wlcore]) from
[<bf0546d8>] (wl1271_bss_info_changed_sta+0x840/0x9a4 [wlcore])
[ 34.595000] r7:c39e2acc r6:c305b160 r5:c39e2a10 r4:000000e0
[ 34.595000] [<bf053e98>] (wl1271_bss_info_changed_sta+0x0/0x9a4 [wlcore]) from
[<bf054a0c>] (wl1271_op_bss_info_changed+0x1d0/0x46c [wlcore])
[ 34.595000] [<bf05483c>] (wl1271_op_bss_info_changed+0x0/0x46c [wlcore]) from
[<bf009538>] (ieee80211_bss_info_change_notify+0x6c/0x10c [mac80211])
[ 34.595000] [<bf0094cc>] (ieee80211_bss_info_change_notify+0x0/0x10c
[mac80211]) from [<bf02bf1c>] (ieee80211_prep_connection+0x2dc/0x76c [mac80211])
[ 34.595000] r7:00000fff r6:c39cfe48 r5:c305b8e4 r4:c39e2440
[ 34.595000] [<bf02bc40>] (ieee80211_prep_connection+0x0/0x76c [mac80211]) from
[<bf030d70>] (ieee80211_mgd_auth+0x228/0x29c [mac80211])
[ 34.595000] [<bf030b48>] (ieee80211_mgd_auth+0x0/0x29c [mac80211]) from
[<bf01afd4>] (ieee80211_auth+0x18/0x1c [mac80211])
[ 34.595000] [<bf01afbc>] (ieee80211_auth+0x0/0x1c [mac80211]) from [<c02e40a8>]
(__cfg80211_mlme_auth+0x170/0x188)
[ 34.595000] [<c02e3f38>] (__cfg80211_mlme_auth+0x0/0x188) from [<c02e4154>]
(cfg80211_mlme_auth+0x94/0xb8)
[ 34.595000] [<c02e40c0>] (cfg80211_mlme_auth+0x0/0xb8) from [<c02dffbc>]
(nl80211_authenticate+0x258/0x27c)
[ 34.595000] [<c02dfd64>] (nl80211_authenticate+0x0/0x27c) from [<c0260044>]
(genl_rcv_msg+0x23c/0x274)
[ 34.595000] [<c025fe08>] (genl_rcv_msg+0x0/0x274) from [<c025f458>]
(netlink_rcv_skb+0xb4/0xc8)
[ 34.595000] [<c025f3a4>] (netlink_rcv_skb+0x0/0xc8) from [<c025fdfc>]
(genl_rcv+0x20/0x2c)
[ 34.595000] r6:00000048 r5:c3a5b400 r4:c38c4bc0 r3:c025fddc
[ 34.595000] [<c025fddc>] (genl_rcv+0x0/0x2c) from [<c025ee40>]
(netlink_unicast+0x1b0/0x214)
[ 34.595000] r4:c38c5e00 r3:c025fddc
[ 34.595000] [<c025ec90>] (netlink_unicast+0x0/0x214) from [<c025f230>]
(netlink_sendmsg+0x2e0/0x358)
[ 34.595000] [<c025ef50>] (netlink_sendmsg+0x0/0x358) from [<c0230944>]
(sock_sendmsg+0x88/0xa8)
[ 34.595000] [<c02308bc>] (sock_sendmsg+0x0/0xa8) from [<c0230d64>]
(___sys_sendmsg+0x2c8/0x2e0)
[ 34.595000] [<c0230a9c>] (___sys_sendmsg+0x0/0x2e0) from [<c0232920>]
(__sys_sendmsg+0x44/0x70)
[ 34.595000] [<c02328dc>] (__sys_sendmsg+0x0/0x70) from [<c023295c>]
(sys_sendmsg+0x10/0x14)
[ 34.595000] r6:be94fa8c r5:017940a0 r4:00000000
[ 34.595000] [<c023294c>] (sys_sendmsg+0x0/0x14) from [<c0009400>]
(ret_fast_syscall+0x0/0x2c)
[ 34.595000] ---[ end trace a2c5f3d5ef286154 ]---
[ 34.605000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
[ 34.605000] ------------[ cut here ]------------
[ 34.605000] WARNING: at drivers/net/wireless/ti/wlcore/tx.c:1316
wlcore_is_queue_stopped_locked+0x74/0x8c [wlcore]()
[ 34.605000] Modules linked in: arc4 wl12xx wlcore mac80211 wlcore_sdio lm70
[ 34.605000] Backtrace:
[ 34.605000] [<c000b92c>] (dump_backtrace+0x0/0x10c) from [<c02ed4a4>]
(dump_stack+0x18/0x1c)
[ 34.605000] r6:bf05f240 r5:00000009 r4:00000000 r3:00000000
[ 34.605000] [<c02ed48c>] (dump_stack+0x0/0x1c) from [<c0019ecc>]
(warn_slowpath_common+0x54/0x70)
[ 34.605000] [<c0019e78>] (warn_slowpath_common+0x0/0x70) from [<c0019f0c>]
(warn_slowpath_null+0x24/0x2c)
[ 34.605000] r8:40000013 r7:c305b160 r6:c305b160 r5:bf06ca36 r4:00000000
r3:00000009
[ 34.605000] [<c0019ee8>] (warn_slowpath_null+0x0/0x2c) from [<bf05f240>]
(wlcore_is_queue_stopped_locked+0x74/0x8c [wlcore])
[ 34.605000] [<bf05f1cc>] (wlcore_is_queue_stopped_locked+0x0/0x8c [wlcore])
from [<bf05225c>] (wl1271_op_tx+0x104/0x290 [wlcore])
[ 34.605000] r6:c39e2a10 r5:00000001 r4:c38c4a40 r3:00000003
[ 34.605000] [<bf052158>] (wl1271_op_tx+0x0/0x290 [wlcore]) from [<bf023e64>]
(__ieee80211_tx+0x134/0x384 [mac80211])
[ 34.605000] [<bf023d30>] (__ieee80211_tx+0x0/0x384 [mac80211]) from
[<bf024174>] (ieee80211_tx+0xc0/0xe8 [mac80211])
[ 34.605000] [<bf0240b4>] (ieee80211_tx+0x0/0xe8 [mac80211]) from [<bf02474c>]
(ieee80211_xmit+0x80/0x94 [mac80211])
[ 34.605000] [<bf0246cc>] (ieee80211_xmit+0x0/0x94 [mac80211]) from [<bf025698>]
(__ieee80211_tx_skb_tid_band+0x58/0x64 [mac80211])
[ 34.605000] r8:00000000 r7:00000001 r6:00000000 r5:c39e2440 r4:c38c4a40
r3:c3ae8000
[ 34.605000] [<bf025640>] (__ieee80211_tx_skb_tid_band+0x0/0x64 [mac80211]) from
[<bf0286c4>] (ieee80211_send_auth+0x158/0x1e0 [mac80211])
[ 34.605000] r6:c39e2440 r5:c38c4a40 r4:c3ac8b94 r3:00000000
[ 34.605000] [<bf02856c>] (ieee80211_send_auth+0x0/0x1e0 [mac80211]) from
[<bf02c550>] (ieee80211_probe_auth+0x174/0x2c8 [mac80211])
[ 34.605000] [<bf02c3dc>] (ieee80211_probe_auth+0x0/0x2c8 [mac80211]) from
[<bf030d80>] (ieee80211_mgd_auth+0x238/0x29c [mac80211])
[ 34.605000] r8:c39e2798 r7:00000000 r6:c39e2440 r5:c3a72c20 r4:c3ae9af8
[ 34.605000] [<bf030b48>] (ieee80211_mgd_auth+0x0/0x29c [mac80211]) from
[<bf01afd4>] (ieee80211_auth+0x18/0x1c [mac80211])
[ 34.605000] [<bf01afbc>] (ieee80211_auth+0x0/0x1c [mac80211]) from [<c02e40a8>]
(__cfg80211_mlme_auth+0x170/0x188)
[ 34.605000] [<c02e3f38>] (__cfg80211_mlme_auth+0x0/0x188) from [<c02e4154>]
(cfg80211_mlme_auth+0x94/0xb8)
[ 34.605000] [<c02e40c0>] (cfg80211_mlme_auth+0x0/0xb8) from [<c02dffbc>]
(nl80211_authenticate+0x258/0x27c)
[ 34.605000] [<c02dfd64>] (nl80211_authenticate+0x0/0x27c) from [<c0260044>]
(genl_rcv_msg+0x23c/0x274)
[ 34.605000] [<c025fe08>] (genl_rcv_msg+0x0/0x274) from [<c025f458>]
(netlink_rcv_skb+0xb4/0xc8)
[ 34.605000] [<c025f3a4>] (netlink_rcv_skb+0x0/0xc8) from [<c025fdfc>]
(genl_rcv+0x20/0x2c)
[ 34.605000] r6:00000048 r5:c3a5b400 r4:c38c4bc0 r3:c025fddc
[ 34.605000] [<c025fddc>] (genl_rcv+0x0/0x2c) from [<c025ee40>]
(netlink_unicast+0x1b0/0x214)
[ 34.605000] r4:c38c5e00 r3:c025fddc
[ 34.605000] [<c025ec90>] (netlink_unicast+0x0/0x214) from [<c025f230>]
(netlink_sendmsg+0x2e0/0x358)
[ 34.605000] [<c025ef50>] (netlink_sendmsg+0x0/0x358) from [<c0230944>]
(sock_sendmsg+0x88/0xa8)
[ 34.605000] [<c02308bc>] (sock_sendmsg+0x0/0xa8) from [<c0230d64>]
(___sys_sendmsg+0x2c8/0x2e0)
[ 34.605000] [<c0230a9c>] (___sys_sendmsg+0x0/0x2e0) from [<c0232920>]
(__sys_sendmsg+0x44/0x70)
[ 34.605000] [<c02328dc>] (__sys_sendmsg+0x0/0x70) from [<c023295c>]
(sys_sendmsg+0x10/0x14)
[ 34.605000] r6:be94fa8c r5:017940a0 r4:00000000
[ 34.605000] [<c023294c>] (sys_sendmsg+0x0/0x14) from [<c0009400>]
(ret_fast_syscall+0x0/0x2c)
[ 34.605000] ---[ end trace a2c5f3d5ef286155 ]---
[ 34.625000] wlan0: send auth to 88:43:e1:57:79:c0 (try 2/3)
[ 34.640000] wlan0: send auth to 88:43:e1:57:79:c0 (try 3/3)
[ 34.650000] wlan0: authentication with 88:43:e1:57:79:c0 timed out
wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[ 34.875000]
wlan0: authenticate with 88:43:e1:57:79:c0
A. Guidance' freq=2452 MHz)
[ 34.915000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
[ 34.920000] wlan0: authenticated
wlan0: Trying to associate with 88:43:e1:57:79:c0 (SSID='A. Guidance' freq=2452 MHz)
[ 34.995000] wlan0: associate with 88:43:e1:57:79:c0 (try 1/3)
[ 35.015000] wlan0: associate with 88:43:e1:57:79:c0 (try 2/3)
[ 35.035000] wlan0: associate with 88:43:e1:57:79:c0 (try 3/3)
[ 35.060000] wlan0: association with 88:43:e1:57:79:c0 timed out
wlan0: SME: Trying to authenticate with 88:43:e1:57:79:c0 (SSID='[ 35.620000]
wlan0: authenticate with 88:43:e1:57:79:c0
A. Guidance' freq=2452 MHz)
[ 35.660000] wlan0: send auth to 88:43:e1:57:79:c0 (try 1/3)
[ 35.665000] wlan0: authenticated
wlan0: Trying to associate with 88:43:e1:57:79:c0 (SSID='A. Guidance' freq=2452 MHz)
[ 35.740000] wlan0: associate with 88:43:e1:57:79:c0 (try 1/3)
[ 35.745000] wlan0: RX AssocResp from 88:43:e1:57:79:c0 (capab=0x431 status=0 aid=2)
[ 35.765000] wlan0: associated
[ 35.770000] cfg80211: Calling CRDA for country: PT
[ 35.780000] cfg80211: Regulatory domain changed to country: PT
[ 35.780000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain,
max_eirp)
[ 35.790000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 35.790000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 35.800000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 35.800000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
[ 35.810000] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000
mBm)
wlan0: Associated with 88:43:e1:57:79:c0
[ 37.585000] wlcore: Beacon loss detected. roles:0xff
[ 39.250000] wlcore: Beacon loss detected. roles:0xff
[ 40.935000] wlcore: Beacon loss detected. roles:0xff
[ 42.400000] wlcore: Connection loss work (role_id: 0).
[ 42.400000] wlan0: Connection to AP 88:43:e1:57:79:c0 lost
[ 42.475000] cfg80211: Calling CRDA to update world regulatory domain
[ 42.485000] cfg80211: World regulatory domain updated:
[ 42.485000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain,
max_eirp)
[ 42.500000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000
mBm)
[ 42.500000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000
mBm)
[ 42.515000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000
mBm)
[ 42.515000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000
mBm)
[ 42.525000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000
mBm)
[ 42.525000] cfg80211: Calling CRDA for country: PT
[ 42.540000] cfg80211: Regulatory domain changed to country: PT
[ 42.540000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain,
max_eirp)
[ 42.550000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 42.550000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 42.560000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 42.560000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
wlan0: CTRL-EVENT-DISCONNECTED bssid=88:43:e1:57:79:c0 reason=4 l[ 42.575000]
cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
ocally_generated=1
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="A. Guidance" auth_failures=1
duration=10
Any ideas in what could be wrong?
Best regards,
José Gonçalves
^ permalink raw reply
* Re: Replacement for local->hw.conf.channel
From: Ben Greear @ 2013-07-08 18:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1373308289.8312.17.camel@jlt4.sipsolutions.net>
On 07/08/2013 11:31 AM, Johannes Berg wrote:
> On Mon, 2013-07-08 at 11:20 -0700, Ben Greear wrote:
>> On 07/04/2013 12:27 AM, Johannes Berg wrote:
>>> On Wed, 2013-07-03 at 17:01 -0700, Ben Greear wrote:
>>>> I'm trying to port some patches forward to 3.10....
>>>>
>>>> I am trying to find the current channel for a radio. Since
>>>> hw.conf.channel no longer exists, what is the best way to
>>>> go about this?
>>>
>>> Well there's hw.conf.chandef.chan now I think, but that can be NULL and
>>> generic mac80211 code must not use it. There's no single current channel
>>> any more, you want vif->chanctx or so.
>>
>> From looking at the scanning code (line 542 or so), it appears
>>
>> local->_oper_chandef.chan
>>
>> might work?
>
> No, don't use that in any new code. It's purely for compatibility with
> drivers that aren't converted to channel contexts (yet).
>
>> In 3.9, ath9k_htc was giving me a null channel in the code below:
>>
>> chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
>> if (chanctx_conf)
>> channel = chanctx_conf->def.chan;
>> else
>> channel = NULL;
>
> Well that of course happens if the vif isn't bound to a channel context.
Any opinions on what to return in ethtool stats for frequency if
there is no channel context?
If there is a quick way to just return whatever the hardware is
currently using, I think that is best, but if there is not
a reliable way to do this then, some hard coded default
like 0 is probably best.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: Replacement for local->hw.conf.channel
From: Johannes Berg @ 2013-07-08 18:31 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <51DB0302.5050201@candelatech.com>
On Mon, 2013-07-08 at 11:20 -0700, Ben Greear wrote:
> On 07/04/2013 12:27 AM, Johannes Berg wrote:
> > On Wed, 2013-07-03 at 17:01 -0700, Ben Greear wrote:
> >> I'm trying to port some patches forward to 3.10....
> >>
> >> I am trying to find the current channel for a radio. Since
> >> hw.conf.channel no longer exists, what is the best way to
> >> go about this?
> >
> > Well there's hw.conf.chandef.chan now I think, but that can be NULL and
> > generic mac80211 code must not use it. There's no single current channel
> > any more, you want vif->chanctx or so.
>
> From looking at the scanning code (line 542 or so), it appears
>
> local->_oper_chandef.chan
>
> might work?
No, don't use that in any new code. It's purely for compatibility with
drivers that aren't converted to channel contexts (yet).
> In 3.9, ath9k_htc was giving me a null channel in the code below:
>
> chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
> if (chanctx_conf)
> channel = chanctx_conf->def.chan;
> else
> channel = NULL;
Well that of course happens if the vif isn't bound to a channel context.
johannes
^ permalink raw reply
* Re: Replacement for local->hw.conf.channel
From: Ben Greear @ 2013-07-08 18:20 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1372922870.8235.0.camel@jlt4.sipsolutions.net>
On 07/04/2013 12:27 AM, Johannes Berg wrote:
> On Wed, 2013-07-03 at 17:01 -0700, Ben Greear wrote:
>> I'm trying to port some patches forward to 3.10....
>>
>> I am trying to find the current channel for a radio. Since
>> hw.conf.channel no longer exists, what is the best way to
>> go about this?
>
> Well there's hw.conf.chandef.chan now I think, but that can be NULL and
> generic mac80211 code must not use it. There's no single current channel
> any more, you want vif->chanctx or so.
From looking at the scanning code (line 542 or so), it appears
local->_oper_chandef.chan
might work?
In 3.9, ath9k_htc was giving me a null channel in the code below:
chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
if (chanctx_conf)
channel = chanctx_conf->def.chan;
else
channel = NULL;
I haven't tried that yet in 3.10 or later, so maybe I don't need the
hw.conf.channel in new code anyway.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH] iw: Add support for mesh peer link expiration.
From: Johannes Berg @ 2013-07-08 18:14 UTC (permalink / raw)
To: Colleen Twitty; +Cc: linux-wirelss, open80211s
In-Reply-To: <1373303058-4229-1-git-send-email-colleen@cozybit.com>
On Mon, 2013-07-08 at 10:04 -0700, Colleen Twitty wrote:
> User can configure the peer link expiration time with a
> new mesh parameter, mesh_plink_timeout. This parameter
> sets the expiration time, in seconds, for peer links.
> After this time, the peer link is expired. This means the
> inactive STA is removed from the list of peers and is not
> considered a peer again unless it re-peers.
Applied.
johannes
^ permalink raw reply
* [PATCH] iw: Add support for mesh peer link expiration.
From: Colleen Twitty @ 2013-07-08 17:04 UTC (permalink / raw)
To: linux-wirelss; +Cc: Johannes Berg, open80211s
User can configure the peer link expiration time with a
new mesh parameter, mesh_plink_timeout. This parameter
sets the expiration time, in seconds, for peer links.
After this time, the peer link is expired. This means the
inactive STA is removed from the list of peers and is not
considered a peer again unless it re-peers.
Signed-off-by: Colleen Twitty <colleen@cozybit.com>
---
mesh.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mesh.c b/mesh.c
index 5a09b62..ca065bf 100644
--- a/mesh.c
+++ b/mesh.c
@@ -157,6 +157,11 @@ static void _print_u32_timeout(struct nlattr *a)
printf("%u milliseconds", nla_get_u32(a));
}
+static void _print_u32_in_seconds(struct nlattr *a)
+{
+ printf("%d seconds", nla_get_u32(a));
+}
+
static void _print_u32_in_TUs(struct nlattr *a)
{
printf("%d TUs", nla_get_u32(a));
@@ -258,6 +263,8 @@ const static struct mesh_param_descr _mesh_param_descrs[] =
_my_nla_put_u32, _parse_u32_power_mode, _print_u32_power_mode},
{"mesh_awake_window", NL80211_MESHCONF_AWAKE_WINDOW,
_my_nla_put_u16, _parse_u16, _print_u16_in_TUs},
+ {"mesh_plink_timeout", NL80211_MESHCONF_PLINK_TIMEOUT,
+ _my_nla_put_u32, _parse_u32, _print_u32_in_seconds},
};
static void print_all_mesh_param_descr(void)
--
1.7.9.5
^ permalink raw reply related
* Re: ath10k mailing list and new git tree
From: Kalle Valo @ 2013-07-08 15:10 UTC (permalink / raw)
To: sedat.dilek; +Cc: linux-wireless, ath9k-devel, LKML, ath10k
In-Reply-To: <CA+icZUU32347g48dpk-gVZZ1H9pvnjaSWpQ12B-5vOkLzs8Nbg@mail.gmail.com>
Sedat Dilek <sedat.dilek@gmail.com> writes:
> On Mon, Jul 8, 2013 at 4:17 PM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Hi,
>>
>> we have a new mailing list for ath10k, please use that in the future
>> instead of ath9k-devel:
>>
>> http://lists.infradead.org/mailman/listinfo/ath10k
>>
>> As ath10k is now in wireless-next please use the new git tree which is
>> for both ath6kl and ath10k:
>>
>> https://github.com/kvalo/ath
>>
>> I have also updated the wiki accordingly:
>>
>> http://wireless.kernel.org/en/users/Drivers/ath10k
>>
>
> You have sent these new informations for MAINTAINERS file to upstream?
Good point. Actually MAINTAINERS entry for ath10k is completely missing,
I'll send a patch for that.
Thanks.
--
Kalle Valo
^ permalink raw reply
* Re: ath10k mailing list and new git tree
From: Sedat Dilek @ 2013-07-08 14:58 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, ath9k-devel, LKML
In-Reply-To: <87r4f9cf0w.fsf@kamboji.qca.qualcomm.com>
On Mon, Jul 8, 2013 at 4:17 PM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Hi,
>
> we have a new mailing list for ath10k, please use that in the future
> instead of ath9k-devel:
>
> http://lists.infradead.org/mailman/listinfo/ath10k
>
> As ath10k is now in wireless-next please use the new git tree which is
> for both ath6kl and ath10k:
>
> https://github.com/kvalo/ath
>
> I have also updated the wiki accordingly:
>
> http://wireless.kernel.org/en/users/Drivers/ath10k
>
You have sent these new informations for MAINTAINERS file to upstream?
- Sedat -
> --
> Kalle Valo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCHv6 14/18] ath9k: set 5/10 MHz supported channels and fix bitrate
From: Simon Wunderlich @ 2013-07-08 14:56 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1373295366-12823-1-git-send-email-siwu@hrz.tu-chemnitz.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv4:
* remove unused divisor line in the rate control
---
drivers/net/wireless/ath/ath9k/init.c | 24 ++++++++++++++++--------
drivers/net/wireless/ath/ath9k/rc.c | 5 +++++
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 71aa5c9..bd909ba 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -146,14 +146,22 @@ static struct ieee80211_rate ath9k_legacy_rates[] = {
RATE(20, 0x1a, IEEE80211_RATE_SHORT_PREAMBLE),
RATE(55, 0x19, IEEE80211_RATE_SHORT_PREAMBLE),
RATE(110, 0x18, IEEE80211_RATE_SHORT_PREAMBLE),
- RATE(60, 0x0b, 0),
- RATE(90, 0x0f, 0),
- RATE(120, 0x0a, 0),
- RATE(180, 0x0e, 0),
- RATE(240, 0x09, 0),
- RATE(360, 0x0d, 0),
- RATE(480, 0x08, 0),
- RATE(540, 0x0c, 0),
+ RATE(60, 0x0b, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(90, 0x0f, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(120, 0x0a, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(180, 0x0e, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(240, 0x09, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(360, 0x0d, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(480, 0x08, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
+ RATE(540, 0x0c, (IEEE80211_RATE_SUPPORTS_5MHZ |
+ IEEE80211_RATE_SUPPORTS_10MHZ)),
};
#ifdef CONFIG_MAC80211_LEDS
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index e41f563..5a69d9b 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1282,9 +1282,14 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_rate_priv *ath_rc_priv = priv_sta;
int i, j = 0;
+ u32 rate_flags = ieee80211_chandef_rate_flags(&sc->hw->conf.chandef);
for (i = 0; i < sband->n_bitrates; i++) {
if (sta->supp_rates[sband->band] & BIT(i)) {
+ if ((rate_flags & sband->bitrates[i].flags)
+ != rate_flags)
+ continue;
+
ath_rc_priv->neg_rates.rs_rates[j]
= (sband->bitrates[i].bitrate * 2) / 10;
j++;
--
1.7.10.4
^ permalink raw reply related
* [PATCHv6 12/18] ath9k: use chandef instead of channel_type
From: Simon Wunderlich @ 2013-07-08 14:56 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1373295366-12823-1-git-send-email-siwu@hrz.tu-chemnitz.de>
To enable support for 5/10 MHz, some internal functions must be
converted from using the (old) channel_type to chandef. This is a good
chance to change all remaining occurences.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
drivers/net/wireless/ath/ath9k/common.c | 67 +++++++++++++++----------
drivers/net/wireless/ath/ath9k/common.h | 3 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 5 +-
drivers/net/wireless/ath/ath9k/init.c | 4 +-
drivers/net/wireless/ath/ath9k/main.c | 8 ++-
drivers/net/wireless/ath/ath9k/rc.c | 4 +-
6 files changed, 51 insertions(+), 40 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index 344fdde..d3063c2 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -49,37 +49,40 @@ int ath9k_cmn_get_hw_crypto_keytype(struct sk_buff *skb)
}
EXPORT_SYMBOL(ath9k_cmn_get_hw_crypto_keytype);
-static u32 ath9k_get_extchanmode(struct ieee80211_channel *chan,
- enum nl80211_channel_type channel_type)
+static u32 ath9k_get_extchanmode(struct cfg80211_chan_def *chandef)
{
u32 chanmode = 0;
- switch (chan->band) {
+ switch (chandef->chan->band) {
case IEEE80211_BAND_2GHZ:
- switch (channel_type) {
- case NL80211_CHAN_NO_HT:
- case NL80211_CHAN_HT20:
+ switch (chandef->width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
chanmode = CHANNEL_G_HT20;
break;
- case NL80211_CHAN_HT40PLUS:
- chanmode = CHANNEL_G_HT40PLUS;
+ case NL80211_CHAN_WIDTH_40:
+ if (chandef->center_freq1 > chandef->chan->center_freq)
+ chanmode = CHANNEL_G_HT40PLUS;
+ else
+ chanmode = CHANNEL_G_HT40MINUS;
break;
- case NL80211_CHAN_HT40MINUS:
- chanmode = CHANNEL_G_HT40MINUS;
+ default:
break;
}
break;
case IEEE80211_BAND_5GHZ:
- switch (channel_type) {
- case NL80211_CHAN_NO_HT:
- case NL80211_CHAN_HT20:
+ switch (chandef->width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
chanmode = CHANNEL_A_HT20;
break;
- case NL80211_CHAN_HT40PLUS:
- chanmode = CHANNEL_A_HT40PLUS;
+ case NL80211_CHAN_WIDTH_40:
+ if (chandef->center_freq1 > chandef->chan->center_freq)
+ chanmode = CHANNEL_A_HT40PLUS;
+ else
+ chanmode = CHANNEL_A_HT40MINUS;
break;
- case NL80211_CHAN_HT40MINUS:
- chanmode = CHANNEL_A_HT40MINUS;
+ default:
break;
}
break;
@@ -94,13 +97,12 @@ static u32 ath9k_get_extchanmode(struct ieee80211_channel *chan,
* Update internal channel flags.
*/
void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
- struct ieee80211_channel *chan,
- enum nl80211_channel_type channel_type)
+ struct cfg80211_chan_def *chandef)
{
- ichan->channel = chan->center_freq;
- ichan->chan = chan;
+ ichan->channel = chandef->chan->center_freq;
+ ichan->chan = chandef->chan;
- if (chan->band == IEEE80211_BAND_2GHZ) {
+ if (chandef->chan->band == IEEE80211_BAND_2GHZ) {
ichan->chanmode = CHANNEL_G;
ichan->channelFlags = CHANNEL_2GHZ | CHANNEL_OFDM;
} else {
@@ -108,8 +110,22 @@ void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
ichan->channelFlags = CHANNEL_5GHZ | CHANNEL_OFDM;
}
- if (channel_type != NL80211_CHAN_NO_HT)
- ichan->chanmode = ath9k_get_extchanmode(chan, channel_type);
+ switch (chandef->width) {
+ case NL80211_CHAN_WIDTH_5:
+ ichan->channelFlags |= CHANNEL_QUARTER;
+ break;
+ case NL80211_CHAN_WIDTH_10:
+ ichan->channelFlags |= CHANNEL_HALF;
+ break;
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ break;
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_40:
+ ichan->chanmode = ath9k_get_extchanmode(chandef);
+ break;
+ default:
+ WARN_ON(1);
+ }
}
EXPORT_SYMBOL(ath9k_cmn_update_ichannel);
@@ -125,8 +141,7 @@ struct ath9k_channel *ath9k_cmn_get_curchannel(struct ieee80211_hw *hw,
chan_idx = curchan->hw_value;
channel = &ah->channels[chan_idx];
- ath9k_cmn_update_ichannel(channel, curchan,
- cfg80211_get_chandef_type(&hw->conf.chandef));
+ ath9k_cmn_update_ichannel(channel, &hw->conf.chandef);
return channel;
}
diff --git a/drivers/net/wireless/ath/ath9k/common.h b/drivers/net/wireless/ath/ath9k/common.h
index 207d069..e039bcb 100644
--- a/drivers/net/wireless/ath/ath9k/common.h
+++ b/drivers/net/wireless/ath/ath9k/common.h
@@ -44,8 +44,7 @@
int ath9k_cmn_get_hw_crypto_keytype(struct sk_buff *skb);
void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
- struct ieee80211_channel *chan,
- enum nl80211_channel_type channel_type);
+ struct cfg80211_chan_def *chandef);
struct ath9k_channel *ath9k_cmn_get_curchannel(struct ieee80211_hw *hw,
struct ath_hw *ah);
int ath9k_cmn_count_streams(unsigned int chainmask, int max);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 5c1bec1..d442581 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1203,16 +1203,13 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || chip_reset) {
struct ieee80211_channel *curchan = hw->conf.chandef.chan;
- enum nl80211_channel_type channel_type =
- cfg80211_get_chandef_type(&hw->conf.chandef);
int pos = curchan->hw_value;
ath_dbg(common, CONFIG, "Set channel: %d MHz\n",
curchan->center_freq);
ath9k_cmn_update_ichannel(&priv->ah->channels[pos],
- hw->conf.chandef.chan,
- channel_type);
+ &hw->conf.chandef);
if (ath9k_htc_set_channel(priv, hw, &priv->ah->channels[pos]) < 0) {
ath_err(common, "Unable to set channel\n");
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 16f8b20..71aa5c9 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -710,13 +710,15 @@ static void ath9k_init_band_txpower(struct ath_softc *sc, int band)
struct ieee80211_supported_band *sband;
struct ieee80211_channel *chan;
struct ath_hw *ah = sc->sc_ah;
+ struct cfg80211_chan_def chandef;
int i;
sband = &sc->sbands[band];
for (i = 0; i < sband->n_channels; i++) {
chan = &sband->channels[i];
ah->curchan = &ah->channels[chan->hw_value];
- ath9k_cmn_update_ichannel(ah->curchan, chan, NL80211_CHAN_HT20);
+ cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20);
+ ath9k_cmn_update_ichannel(ah->curchan, &chandef);
ath9k_hw_set_txpowerlimit(ah, MAX_RATE_POWER, true);
}
}
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 1737a3e..ff91f4a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1193,8 +1193,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
struct ieee80211_channel *curchan = hw->conf.chandef.chan;
- enum nl80211_channel_type channel_type =
- cfg80211_get_chandef_type(&conf->chandef);
int pos = curchan->hw_value;
int old_pos = -1;
unsigned long flags;
@@ -1202,8 +1200,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
if (ah->curchan)
old_pos = ah->curchan - &ah->channels[0];
- ath_dbg(common, CONFIG, "Set channel: %d MHz type: %d\n",
- curchan->center_freq, channel_type);
+ ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n",
+ curchan->center_freq, hw->conf.chandef.width);
/* update survey stats for the old channel before switching */
spin_lock_irqsave(&common->cc_lock, flags);
@@ -1211,7 +1209,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
spin_unlock_irqrestore(&common->cc_lock, flags);
ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
- curchan, channel_type);
+ &conf->chandef);
/*
* If the operating channel changes, change the survey in-use flags
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index a3c4ca0..e41f563 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1326,8 +1326,8 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
ath_rc_init(sc, priv_sta);
ath_dbg(ath9k_hw_common(sc->sc_ah), CONFIG,
- "Operating HT Bandwidth changed to: %d\n",
- cfg80211_get_chandef_type(&sc->hw->conf.chandef));
+ "Operating Bandwidth changed to: %d\n",
+ &sc->hw->conf.chandef->width);
}
}
--
1.7.10.4
^ permalink raw reply related
* [PATCHv6 18/18] ath5k: enable support for 5 MHz and 10 MHz channels
From: Simon Wunderlich @ 2013-07-08 14:56 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1373295366-12823-1-git-send-email-siwu@hrz.tu-chemnitz.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
drivers/net/wireless/ath/ath5k/ath5k.h | 1 +
drivers/net/wireless/ath/ath5k/base.c | 25 ++++++++++++++++++++++---
drivers/net/wireless/ath/ath5k/base.h | 2 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 2d691b8..74bd54d 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -29,6 +29,7 @@
#include <linux/average.h>
#include <linux/leds.h>
#include <net/mac80211.h>
+#include <net/cfg80211.h>
/* RX/TX descriptor hw structs
* TODO: Driver part should only see sw structs */
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 7c298af..48161ed 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -56,6 +56,7 @@
#include <linux/etherdevice.h>
#include <linux/nl80211.h>
+#include <net/cfg80211.h>
#include <net/ieee80211_radiotap.h>
#include <asm/unaligned.h>
@@ -443,11 +444,27 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
* Called with ah->lock.
*/
int
-ath5k_chan_set(struct ath5k_hw *ah, struct ieee80211_channel *chan)
+ath5k_chan_set(struct ath5k_hw *ah, struct cfg80211_chan_def *chandef)
{
ATH5K_DBG(ah, ATH5K_DEBUG_RESET,
"channel set, resetting (%u -> %u MHz)\n",
- ah->curchan->center_freq, chan->center_freq);
+ ah->curchan->center_freq, chandef->chan->center_freq);
+
+ switch (chandef->width) {
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ ah->ah_bwmode = AR5K_BWMODE_DEFAULT;
+ break;
+ case NL80211_CHAN_WIDTH_5:
+ ah->ah_bwmode = AR5K_BWMODE_5MHZ;
+ break;
+ case NL80211_CHAN_WIDTH_10:
+ ah->ah_bwmode = AR5K_BWMODE_10MHZ;
+ break;
+ default:
+ WARN_ON(1);
+ return -EINVAL;
+ }
/*
* To switch channels clear any pending DMA operations;
@@ -455,7 +472,7 @@ ath5k_chan_set(struct ath5k_hw *ah, struct ieee80211_channel *chan)
* hardware at the new frequency, and then re-enable
* the relevant bits of the h/w.
*/
- return ath5k_reset(ah, chan, true);
+ return ath5k_reset(ah, chandef->chan, true);
}
void ath5k_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
@@ -2525,6 +2542,8 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
/* SW support for IBSS_RSN is provided by mac80211 */
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
+ hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_5_10_MHZ;
+
/* both antennas can be configured as RX or TX */
hw->wiphy->available_antennas_tx = 0x3;
hw->wiphy->available_antennas_rx = 0x3;
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index ca9a83c..97469d0 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -101,7 +101,7 @@ void ath5k_set_beacon_filter(struct ieee80211_hw *hw, bool enable);
void ath5k_update_bssid_mask_and_opmode(struct ath5k_hw *ah,
struct ieee80211_vif *vif);
-int ath5k_chan_set(struct ath5k_hw *ah, struct ieee80211_channel *chan);
+int ath5k_chan_set(struct ath5k_hw *ah, struct cfg80211_chan_def *chandef);
void ath5k_txbuf_free_skb(struct ath5k_hw *ah, struct ath5k_buf *bf);
void ath5k_rxbuf_free_skb(struct ath5k_hw *ah, struct ath5k_buf *bf);
void ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb,
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 81b686c..aa9d976 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -202,7 +202,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&ah->lock);
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
- ret = ath5k_chan_set(ah, conf->chandef.chan);
+ ret = ath5k_chan_set(ah, &conf->chandef);
if (ret < 0)
goto unlock;
}
--
1.7.10.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox