On the frequency shift of gravitational waves