This patch fixes places where pointers are compared against 0 and unifies it a bit.

Signed-off-by: Johannes Berg <[EMAIL PROTECTED]>

--- wireless-dev.orig/net/d80211/ieee80211_scan.c 2006-08-12 10:11:21.069644280 +0200 +++ wireless-dev/net/d80211/ieee80211_scan.c 2006-08-12 10:11:44.619644280 +0200
@@ -117,7 +117,7 @@ static void ieee80211_scan_start(struct
    struct ieee80211_channel *chan = NULL;
    int ret;

-    if (local->hw->passive_scan == 0) {
+    if (local->hw->passive_scan == NULL) {
        printk(KERN_DEBUG "%s: Scan handler called, yet the hardware "
               "does not support passive scanning. Disabled.\n",
               dev->name);
@@ -293,7 +293,7 @@ void ieee80211_init_scan(struct net_devi
    struct rate_control_extra extra;

    /* Only initialize passive scanning if the hardware supports it */
-    if (!local->hw->passive_scan) {
+    if (local->hw->passive_scan == NULL) {
        local->scan.skb = NULL;
        memset(&local->scan.tx_control, 0,
               sizeof(local->scan.tx_control));
@@ -344,7 +344,7 @@ void ieee80211_stop_scan(struct net_devi
{
    struct ieee80211_local *local = dev->ieee80211_ptr;

-    if (local->hw->passive_scan != 0) {
+    if (local->hw->passive_scan != NULL) {
        del_timer_sync(&local->scan.timer);
        dev_kfree_skb(local->scan.skb);
        local->scan.skb = NULL;

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to