@@ -909,85 +909,6 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee,
909909 return skb ;
910910}
911911
912- static struct sk_buff * rtllib_assoc_resp (struct rtllib_device * ieee , u8 * dest )
913- {
914- struct sk_buff * skb ;
915- u8 * tag ;
916-
917- struct lib80211_crypt_data * crypt ;
918- struct rtllib_assoc_response_frame * assoc ;
919- short encrypt ;
920-
921- unsigned int rate_len = rtllib_MFIE_rate_len (ieee );
922- int len = sizeof (struct rtllib_assoc_response_frame ) + rate_len +
923- ieee -> tx_headroom ;
924-
925- skb = dev_alloc_skb (len );
926-
927- if (!skb )
928- return NULL ;
929-
930- skb_reserve (skb , ieee -> tx_headroom );
931-
932- assoc = skb_put (skb , sizeof (struct rtllib_assoc_response_frame ));
933-
934- assoc -> header .frame_ctl = cpu_to_le16 (RTLLIB_STYPE_ASSOC_RESP );
935- ether_addr_copy (assoc -> header .addr1 , dest );
936- ether_addr_copy (assoc -> header .addr3 , ieee -> dev -> dev_addr );
937- ether_addr_copy (assoc -> header .addr2 , ieee -> dev -> dev_addr );
938- assoc -> capability = cpu_to_le16 (WLAN_CAPABILITY_IBSS );
939-
940- assoc -> capability |= cpu_to_le16 (WLAN_CAPABILITY_SHORT_SLOT_TIME );
941-
942- crypt = ieee -> crypt_info .crypt [ieee -> crypt_info .tx_keyidx ];
943-
944- encrypt = (crypt && crypt -> ops );
945-
946- if (encrypt )
947- assoc -> capability |= cpu_to_le16 (WLAN_CAPABILITY_PRIVACY );
948-
949- assoc -> status = 0 ;
950- assoc -> aid = cpu_to_le16 (ieee -> assoc_id );
951- if (ieee -> assoc_id == 0x2007 )
952- ieee -> assoc_id = 0 ;
953- else
954- ieee -> assoc_id ++ ;
955-
956- tag = skb_put (skb , rate_len );
957- rtllib_MFIE_Brate (ieee , & tag );
958- rtllib_MFIE_Grate (ieee , & tag );
959-
960- return skb ;
961- }
962-
963- static struct sk_buff * rtllib_auth_resp (struct rtllib_device * ieee , int status ,
964- u8 * dest )
965- {
966- struct sk_buff * skb = NULL ;
967- struct rtllib_authentication * auth ;
968- int len = ieee -> tx_headroom + sizeof (struct rtllib_authentication ) + 1 ;
969-
970- skb = dev_alloc_skb (len );
971- if (!skb )
972- return NULL ;
973-
974- skb -> len = sizeof (struct rtllib_authentication );
975-
976- skb_reserve (skb , ieee -> tx_headroom );
977-
978- auth = skb_put (skb , sizeof (struct rtllib_authentication ));
979-
980- auth -> status = cpu_to_le16 (status );
981- auth -> transaction = cpu_to_le16 (2 );
982- auth -> algorithm = cpu_to_le16 (WLAN_AUTH_OPEN );
983-
984- ether_addr_copy (auth -> header .addr3 , ieee -> dev -> dev_addr );
985- ether_addr_copy (auth -> header .addr2 , ieee -> dev -> dev_addr );
986- ether_addr_copy (auth -> header .addr1 , dest );
987- auth -> header .frame_ctl = cpu_to_le16 (RTLLIB_STYPE_AUTH );
988- return skb ;
989- }
990-
991912static struct sk_buff * rtllib_null_func (struct rtllib_device * ieee , short pwr )
992913{
993914 struct sk_buff * skb ;
@@ -1035,22 +956,6 @@ static struct sk_buff *rtllib_pspoll_func(struct rtllib_device *ieee)
1035956 return skb ;
1036957}
1037958
1038- static void rtllib_resp_to_assoc_rq (struct rtllib_device * ieee , u8 * dest )
1039- {
1040- struct sk_buff * buf = rtllib_assoc_resp (ieee , dest );
1041-
1042- if (buf )
1043- softmac_mgmt_xmit (buf , ieee );
1044- }
1045-
1046- static void rtllib_resp_to_auth (struct rtllib_device * ieee , int s , u8 * dest )
1047- {
1048- struct sk_buff * buf = rtllib_auth_resp (ieee , s , dest );
1049-
1050- if (buf )
1051- softmac_mgmt_xmit (buf , ieee );
1052- }
1053-
1054959static void rtllib_resp_to_probe (struct rtllib_device * ieee , u8 * dest )
1055960{
1056961 struct sk_buff * buf = rtllib_probe_resp (ieee , dest );
@@ -1708,25 +1613,6 @@ static inline int auth_parse(struct net_device *dev, struct sk_buff *skb,
17081613 return 0 ;
17091614}
17101615
1711- static int auth_rq_parse (struct net_device * dev , struct sk_buff * skb , u8 * dest )
1712- {
1713- struct rtllib_authentication * a ;
1714-
1715- if (skb -> len < (sizeof (struct rtllib_authentication ) -
1716- sizeof (struct rtllib_info_element ))) {
1717- netdev_dbg (dev , "invalid len in auth request: %d\n" , skb -> len );
1718- return -1 ;
1719- }
1720- a = (struct rtllib_authentication * )skb -> data ;
1721-
1722- ether_addr_copy (dest , a -> header .addr2 );
1723-
1724- if (le16_to_cpu (a -> algorithm ) != WLAN_AUTH_OPEN )
1725- return WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG ;
1726-
1727- return WLAN_STATUS_SUCCESS ;
1728- }
1729-
17301616static short probe_rq_parse (struct rtllib_device * ieee , struct sk_buff * skb ,
17311617 u8 * src )
17321618{
@@ -1773,23 +1659,6 @@ static short probe_rq_parse(struct rtllib_device *ieee, struct sk_buff *skb,
17731659 return !strncmp (ssid , ieee -> current_network .ssid , ssidlen );
17741660}
17751661
1776- static int assoc_rq_parse (struct net_device * dev , struct sk_buff * skb , u8 * dest )
1777- {
1778- struct rtllib_assoc_request_frame * a ;
1779-
1780- if (skb -> len < (sizeof (struct rtllib_assoc_request_frame ) -
1781- sizeof (struct rtllib_info_element ))) {
1782- netdev_dbg (dev , "invalid len in auth request:%d\n" , skb -> len );
1783- return -1 ;
1784- }
1785-
1786- a = (struct rtllib_assoc_request_frame * )skb -> data ;
1787-
1788- ether_addr_copy (dest , a -> header .addr2 );
1789-
1790- return 0 ;
1791- }
1792-
17931662static inline u16 assoc_parse (struct rtllib_device * ieee , struct sk_buff * skb ,
17941663 int * aid )
17951664{
@@ -1830,31 +1699,6 @@ void rtllib_rx_probe_rq(struct rtllib_device *ieee, struct sk_buff *skb)
18301699 }
18311700}
18321701
1833- static inline void rtllib_rx_auth_rq (struct rtllib_device * ieee ,
1834- struct sk_buff * skb )
1835- {
1836- u8 dest [ETH_ALEN ];
1837- int status ;
1838-
1839- ieee -> softmac_stats .rx_auth_rq ++ ;
1840-
1841- status = auth_rq_parse (ieee -> dev , skb , dest );
1842- if (status != -1 )
1843- rtllib_resp_to_auth (ieee , status , dest );
1844- }
1845-
1846- static inline void rtllib_rx_assoc_rq (struct rtllib_device * ieee ,
1847- struct sk_buff * skb )
1848- {
1849- u8 dest [ETH_ALEN ];
1850-
1851- ieee -> softmac_stats .rx_ass_rq ++ ;
1852- if (assoc_rq_parse (ieee -> dev , skb , dest ) != -1 )
1853- rtllib_resp_to_assoc_rq (ieee , dest );
1854-
1855- netdev_info (ieee -> dev , "New client associated: %pM\n" , dest );
1856- }
1857-
18581702void rtllib_sta_ps_send_null_frame (struct rtllib_device * ieee , short pwr )
18591703{
18601704 struct sk_buff * buf = rtllib_null_func (ieee , pwr );
@@ -2419,30 +2263,6 @@ void rtllib_wake_all_queues(struct rtllib_device *ieee)
24192263 netif_tx_wake_all_queues (ieee -> dev );
24202264}
24212265
2422- /* called in user context only */
2423- static void rtllib_start_master_bss (struct rtllib_device * ieee )
2424- {
2425- ieee -> assoc_id = 1 ;
2426-
2427- if (ieee -> current_network .ssid_len == 0 ) {
2428- strncpy (ieee -> current_network .ssid ,
2429- RTLLIB_DEFAULT_TX_ESSID ,
2430- IW_ESSID_MAX_SIZE );
2431-
2432- ieee -> current_network .ssid_len =
2433- strlen (RTLLIB_DEFAULT_TX_ESSID );
2434- ieee -> ssid_set = 1 ;
2435- }
2436-
2437- ether_addr_copy (ieee -> current_network .bssid , ieee -> dev -> dev_addr );
2438-
2439- ieee -> set_chan (ieee -> dev , ieee -> current_network .channel );
2440- ieee -> link_state = MAC80211_LINKED ;
2441- ieee -> link_change (ieee -> dev );
2442- notify_wx_assoc_event (ieee );
2443- netif_carrier_on (ieee -> dev );
2444- }
2445-
24462266static void rtllib_start_monitor_mode (struct rtllib_device * ieee )
24472267{
24482268 /* reset hardware status */
0 commit comments