• Emil Goode's avatar
    staging: wlan-ng: Fix problem with wrong arguments · 01f8a27e
    Emil Goode authored
    The function pointer scan in struct cfg80211_ops is not
    supposed to be assigned a function with a struct net_device
    pointer as an argument. Instead access the net_device struct
    in the following way:
    
    struct net_device *dev = request->wdev->netdev;
    
    sparse gives these warnings:
    
    drivers/staging/wlan-ng/cfg80211.c:726:17: warning:
            incorrect type in initializer (incompatible argument 2
            (different base types))
            expected int ( *scan )( ... )
            got int ( extern [toplevel] *<noident> )( ... )
    
    drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
            initialization from incompatible pointer type [enabled by default]
    
    drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
            (near initialization for ‘prism2_usb_cfg_ops.scan’)
            [enabled by default]
    Signed-off-by: default avatarEmil Goode <emilgoode@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    01f8a27e
cfg80211.c 18 KB