Got connection problems: How to reset wifi stack without factory reset? I installed CM 5.1.1 and restored a ton of apps with Titanium Backup.

Now my Wifi is bugged: When I enter a known Wifi network the phone connects to the wifi but can't make a real connection (has a '!').
There might be a problem with tethering or priorities:

$ netcfg
rmnet_usb0 UP                              10.175.104.107/29  0x00000041
wlan0    UP                               192.168.2.126/24  0x00001043


I have to turn off mobile data to get a network connection.  

Now I want to learn how to reset the wifi stack to get rid of the problem without starting from scrach. Where is the culprit?

My setup is a Samsung Galaxy S4 LTE with Optimised CM12.1 by AnteresOne. Xposed and Xprivacy as well as AFWall+ are installed.
Solution was in my case: Deactivate AFwall+ 2.0alpha2. The app caused connection problem.

A solution that didn't help:
Updating your modem/non-hlos to the latest version for your country/carrier.