Winds of hot stars are driven by the radiative force due to absorption of light in the lines of heavier elements. Consequently, the mass-loss rate and the wind velocity depend on the ionization state of the wind. As a result of this, there is a feedback between the ionizing X-ray source and the stellar wind in HMXBs powered by wind accretion. We study the influence of the small-scale wind structure (clumping) on this feedback using our NLTE hydrodynamical wind models. We find that clumping weakens the effect of X-ray irradiation. Moreover, we show that the observed X-ray luminosities of HMXBs can not be explained by wind accretion scenario without introducing the X-ray feedback. Taking into account the feedback, the observed and estimated X-ray luminosities nicely agree. We identify two cases of X-ray feedback with low and high X-ray luminosities that can explain the dichotomy between SFXTs and sgXBs.