HOSTAPD Error log

Amit Gupta amitkgupta09 at
Tue Jul 28 14:15:40 EDT 2015

Hi All,
Thanks for your quick response.

I tried with strace stuff, but I faced CPU halt issue. Actually along with
those error logs..sometime I m facing CPU HALT issue after executing
#hostapd -B /etc/hostapd.conf.

I tried your way to debug kernel for finding the root cause of error
log 'Failed
to update rate sets in kernel module'.
But prior to that I started to debugging for

IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

those two logs.

Till now I found that before execution of __dev_open(net/core/dev,c) function
for 'wlan0' network interface, 'netif_carrier_off'(net/sched/sch_generic.c)
function get called for 'wlan0',

void netif_carrier_off
net_device <;i=net_device>
*dev <;i=dev>)
         if (!test_and_set_bit
&dev <;i=dev>->state
<;i=state>)) {
                 if (dev
<;i=reg_state> ==

 which result into condition checking passed in 'addrconf_qdisc_ok

In 'net/ipv6/addrconf.c' file

if (event <;i=event> ==
                         if (!addrconf_qdisc_ok
<;i=dev>)) {
                                 */* device is not ready yet. */*
%s: link is not ready\n"*,

in same file:

static inline bool <;i=bool>
struct net_device
<;i=net_device> *dev
<;i=dev>) {

return !qdisc_tx_is_noop


In include/net/sch_generic.h file

 static inline bool <;i=bool>
struct net_device
<;i=net_device> *dev


         unsigned int i <;i=i>;

         for (i <;i=i> = 0; i
<;i=i> < dev
<;i=dev>->num_tx_queues; i
<;i=i>++) {
                 struct netdev_queue
<;i=netdev_queue> *txq =
<;i=dev>, i
                 if (rcu_access_pointer
!= &noop_qdisc <;i=noop_qdisc>)
                         return false
         return true <;i=true>;

I am still looking to find the cause execution of net_carrier_off function
before execution of __dev_open function for 'wlan0' network interface. This
behavior I am not observing with my other wired and pseudo network

'Failed to update rate sets in kernel module'
This error log may come because of previous issue as wlan0 device is not
active till this point.

One more thing  I tried, I cross compiled 'hostapd' version 2.4 for my
target board and executed that on target board.I did not get above
mentioned error log and till now no CPU halt issue.

Previously i was working with hostapd 0.7.3.

So is it like, hostapd old version is not compatible with new linux kernel
version as hostapd 0.7.3 version is running with no issue at linux 3.4.

Any advice and suggestions will be appreciable/helpful.

Amit Gupta

On Fri, Jul 24, 2015 at 11:06 AM, Pranay Srivastava <pranjas at>

> Hi Amit
> On Thu, Jul 23, 2015 at 11:09 PM,  <Valdis.Kletnieks at> wrote:
> > On Thu, 23 Jul 2015 12:31:18 +0530, Amit Gupta said:
> >
> >> Configuration file: /etc/hostapd.conf
> >> [  199.672712] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> >> Failed to update rate sets in kernel module
> >> [  199.687566] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> >> Using interface wlan0 with hwaddr 00:0e:8e:38:29:e6 and ssid
> 'test_wifi_2'
> >>
> >>
> >> Eventhough I am getting this error log from user space
> application(hostapd)
> >> code, my wifi device is working fine. But I want to remove this error
> log
> >> and want to know the root cause this error log.
> >
> > My gut reaction is that hostapd is issuing ioctl() calls in the wrong
> order
> > and/or failing to allow a long enough delay or wait for a specific event.
> >
> > I'd recommend running something like:
> >
> > # strace -f hostapd -B /etc/hostapd.conf > /tmp/strace.out 2>&1
> The driver gets notified of this change via netlink socks. I also face
> the same issue and so far I found this
> Hostapd calls
>   --->i802_set_rate_sets
> which then creates a nlmsg which is handled in driver as
> --driver--
>      -->nl80211_set_bss
>                --->rdev_change_bss
> now change_bss is defined as
> ieee80211_change_bss (net/mac80211/cfg.c) unless ofcourse your driver
> provides something else.
> There seems to be no error from here.
> So maybe it's the send_recv call in hostapd in function
> i802_set_rate_sets? I'll look into it more.
> >
> > and go look for what failing call was made just before the write call
> > that output 'Failed to update'.  Hopefully, tracing the flow of that
> > call will reveal a  kernel code path that output the 'link is not ready'
> > message.  Then you'll know what 'if (somecondition)' landed you in that
> > situation.
> >
> > Knowing that, it will become a lot easier to figure out what happened.
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at
> >
> >
> --
>         ---P.K.S
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list