Linux kernel wireless device driver

时间:2016-10-20 13:19:51

标签: c linux linux-kernel linux-device-driver wireless

I can't understand one thing in net/wireless/nl80211.c file starting from kernel 3.13. Why there is following if statement in nl80211_start_radar_detection():

if (netif_carrier_ok(dev)) {
    return -EBUSY;
}

From what I understand this means that we cannot start radar detection if our driver carrier is ready. Why? Shouldn't that be

if (!netif_carrier_ok(dev)) {
    return -EBUSY;
}

Thanks

1 个答案:

答案 0 :(得分:0)

nl80211_start_radar_detection(): - 这将启动雷达探测,如果检测到雷达,将从​​通道移动。

但是这里是netif_carrier_ok(dev),检查设备是否支持该载波,或者我的设备是否可以在该通道上运行,如果没有返回错误。

无需继续操作并检查雷达。