<div dir="ltr">Hi All<div>For my system we have cfg80211 built as loadable module. When we unload our WLAN driver cfg80211 gets unloaded as well. After reloading the driver I found that none of the events from driver never makes to supplicant. I see that connect command from supplicant makes to driver but the NL_CONNECT_CMD netlink message from the driver is dropped. On further debugging I found that the messages are dropped in the following function sd it does not call <b>do_one_broadcast</b>. Looks like all the previous bindings were lost. After killing the supplicant and restarting the supplicant I can see that the subscriptions are updated and connection succeeded. </div><div><br></div><div>int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid,</div><div>    u32 group, gfp_t allocation,</div><div>    int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),</div><div>    void *filter_data)</div><div>{</div><div>    struct net *net = sock_net(ssk);</div><div>    struct netlink_broadcast_data info;</div><div>    struct sock *sk;</div><div><br></div><div>    skb = netlink_trim(skb, allocation);</div><div><br></div><div>    info.exclude_sk = ssk;</div><div>    <a href="http://info.net">info.net</a> = net;</div><div>    info.portid = portid;</div><div>    info.group = group;</div><div>    info.failure = 0;</div><div>    info.delivery_failure = 0;</div><div>    info.congested = 0;</div><div>    info.delivered = 0;</div><div>    info.allocation = allocation;</div><div>    info.skb = skb;</div><div>    info.skb2 = NULL;</div><div>    info.tx_filter = filter;</div><div>    info.tx_data = filter_data;</div><div><br></div><div>    /* While we sleep in clone, do not allow to change socket list */</div><div><br></div><div>    netlink_lock_table();</div><div><br></div><div>    sk_for_each_bound(sk, &amp;nl_table[ssk-&gt;sk_protocol].mc_list)</div><div>        d<b>o_one_broadcast(sk, &amp;info); ==&gt; This function is not called at all as it does not find any subscription at all. </b></div><div><br></div><div>    consume_skb(skb);</div><div><br></div><div>    netlink_unlock_table();</div><div><br></div><div>    if (info.delivery_failure) {</div><div>        kfree_skb(info.skb2);</div><div>        return -ENOBUFS;</div><div>    }</div><div>    consume_skb(info.skb2);</div><div><br></div><div>    if (info.delivered) {</div><div>        if (info.congested &amp;&amp; (allocation &amp; __GFP_WAIT))</div><div>            yield();</div><div> </div><div>My feeling is that as cfg80211 gets unloaded as well when driver is unloaded, it loses all the subscription and hence none of the message from driver gets ever delivered to supplicant. But what surprises me is that although we cannot send messages from driver to supplicant it is not true in reverse direction. Connect command from supplicant lands in driver. Has anyone seen something similar? I have a workaround right now where i restart the supplicant whenever i unload and load the driver. But I would like to have a cleaner solution.</div><div><br></div><div><br></div><div>Regards</div><div>Naveen</div></div>