diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2015-09-30 12:54:58 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:48:15 +0900 |
commit | 625baf49044a9913a331530332a408f76d4c8079 (patch) | |
tree | 7a7e2af9d5e40b54c19bbeaabbbd633050905f41 /drivers/net | |
parent | 57eb947d192921991ab4595756b138b8804624be (diff) |
LOCAL / net: bcm4358: fix the compiler warning for broadcom driver
Fixed the compiler warning for broadcom driver.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcmdhd4358/wl_cfg80211.c | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/drivers/net/wireless/bcmdhd4358/wl_cfg80211.c b/drivers/net/wireless/bcmdhd4358/wl_cfg80211.c index b20414464585..5d82e978aa96 100644 --- a/drivers/net/wireless/bcmdhd4358/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd4358/wl_cfg80211.c @@ -344,8 +344,8 @@ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params); static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev); -static s32 wl_cfg80211_get_station(struct wiphy *wiphy, - struct net_device *dev, u8 *mac, +static int wl_cfg80211_get_station(struct wiphy *wiphy, + struct net_device *dev, const u8 *mac, struct station_info *sinfo); static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, bool enabled, @@ -388,10 +388,10 @@ static s32 wl_cfg80211_resume(struct wiphy *wiphy); 2, 0)) static s32 wl_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, bcm_struct_cfgdev *cfgdev, u64 cookie); -static s32 wl_cfg80211_del_station(struct wiphy *wiphy, - struct net_device *ndev, u8* mac_addr); -static s32 wl_cfg80211_change_station(struct wiphy *wiphy, - struct net_device *dev, u8 *mac, struct station_parameters *params); +static int wl_cfg80211_del_station(struct wiphy *wiphy, + struct net_device *ndev, struct station_del_parameters *params); +static int wl_cfg80211_change_station(struct wiphy *wiphy, + struct net_device *dev, const u8 *mac, struct station_parameters *params); #endif /* WL_SUPPORT_BACKPORTED_KPATCHES || KERNEL_VER >= KERNEL_VERSION(3, 2, 0)) */ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) || defined(WL_COMPAT_WIRELESS) static s32 wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow); @@ -408,8 +408,8 @@ static void wl_cfg80211_scan_abort(struct bcm_cfg80211 *cfg); static s32 wl_notify_escan_complete(struct bcm_cfg80211 *cfg, struct net_device *ndev, bool aborted, bool fw_abort); #if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 2, 0)) || defined(WL_COMPAT_WIRELESS) -static s32 wl_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, - u8 *peer, enum nl80211_tdls_operation oper); +static int wl_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, + const u8 *peer, enum nl80211_tdls_operation oper); #endif /* LINUX_VERSION > KERNEL_VERSION(3,2,0) || WL_COMPAT_WIRELESS */ #ifdef WL_SCHED_SCAN static int wl_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev); @@ -5021,7 +5021,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, swap_key_to_BE(&key); memset(¶ms, 0, sizeof(params)); params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len); - memcpy(params.key, key.data, params.key_len); + memcpy((void *)params.key, (const void *)key.data, params.key_len); err = wldev_iovar_getint_bsscfg(dev, "wsec", &wsec, bssidx); if (unlikely(err)) { @@ -5074,9 +5074,9 @@ wl_cfg80211_config_default_mgmt_key(struct wiphy *wiphy, #endif /* MFP */ } -static s32 +static int wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, - u8 *mac, struct station_info *sinfo) + const u8 *mac, struct station_info *sinfo) { struct bcm_cfg80211 *cfg = wiphy_priv(wiphy); scb_val_t scb_val; @@ -7429,11 +7429,10 @@ static s32 wl_cfg80211_hostapd_sec( #if defined(WL_SUPPORT_BACKPORTED_KPATCHES) || (LINUX_VERSION_CODE >= KERNEL_VERSION(3, \ 2, 0)) -static s32 +static int wl_cfg80211_del_station( struct wiphy *wiphy, - struct net_device *ndev, - u8* mac_addr) + struct net_device *ndev, struct station_del_parameters *params) { struct net_device *dev; struct bcm_cfg80211 *cfg = wiphy_priv(wiphy); @@ -7446,7 +7445,7 @@ wl_cfg80211_del_station( int num_associated = 0; WL_DBG(("Entry\n")); - if (mac_addr == NULL) { + if (!params->mac) { WL_DBG(("mac_addr is NULL ignore it\n")); return 0; } @@ -7471,27 +7470,27 @@ wl_cfg80211_del_station( else num_associated = assoc_maclist->count; - memcpy(scb_val.ea.octet, mac_addr, ETHER_ADDR_LEN); + memcpy(scb_val.ea.octet, params->mac, ETHER_ADDR_LEN); scb_val.val = DOT11_RC_DEAUTH_LEAVING; err = wldev_ioctl(dev, WLC_SCB_DEAUTHENTICATE_FOR_REASON, &scb_val, sizeof(scb_val_t), true); if (err < 0) WL_ERR(("WLC_SCB_DEAUTHENTICATE_FOR_REASON err %d\n", err)); WL_ERR(("Disconnect STA : %s scb_val.val %d\n", - bcm_ether_ntoa((const struct ether_addr *)mac_addr, eabuf), + bcm_ether_ntoa((const struct ether_addr *)params->mac, eabuf), scb_val.val)); - if (num_associated > 0 && ETHER_ISBCAST(mac_addr)) + if (num_associated > 0 && ETHER_ISBCAST(params->mac)) wl_delay(400); return 0; } -static s32 +static int wl_cfg80211_change_station( struct wiphy *wiphy, struct net_device *dev, - u8 *mac, + const u8 *mac, struct station_parameters *params) { int err; @@ -7503,13 +7502,13 @@ wl_cfg80211_change_station( return -ENOTSUPP; if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))) { - err = wldev_ioctl(primary_ndev, WLC_SCB_DEAUTHORIZE, mac, ETH_ALEN, true); + err = wldev_ioctl(primary_ndev, WLC_SCB_DEAUTHORIZE, (void *)mac, ETH_ALEN, true); if (err) WL_ERR(("WLC_SCB_DEAUTHORIZE error (%d)\n", err)); return err; } - err = wldev_ioctl(primary_ndev, WLC_SCB_AUTHORIZE, mac, ETH_ALEN, true); + err = wldev_ioctl(primary_ndev, WLC_SCB_AUTHORIZE, (void *)mac, ETH_ALEN, true); if (err) WL_ERR(("WLC_SCB_AUTHORIZE error (%d)\n", err)); return err; @@ -8323,7 +8322,7 @@ static const struct wiphy_wowlan_support brcm_wowlan_support = { * Fixed the WiFi disconnection issue during suspend when AP is connected * Refer to commit 6abb9cb99f33b20c */ -static const struct cfg80211_wowlan brcm_wowlan_config = { +static struct cfg80211_wowlan brcm_wowlan_config = { .any = true, }; #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) */ @@ -12853,9 +12852,9 @@ wl_tdls_event_handler(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, #endif /* WLTDLS */ #if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 2, 0)) || defined(WL_COMPAT_WIRELESS) -static s32 +static int wl_cfg80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, - u8 *peer, enum nl80211_tdls_operation oper) + const u8 *peer, enum nl80211_tdls_operation oper) { s32 ret = 0; #ifdef WLTDLS |