anchor.diff:      socket_close(Socket),
       ok.
   
  -code_change(_OldVsn, StateName, State, _Extra) ->
  -    {ok, StateName, State}.
  +code_change(_OldVsn, State, Data, _Extra) ->
  +    {ok, State, Data}.
   
   %%%===================================================================
   %%% Internal functions
  
positive.code: 		   peer_rekey = PeerRekey,
  		   group_rekey = GroupRekey,
  		   strict_group_rekey = StrictGroupRekey} = WlanConfig,
  		#state{mac_types = MacTypes, tunnel_modes = TunnelModes}) ->
  
      MacMode = select_mac_mode(WlanConfig, MacTypes),
      TunnelMode = select_tunnel_mode(TunnelModes, MacMode),
  
negative.code:     UpdateWlan = UpdateWlan0#ieee_802_11_update_wlan{key_status = completed_rekeying},
      NotifyFun = finish_gtk_rekey_result(WlanIdent, _, _, _),
  
      Data1 = update_wlan_state(WlanIdent, fun(_W) -> Wlan end, Data0),
      ReqElements = [set_wlan_keys(Wlan, UpdateWlan)],
      send_request(Header, ieee_802_11_wlan_configuration_request, ReqElements, NotifyFun, Data1);
  
  finish_gtk_rekey({RadioId, WlanId}, Wlan, Data) ->
      lager:warning("failed to start GTK rekey for ~w:~w (~p)", [RadioId, WlanId, lager:pr(Wlan, ?MODULE)]),
      Data.
  
  %% Note: failures will be handled the FSM event function
  finish_gtk_rekey_result(WlanIdent, Code, _Arg, Data) ->
      ReKeyData = if Code == 0 -> idle;
  		   true      -> failed
  		 end,
      update_wlan_state(WlanIdent, fun(W0) ->
  					 W = W0#wlan{group_rekey_state = ReKeyData},
  					 start_group_rekey_timer(W)
  				 end, Data).
  
  wtp_stats_to_accouting({RcvdPkts, SendPkts, RcvdBytes, SendBytes,
  			RcvdFragments, SendFragments,
  