The former Pakistan international was admitted to hospital on Wednesday evening after the county champions decided to bring forward the planned operation.
Mark Robinson, Sussex's professional cricket manager, said: "We made the decision very quickly on the Wednesday morning. We were originally hoping that we would just play him in four day cricket up to the Twenty20 window where he'd then have the operation.
"However, on reflection, we felt it wouldn't be right to compromise our strike bowler by having him playing in discomfort, so, with the amount of unsettled weather around and the fact our club surgeon said he could get him in that day, we felt it was the wisest decision to make.
"It is a routine operation that many sportsmen have and we are hopeful that Mushy will be back between two and three weeks."