Function to call when the protocol mode is updated.
This function is called every time the protocol mode is read or written. The old value is not checked.