Selaa lähdekoodia

make it more human readable

Signed-off-by: Wiktor Strzębała <wiktorek140@gmail.com>
Wiktor Strzębała 3 vuotta sitten
vanhempi
commit
7aa12763ed
2 muutettua tiedostoa jossa 15 lisäystä ja 11 poistoa
  1. 7 6
      os_dep/linux/ioctl_cfg80211.c
  2. 8 5
      os_dep/linux/os_intfs.c

+ 7 - 6
os_dep/linux/ioctl_cfg80211.c

@@ -1964,7 +1964,7 @@ exit:
 
 static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
-                int link_id,
+				int link_id,
 #endif
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
 				u8 key_index, bool pairwise, const u8 *mac_addr)
@@ -1987,9 +1987,9 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
 
 static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
 	struct net_device *ndev
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
+	#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
 	, int link_id
-#endif
+	#endif
     , u8 key_index
 	#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
 	, bool unicast, bool multicast
@@ -2038,11 +2038,12 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
 int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
-	struct net_device *ndev, 
+	struct net_device *ndev
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
-	int link_idm,
+	, int link_idm
 #endif
-    u8 key_index)
+	, u8 key_index
+)
 {
 #define SET_DEF_KEY_PARAM_FMT " key_index=%d"
 #define SET_DEF_KEY_PARAM_ARG , key_index

+ 8 - 5
os_dep/linux/os_intfs.c

@@ -1680,11 +1680,14 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
 	u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
 
 #ifdef CONFIG_RTW_NAPI
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
-	netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll);
-#else
-	netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
-#endif
+	netif_napi_add(
+		ndev,
+		&adapter->napi,
+		rtw_recv_napi_poll
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
+		RTL_NAPI_WEIGHT
+#endif
+	);
 #endif /* CONFIG_RTW_NAPI */
 
 #if defined(CONFIG_IOCTL_CFG80211)