Newbie: Need help, trouble running hostapd after modifications in mac80211 and cfg80211...
Quoted 6 lines
Luis
Okay, the mistake I was doing previously was not loading all the pre-requisite modules before loading ath9k, namely rfkill and led_class but now I did that and I also incorporated the same changes in 2.6.31 version Louis suggested and in both cases, i.e. 2.6.30 and 2.6.31 with same changes, results are some. It doesn't work!
As soon as a try to run hostapd on that interface, here's what happens:
rakesh at pineapple:/usr/src/hostapd-0.6.9/hostapd$ sudo hostapd hostapd.conf *Configuration file: hostapd.conf
Could not connect to kernel driver.
Could not set channel for kernel driver
rmdir[ctrl_interface]: No such file or directory
*and the wlan0 interface which is up and running previously goes down and I force it go up by ifconfig and then it goes up and as soon as I run the command above, it goes down. Here's what happens to /var/log/syslog:
*Jul 23 23:53:02 pineapple avahi-daemon[4860]: Interface wlan0.IPv4 no longer relevant for mDNS.
Jul 23 23:53:02 pineapple avahi-daemon[4860]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.1. Jul 23 23:53:02 pineapple avahi-daemon[4860]: Withdrawing address record for 192.168.1.1 on wlan0. Jul 23 23:53:02 pineapple avahi-daemon[4860]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.1. Jul 23 23:53:02 pineapple avahi-daemon[4860]: New relevant interface wlan0.IPv4 for mDNS. Jul 23 23:53:02 pineapple avahi-daemon[4860]: Registering new address record for 192.168.1.1 on wlan0.IPv4. Jul 23 23:53:02 pineapple avahi-daemon[4860]: Interface wlan0.IPv4 no longer relevant for mDNS. Jul 23 23:53:02 pineapple avahi-daemon[4860]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.1. Jul 23 23:53:02 pineapple avahi-daemon[4860]: Withdrawing address record for
192.168.1.1 on wlan0.
*
I have a strong feeling that I broke something in the code but I don't know what has gone wrong:
1. How do I debug it?
2. Can somebody look at the code changes I made and respond as to what I might have goofed up with, everthing - also hostapd - works fine without the code changed both with 2.6.30 and 2.6.31 versions.
--
Rakesh
Rakesh Wrote:
*Hi,
I made a few small changes in nl80211.c (cfg80211) and cfg.c (mac80211) for supporting explicit rate setting (say if the user wants to set a fixed rate and avoid usage of rate control algo). Anyway, I compiled everything and can load both cfg80211 and mac80211 but when it comes to loading ath9k, I get an error message on the command line saying:
rakesh at pineapple:~/compat-wireless-2.6.30$ sudo insmod ./drivers/net/wireless/ath9k/ath9k.ko
insmod: error inserting './drivers/net/wireless/ath9k/ath9k.ko': -1 Unknown symbol in module
and the syslog reads:
Jul 23 17:30:41 pineapple kernel: [ 4486.158281] ath9k: Unknown symbol rfkill_force_state Jul 23 17:30:41 pineapple kernel: [ 4486.158486] ath9k: Unknown symbol rfkill_unregister Jul 23 17:30:41 pineapple kernel: [ 4486.159220] ath9k: Unknown symbol led_classdev_unregister Jul 23 17:30:41 pineapple kernel: [ 4486.161183] ath9k: Unknown symbol rfkill_free Jul 23 17:30:41 pineapple kernel: [ 4486.161619] ath9k: Unknown symbol rfkill_allocate Jul 23 17:30:41 pineapple kernel: [ 4486.161817] ath9k: Unknown symbol rfkill_register Jul 23 17:30:41 pineapple kernel: [ 4486.162403] ath9k: Unknown symbol
led_classdev_register
Can somebody help as to what might be causing this problem, I did not touch the ath9k code at all. I tried to grep these symbol names in the code but do not finy clue except them being called in main.c of ath9k.
For the record, I made following changes in nl80211.c:
diff compat-wireless-2.6.30/net/wireless/nl80211.c compat-wireless-2.6.30_fresh/net/wireless/nl80211.c 63a64
Quoted 1 line
65,66d65
< //Rakesh:
< [NL80211_ATTR_IFRATE] = { .type = NLA_U32 },
482a482
Quoted 1 line
695,731d694
< //Rakesh:
< static int nl80211_set_rate(struct sk_buff *skb, struct genl_info *info) < {
< struct cfg80211_registered_device *drv; < int err, ifindex; < unsigned int rate;
<
< struct net_device *dev;
< bool change = false;
<
< rtnl_lock();
<
< err = get_drv_dev_by_info_ifindex(**info->attrs, &drv, &dev);
< if (err)
< goto unlock_rtnl;
<
< ifindex = dev->ifindex;
<
< dev_put(dev);
<
< if (info->attrs[NL80211_ATTR_**IFRATE]) {
< rate = nla_get_u32(info->attrs[**NL80211_ATTR_IFTYPE]);
< change = true;
< }
<
< if (change)
< err = drv->ops->change_intf_rate(&**drv->wiphy, ifindex,
< rate);
< else
< err = 0;
< unlock:
< cfg80211_put_dev(drv);
< unlock_rtnl:
< rtnl_unlock();
< return err;
< }
<
3055,3061d3017
< //Rakesh:
< {
< .cmd = NL80211_CMD_SET_RATE, < .doit = nl80211_set_rate, < .policy = nl80211_policy, < .flags = GENL_ADMIN_PERM,
< },
and following changes in cfg.c
diff compat-wireless-2.6.30/net/**mac80211/cfg.c compat-wireless-2.6.30_fresh/**net/mac80211/cfg.c 113,132d112
< static int ieee80211_change_rate(struct wiphy *wiphy, int ifindex,
< unsigned int rate)
< {
< struct net_device *dev; < struct ieee80211_sub_if_data *sdata; < int ret; < < /* we're under RTNL */ < dev = __dev_get_by_index(&init_net, ifindex); < if (!dev)
< return -ENODEV;
<
< sdata = IEEE80211_DEV_TO_SUB_IF(dev);
<
< sdata->force_unicast_rateidx = rate;
< return 0;
< }
<
<
<
1313,1314d1292
< //Rakesh
< .change_intf_rate = ieee80211_change_rate,
And following changes in cfg80211.h
rakesh@pineapple:~$ diff compat-wireless-2.6.30/* *include/net/ compat-wireless-2.6.30_fresh/**include/net/ diff compat-wireless-2.6.30/**include/net/cfg80211.h compat-wireless-2.6.30_fresh/**include/net/cfg80211.h 749,752c749 < //Rakesh: < int (*change_intf_rate)(struct wiphy *wiphy, int ifindex, < unsigned int type); < ---
Quoted 1 line
And following changes in nl80211.h
rakesh at pineapple:~$ diff compat-wireless-2.6.30/* *include/linux/nl80211.h compat-wireless-2.6.30_fresh/**include/linux/nl80211.h
218,219d217
< //Rakesh:
< NL80211_CMD_SET_RATE,
426,427d423
< //Rakesh:
< NL80211_ATTR_IFRATE,*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090724/97448c39/attachment-0001.htm