@@ -401,9 +401,6 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
401401 PRINT_D (vif -> ndev , CFG80211_DBG , "Required SSID= %s\n, AuthType= %d\n" ,
402402 sme -> ssid , sme -> auth_type );
403403
404- memset (priv -> wep_key , 0 , sizeof (priv -> wep_key ));
405- memset (priv -> wep_key_len , 0 , sizeof (priv -> wep_key_len ));
406-
407404 PRINT_D (vif -> ndev , CFG80211_DBG , "sme->crypto.wpa_versions=%x\n" ,
408405 sme -> crypto .wpa_versions );
409406 PRINT_D (vif -> ndev , CFG80211_DBG , "sme->crypto.cipher_group=%x\n" ,
@@ -420,34 +417,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
420417 PRINT_INFO (vif -> ndev , CORECONFIG_DBG ,
421418 ">> sme->crypto.wpa_versions: %x\n" ,
422419 sme -> crypto .wpa_versions );
423- if (cipher_group == WLAN_CIPHER_SUITE_WEP40 ) {
424- security = WILC_FW_SEC_WEP ;
425- PRINT_D (vif -> ndev , CFG80211_DBG ,
426- "WEP Default Key Idx = %d\n" , sme -> key_idx );
427-
428- for (i = 0 ; i < sme -> key_len ; i ++ )
429- PRINT_D (vif -> ndev , CORECONFIG_DBG ,
430- "WEP Key Value[%d] = %d\n" , i ,
431- sme -> key [i ]);
432-
433- priv -> wep_key_len [sme -> key_idx ] = sme -> key_len ;
434- memcpy (priv -> wep_key [sme -> key_idx ], sme -> key ,
435- sme -> key_len );
436-
437- wilc_set_wep_default_keyid (vif , sme -> key_idx );
438- wilc_add_wep_key_bss_sta (vif , sme -> key , sme -> key_len ,
439- sme -> key_idx );
440- } else if (cipher_group == WLAN_CIPHER_SUITE_WEP104 ) {
441- security = WILC_FW_SEC_WEP_EXTENDED ;
442-
443- priv -> wep_key_len [sme -> key_idx ] = sme -> key_len ;
444- memcpy (priv -> wep_key [sme -> key_idx ], sme -> key ,
445- sme -> key_len );
446-
447- wilc_set_wep_default_keyid (vif , sme -> key_idx );
448- wilc_add_wep_key_bss_sta (vif , sme -> key , sme -> key_len ,
449- sme -> key_idx );
450- } else if (sme -> crypto .wpa_versions & NL80211_WPA_VERSION_2 ) {
420+ if (sme -> crypto .wpa_versions & NL80211_WPA_VERSION_2 ) {
451421 if (cipher_group == WLAN_CIPHER_SUITE_TKIP )
452422 security = WILC_FW_SEC_WPA2_TKIP ;
453423 else
@@ -488,11 +458,6 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
488458 auth_type = WILC_FW_AUTH_OPEN_SYSTEM ;
489459 break ;
490460
491- case NL80211_AUTHTYPE_SHARED_KEY :
492- auth_type = WILC_FW_AUTH_SHARED_KEY ;
493- PRINT_INFO (vif -> ndev , CFG80211_DBG , "In SHARED KEY\n" );
494- break ;
495-
496461 default :
497462 PRINT_INFO (vif -> ndev , CFG80211_DBG ,
498463 "Automatic Authentication type= %d\n" ,
@@ -610,14 +575,6 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev,
610575 return ret ;
611576}
612577
613- static inline void wilc_wfi_cfg_copy_wep_info (struct wilc_priv * priv ,
614- u8 key_index ,
615- struct key_params * params )
616- {
617- priv -> wep_key_len [key_index ] = params -> key_len ;
618- memcpy (priv -> wep_key [key_index ], params -> key , params -> key_len );
619- }
620-
621578static int wilc_wfi_cfg_allocate_wpa_entry (struct wilc_priv * priv , u8 idx )
622579{
623580 if (!priv -> wilc_gtk [idx ]) {
@@ -671,7 +628,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
671628 const u8 * tx_mic = NULL ;
672629 u8 mode = WILC_FW_SEC_NO ;
673630 u8 op_mode ;
674- int i ;
675631 struct wilc_vif * vif = netdev_priv (netdev );
676632 struct wilc_priv * priv = & vif -> priv ;
677633
@@ -683,51 +639,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
683639 params -> key [1 ],
684640 params -> key [2 ]);
685641 switch (params -> cipher ) {
686- case WLAN_CIPHER_SUITE_WEP40 :
687- case WLAN_CIPHER_SUITE_WEP104 :
688- if (priv -> wdev .iftype == NL80211_IFTYPE_AP ) {
689- wilc_wfi_cfg_copy_wep_info (priv , key_index , params );
690-
691- PRINT_INFO (vif -> ndev , CFG80211_DBG ,
692- "Adding AP WEP Default key Idx = %d\n" ,
693- key_index );
694- PRINT_INFO (vif -> ndev , CFG80211_DBG ,
695- "Adding AP WEP Key len= %d\n" ,
696- params -> key_len );
697-
698- for (i = 0 ; i < params -> key_len ; i ++ )
699- PRINT_INFO (vif -> ndev , CFG80211_DBG ,
700- "WEP AP key val[%d] = %x\n" , i ,
701- params -> key [i ]);
702-
703- if (params -> cipher == WLAN_CIPHER_SUITE_WEP40 )
704- mode = WILC_FW_SEC_WEP ;
705- else
706- mode = WILC_FW_SEC_WEP_EXTENDED ;
707-
708- ret = wilc_add_wep_key_bss_ap (vif , params -> key ,
709- params -> key_len ,
710- key_index , mode ,
711- WILC_FW_AUTH_OPEN_SYSTEM );
712- break ;
713- }
714- if (memcmp (params -> key , priv -> wep_key [key_index ],
715- params -> key_len )) {
716- wilc_wfi_cfg_copy_wep_info (priv , key_index , params );
717-
718- PRINT_INFO (vif -> ndev , CFG80211_DBG ,
719- "Adding WEP Default key Idx = %d\n" ,
720- key_index );
721- PRINT_INFO (vif -> ndev , CFG80211_DBG ,
722- "Adding WEP Key length = %d\n" ,
723- params -> key_len );
724- ret = wilc_add_wep_key_bss_sta (vif , params -> key ,
725- params -> key_len ,
726- key_index );
727- }
728-
729- break ;
730-
731642 case WLAN_CIPHER_SUITE_TKIP :
732643 case WLAN_CIPHER_SUITE_CCMP :
733644 if (priv -> wdev .iftype == NL80211_IFTYPE_AP ||
@@ -830,15 +741,6 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
830741 priv -> wilc_ptk [key_index ] = NULL ;
831742 }
832743
833- if (key_index <= 3 && priv -> wep_key_len [key_index ]) {
834- memset (priv -> wep_key [key_index ], 0 ,
835- priv -> wep_key_len [key_index ]);
836- priv -> wep_key_len [key_index ] = 0 ;
837- pr_info ("%s: Removing WEP key with index = %d\n" , __func__ ,
838- key_index );
839- ret = wilc_remove_wep_key (vif , key_index );
840- }
841-
842744 return ret ;
843745}
844746
@@ -872,13 +774,10 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
872774 return 0 ;
873775}
874776
777+ /* wiphy_new() will WARN if not present*/
875778static int set_default_key (struct wiphy * wiphy , struct net_device * netdev ,
876779 u8 key_index , bool unicast , bool multicast )
877780{
878- struct wilc_vif * vif = netdev_priv (netdev );
879-
880- wilc_set_wep_default_keyid (vif , key_index );
881-
882781 return 0 ;
883782}
884783
0 commit comments