<div dir="ltr">Thanks it worked. But looks like every time we load the driver, phy index kept on incrementing. <div>Regards</div><div>Naveen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 6, 2015 at 12:47 AM, Arend van Spriel <span dir="ltr">&lt;<a href="mailto:arend@broadcom.com" target="_blank">arend@broadcom.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/06/15 04:22, Naveen Singh wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All<br>
For my system we have cfg80211 built as loadable module. When we unload<br>
our WLAN driver cfg80211 gets unloaded as well.<br>
</blockquote>
<br></span>
So how is your WLAN driver unloaded. When unloading cfg80211 the nl80211 netlink family is unregistered from the kernel probably closing all user-space netlink sockets.<br>
<br>
If you only &#39;rmmod&#39; your WLAN driver than supplicant should be fine handling it as cfg80211 is not unloaded. If you use &#39;modprobe -r&#39; it will unload dependent modules if their refcount is zero.<br>
<br>
Regards,<br>
Arend<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
After reloading the<br>
driver I found that none of the events from driver never makes to<br>
supplicant. I see that connect command from supplicant makes to driver<br>
but the NL_CONNECT_CMD netlink message from the driver is dropped. On<br>
further debugging I found that the messages are dropped in the following<br></span>
function sd it does not call *do_one_broadcast*. Looks like all the<span class=""><br>
previous bindings were lost. After killing the supplicant and restarting<br>
the supplicant I can see that the subscriptions are updated and<br>
connection succeeded.<br>
<br>
int netlink_broadcast_filtered(<u></u>struct sock *ssk, struct sk_buff *skb,<br>
u32 portid,<br>
u32 group, gfp_t allocation,<br>
int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),<br>
void *filter_data)<br>
{<br>
struct net *net = sock_net(ssk);<br>
struct netlink_broadcast_data info;<br>
struct sock *sk;<br>
<br>
skb = netlink_trim(skb, allocation);<br>
<br>
info.exclude_sk = ssk;<br>
</span><a href="http://info.net" target="_blank">info.net</a> &lt;<a href="http://info.net" target="_blank">http://info.net</a>&gt; = net;<span class=""><br>
info.portid = portid;<br>
info.group = group;<br>
info.failure = 0;<br>
info.delivery_failure = 0;<br>
info.congested = 0;<br>
info.delivered = 0;<br>
info.allocation = allocation;<br>
info.skb = skb;<br>
info.skb2 = NULL;<br>
info.tx_filter = filter;<br>
info.tx_data = filter_data;<br>
<br>
/* While we sleep in clone, do not allow to change socket list */<br>
<br>
netlink_lock_table();<br>
<br>
sk_for_each_bound(sk, &amp;nl_table[ssk-&gt;sk_protocol].<u></u>mc_list)<br></span>
d*o_one_broadcast(sk, &amp;info); ==&gt; This function is not called at all as<br>
it does not find any subscription at all. *<span class=""><br>
<br>
consume_skb(skb);<br>
<br>
netlink_unlock_table();<br>
<br>
if (info.delivery_failure) {<br>
kfree_skb(info.skb2);<br>
return -ENOBUFS;<br>
}<br>
consume_skb(info.skb2);<br>
<br>
if (info.delivered) {<br>
if (info.congested &amp;&amp; (allocation &amp; __GFP_WAIT))<br>
yield();<br>
My feeling is that as cfg80211 gets unloaded as well when driver is<br>
unloaded, it loses all the subscription and hence none of the message<br>
from driver gets ever delivered to supplicant. But what surprises me is<br>
that although we cannot send messages from driver to supplicant it is<br>
not true in reverse direction. Connect command from supplicant lands in<br>
driver. Has anyone seen something similar? I have a workaround right now<br>
where i restart the supplicant whenever i unload and load the driver.<br>
But I would like to have a cleaner solution.<br>
<br>
<br>
Regards<br>
Naveen<br>
<br>
<br>
<br></span>
______________________________<u></u>_________________<br>
HostAP mailing list<br>
<a href="mailto:HostAP@lists.shmoo.com" target="_blank">HostAP@lists.shmoo.com</a><br>
<a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/<u></u>mailman/listinfo/hostap</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
HostAP mailing list<br>
<a href="mailto:HostAP@lists.shmoo.com" target="_blank">HostAP@lists.shmoo.com</a><br>
<a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/<u></u>mailman/listinfo/hostap</a><br>
</blockquote></div><br></div>