anchor.diff:      {keep_state_and_data, [{reply, From, {ok, Data}}]};
   
   handle_event({call, From}, {set_ssid, {RadioId, WlanId} = WlanIdent, SSID, SuppressSSID},
  -	     run, #data{config = Config0} = Data0) ->
  +	     run, #data{id = CommonName, config = Config0} = Data0) ->
       Settings = [{ssid, SSID}, {suppress_ssid, SuppressSSID}],
       Config = update_wlan_config(RadioId, WlanId, Settings, Config0),
       Data1 = Data0#data{config = Config},
   
  -    AddResponseFun = fun(Code, _, DData) ->
  -			     lager:debug("AddResponseFun: ~w", [Code]),
  -			     case Code of
  -				 0 -> gen_statem:reply(From, ok);
  -				 _ -> gen_statem:reply(From, {error, Code})
  -			     end,
  -			     DData
  -		     end,
  +    AddResponseFun =
  +	fun(Code, _, DData) ->
  +		lager:debug("Add WLAN response for ~p: ~p", [CommonName, Code]),
  +		case Code of
  +		    0 -> gen_statem:reply(From, ok);
  +		    _ -> gen_statem:reply(From, {error, Code})
  +		end,
  +		DData
  +	end,
   
       Data =
   	case get_wlan(WlanIdent, Data1) of
  
positive.code: 		internal_add_wlan(RadioId, WlanId, AddResponseFun, Data1);
  
  	    #wlan{} ->
  		DelResponseFun = fun(0, _, DData) ->
  					 lager:debug("DelResponseFun: success"),
  					 internal_add_wlan(RadioId, WlanId, AddResponseFun, DData);
  				    (Code, Arg, DData) ->
  					 lager:debug("DelResponseFun: ~w", [Code]),
  					 AddResponseFun(Code, Arg, DData)
  				 end,
  		internal_del_wlan(WlanIdent, DelResponseFun, Data1)
  	end,
      {keep_state, Data};
  
  handle_event({call, From}, {stop_radio, RadioId}, run, Data) ->
      Data1 =
  	lists:foldl(fun(WlanIdent = {RId, _}, S) when RId == RadioId->
  			    internal_del_wlan(WlanIdent, undefined, S);
  		       (_, S) ->
  			    S
  		    end, Data, Data#data.wlans),
  
negative.code: 
  response_notify(NotifyFun, Code, Arg, Data)
    when is_function(NotifyFun, 3) ->
      NotifyFun(Code, Arg, Data);
  response_notify(undefined, _, _, Data) ->
      Data.
  
  internal_add_station_response_fun(From) ->
      internal_add_station_response(From, _, _, _).
  
  internal_add_station_response(From, 0, _, Data) ->
      lager:debug("Station Configuration ok"),
      gen_statem:reply(From, ok),
      Data;
  internal_add_station_response(From, Code, _, Data) ->
      lager:warning("Station Configuration failed with ~w", [Code]),
      gen_statem:reply(From, {error, Code}),
      Data.
  