diff options
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 23 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/os_intfs.c | 7 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/osdep_service.c | 5 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 |
5 files changed, 23 insertions, 20 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 95953eb..ae54587 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -938,7 +938,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); if (pPMK->cmd == IW_PMKSA_ADD) { DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); - if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == true) + if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN)) return ret; else ret = true; @@ -1039,7 +1039,7 @@ static int rtw_wx_get_range(struct net_device *dev, range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */ /* TODO: Find real 'good' to 'bad' threshol value for RSSI */ - range->avg_qual.level = 20 + -98; + range->avg_qual.level = 178; /* -78 dBm */ range->avg_qual.noise = 0; range->avg_qual.updated = 7; /* Updated all three */ @@ -1074,7 +1074,7 @@ static int rtw_wx_get_range(struct net_device *dev, /* The following code will proivde the security capability to network manager. */ /* If the driver doesn't provide this capability to network manager, */ -/* the WPA/WPA2 routers can't be choosen in the network manager. */ +/* the WPA/WPA2 routers can't be chosen in the network manager. */ /* #define IW_SCAN_CAPA_NONE 0x00 @@ -1373,7 +1373,7 @@ _func_enter_; } } - /* it has still some scan paramater to parse, we only do this now... */ + /* it has still some scan parameter to parse, we only do this now... */ _status = rtw_set_802_11_bssid_list_scan(padapter, ssid, RTW_SSID_SCAN_AMOUNT); } else { _status = rtw_set_802_11_bssid_list_scan(padapter, NULL, 0); @@ -2626,7 +2626,7 @@ static int rtw_get_ap_info(struct net_device *dev, return -EINVAL; } - if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == true) { + if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) { /* BSSID match, then check if supporting wpa/wpa2 */ DBG_88E("BSSID:%pM\n", (bssid)); @@ -2961,7 +2961,7 @@ static int rtw_p2p_get_status(struct net_device *dev, /* Commented by Albert 20110520 */ /* This function will return the config method description */ -/* This config method description will show us which config method the remote P2P device is intented to use */ +/* This config method description will show us which config method the remote P2P device is intended to use */ /* by sending the provisioning discovery request frame. */ static int rtw_p2p_get_req_cm(struct net_device *dev, @@ -3413,7 +3413,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev, /* +8 is for the str "InvProc =", we have to clear it at wrqu->data.pointer */ /* Commented by Ouden 20121226 */ - /* The application wants to know P2P initation procedure is support or not. */ + /* The application wants to know P2P initiation procedure is supported or not. */ /* Format: iwpriv wlanx p2p_get2 InvProc = 00:E0:4C:00:00:05 */ DBG_88E("[%s] data = %s\n", __func__, (char *)extra); @@ -4040,7 +4040,7 @@ static int rtw_rereg_nd_name(struct net_device *dev, if (0 != ret) goto exit; - if (!memcmp(rereg_priv->old_ifname, "disable%d", 9) == true) { + if (!memcmp(rereg_priv->old_ifname, "disable%d", 9)) { padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed; rtw_hal_sw_led_init(padapter); rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode); @@ -4049,7 +4049,7 @@ static int rtw_rereg_nd_name(struct net_device *dev, strncpy(rereg_priv->old_ifname, new_ifname, IFNAMSIZ); rereg_priv->old_ifname[IFNAMSIZ-1] = 0; - if (!memcmp(new_ifname, "disable%d", 9) == true) { + if (!memcmp(new_ifname, "disable%d", 9)) { DBG_88E("%s disable\n", __func__); /* free network queue for Android's timming issue */ rtw_free_network_queue(padapter, true); @@ -4884,7 +4884,6 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) case _TKIP_: case _TKIP_WTMIC_: case _AES_: - keylen = 16; default: keylen = 16; } @@ -6146,7 +6145,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]); - /* Change to check TYPE_EFUSE_MAP_LEN, beacuse 8188E raw 256, logic map over 256. */ + /* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */ EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false); if ((addr+cnts) > max_available_size) { DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); @@ -6221,7 +6220,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2) setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]); - /* Change to check TYPE_EFUSE_MAP_LEN, beacuse 8188E raw 256, logic map over 256. */ + /* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */ EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false); if ((addr+cnts) > max_available_size) { DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index 63bc913..17659bb 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c @@ -85,7 +85,7 @@ static int rtw_uapsd_acvi_en; static int rtw_uapsd_acvo_en; int rtw_ht_enable = 1; -int rtw_cbw40_enable = 3; /* 0 :diable, bit(0): enable 2.4g, bit(1): enable 5g */ +int rtw_cbw40_enable = 3; /* 0 :disable, bit(0): enable 2.4g, bit(1): enable 5g */ int rtw_ampdu_enable = 1;/* for enable tx_ampdu */ static int rtw_rx_stbc = 1;/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */ static int rtw_ampdu_amsdu;/* 0: disabled, 1:enabled, 2:auto */ @@ -707,6 +707,10 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname) return 0; } +static const struct device_type wlan_type = { + .name = "wlan", +}; + struct net_device *rtw_init_netdev(struct adapter *old_padapter) { struct adapter *padapter; @@ -722,6 +726,7 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter) if (!pnetdev) return NULL; + pnetdev->dev.type = &wlan_type; padapter = rtw_netdev_priv(pnetdev); padapter->pnetdev = pnetdev; DBG_88E("register rtw_netdev_ops to netdev_ops\n"); diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index 4e0bfb7..5a9e9e4 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -627,13 +627,14 @@ RETURN: int rtw_change_ifname(struct adapter *padapter, const char *ifname) { struct net_device *pnetdev; - struct net_device *cur_pnetdev = padapter->pnetdev; + struct net_device *cur_pnetdev; struct rereg_nd_name_data *rereg_priv; int ret; if (!padapter) goto error; + cur_pnetdev = padapter->pnetdev; rereg_priv = &padapter->rereg_nd_name_priv; /* free the old_pnetdev */ @@ -794,7 +795,7 @@ void *rtw_cbuf_pop(struct rtw_cbuf *cbuf) } /** - * rtw_cbuf_alloc - allocte a rtw_cbuf with given size and do initialization + * rtw_cbuf_alloc - allocate a rtw_cbuf with given size and do initialization * @size: size of pointer * * Returns: pointer of srtuct rtw_cbuf, NULL for allocation failure diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index e2f4e7d..3852ff4 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -77,8 +77,7 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, int rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf) { - if (precvbuf->purb) - usb_free_urb(precvbuf->purb); + usb_free_urb(precvbuf->purb); return _SUCCESS; } @@ -224,8 +223,7 @@ _func_exit_; _recv_indicatepkt_drop: /* enqueue back to free_recv_queue */ - if (precv_frame) - rtw_free_recvframe(precv_frame, pfree_recv_queue); + rtw_free_recvframe(precv_frame, pfree_recv_queue); _func_exit_; return _FAIL; diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 9ca3180..7d14779 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -737,7 +737,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, status = _SUCCESS; free_hal_data: - if (status != _SUCCESS && padapter->HalData) + if (status != _SUCCESS) kfree(padapter->HalData); handle_dualmac: if (status != _SUCCESS) |